ravioli
ravioli copied to clipboard
Globals are only counted where they are defined
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.
Is that fair to a module where the globals are defined elsewhere?
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.