Skip to content

Linter R3: Seeded Randomness #1316

Open
@Ellpeck

Description

@Ellpeck

Combination of the query functions from #1313 and #1315:

Q.calls("our set of random consumer functions")
  .with(Info.LastCall, { callName: 'our set of random producer AND consumer functions' })
  .with(Info.Arguments)
  
// ensure that all last calls are sufficiently linked to a previous producer function 
// OR linked to a previous consumer function that is sufficiently linked again

With "our set of random functions" resulting from a csv or similar data store of functions that produce and consume randomness:

function, package, type,    condition
set.seed, base,    produce, constant_argument
runif,    stats,   consume                   
isample,  ...,     both                       

Because loops and functions like isample can create an arbitrary amount of random numbers, it both produces and consumes randomness!

Metadata

Metadata

Assignees

No one assigned

    Labels

    flowr linterRelated to the linter that we're implementing on top of the search api

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions