Open mensinda opened 4 years ago
Some of the __init__
stuff in lgtm is strictly broken.
Some of the stuff its pointing out is stuff that needs to be refactored in larger ways. The entire CLikeCompilerMixin
needs to be chucked, it's really a hack just to clean up a giant mess between c, objc, cpp, and objcpp. I'd really like to get the Compiler derived classes cleaned up as much as possible, #6300 is about that. Ideally the class structure in compiler would be:
LangCompiler(Compiler), GnuLangCompiler(GnuCompilerMixin, LangCompiler)
I can add more to this, but I've got to go ATM.
There are only 3 LGTM warning sections remaining.
init method calls overridden method
We might be able to resolve those with some refactoring, but I am not sure if that is worth it (at least not trivial for me).
Multiple calls to init during object initialization
I tried fixing this with a slight refactoring but just moved the problem from
GnuCompiler
toGnuLikeCompiler
. Maybe someone with a bit more compiler knowledge can have a look at this (ping @dcbaker).Conflicting attributes in base classes
This is the main source of warnings. I also think that the overriding of methods is intentional (at least I really hope so). At least we should document that the ordering of the classes is important and must not be changed. I don't think that this can be resolved through refactoring without getting a really messy class structure (ping @dcbaker).