We currently have a list of disallowed classes on the GlobalClass rule. These classes should not be called statically and currently include some entity classes. This list is currently limited to 'File', 'Node', 'NodeType', 'Role', 'Term' and 'User'. It would be nice to increase this list to include all core entities, as none of these should be called statically.
As some of the entity classes may contain generic names we'll most likely trigger false positives if we would just increase the list to all entities currently available within core, so it would be best to take the full namespace of referenced classes into consideration.
Comments
Comment #2
arkener commentedPR: https://github.com/pfrenssen/coder/pull/108
Running this change against the latest version of core returns the following:
Comment #3
arkener commentedComment #4
klausiThank you, looks good!
Comment #6
arkener commentedMerged, thanks for the review!