ravioli icon indicating copy to clipboard operation
ravioli copied to clipboard

Globals are only counted where they are defined

Open mchernosky opened this issue 6 years ago • 2 comments

The KSF defines:

Globals is the number of read/write global variables accessed by the module. So we need to count globals wherever they are accessed.

mchernosky avatar Sep 24 '19 17:09 mchernosky

Is that fair to a module where the globals are defined elsewhere?

csholmq avatar Aug 18 '20 06:08 csholmq

I think it's fair to count global accesses (and ignore where globals are defined), as accessing a global is what makes the code more difficult to follow. Counting globals where they are defined penalizes the modules where the definition is, but lets other modules that access the global off the hook.

mchernosky avatar Aug 27 '21 22:08 mchernosky