Check for hardcoded random seeds in package code
Source:R/check-hardcoded-seed.R
cl_check_hardcoded_seed.RdFlags set.seed() calls in R/ that pass a literal, unchangeable
number (e.g. set.seed(42), set.seed(seed = 42L), set.seed(-5)) as
any argument. Setting a seed a user can't override or opt out of, inside
a function, is a common CRAN rejection reason. Calls in tests/,
\examples, vignettes/, and demos are out of scope – and not scanned
at all, since checks only look at R/ – because setting a seed there
is expected and recommended for reproducibility.