Closed marcusboon closed 2 years ago
Aha,
I think we implemented the logic for files having ONE or more "artifacts" (classes, interfaces, traits...). Surely didn't thought too much about those having zero artifacts and no side effects.
Thanks for the report, I'll try to reproduce (and fix it) soon.
CIao :-)
Hola @marcusboon,
I've created #191 and think that it will fix the problem reported here.
Basically, files that only contain non-relevant code (that by definition is code without side-effects too), won't need the MOODLE_INTERNAL check anymore and, if present, will report that it's not needed.
An example non-relevant code file is, for example this. That's the one that is being used in the tests, if you've anything else in yours, please let me know.
Ciao :-)
Hey @stronk7 ,
Thanks for looking into this and the test looks about right :)
Marcus
I've got a file of constants (they're all just define(blah, blah)) with an mdef check at the top.
Code checker complains with:
But if I remove the mdef check, it complains with:
constants.txt