Check for writes to enclosing/global environments via <<- or ->>
Source:R/check-global-env-write.R
cl_check_global_env_write.RdFlags <<-/->> usage in R/. This operator writes to the nearest
enclosing environment with an existing binding of the same name, or to
.GlobalEnv if none exists – which the CRAN Repository Policy
explicitly forbids. Package code that only uses <<- to update a
variable in a known parent scope (e.g. a closure factory) is technically
safe, but this check can't distinguish that case from an accidental
global write without deeper scope analysis, so every use is flagged for
review.