Hi Petr,
You’re right - for each module its Imports.{cpp,h} files are checked again. I’ve implemented a warnings buffer, so each warning message will be displayed only once.
Wouldn’t it be better to just design the file and dirs traversal so that the same file is not checked twice? If a module is being checked, then let’s only check Module.h, Module.cpp and ModuleTest.cpp. If a package is being checked, then check all contained modules and the Imports in both the package and the Testing subpackage. So instead of:
self.checkPackages(schemeObject)
if schemeObject.moduleName == '':
self.checkModules(schemeObject)
else:
self.checkModule(schemeObject)
we could have something like:
if schemeObject.moduleName == '':
self.checkPackages(schemeObject)
self.checkModules(schemeObject)
else:
self.checkModule(schemeObject)
I think there should be more to it to actually work but what do you think?
Ok - I’ve added a constant/variable DefaultTemplateOnlyOptionalItemsRegexps/onlyOptionalItemsRegexps to the TemplatesProperties class, which is a list of regexps and if any missing file matches some regexp in that list then no warning message is displayed. Currently there is only one regexp that matches files like Testing/ModuleTest.h.
That’s great!
Btw, I just checked your revno 142 and I saw you added empty test modules. I think it would be better not to add the modules unless they have some tests. This way we are fooling the checker to think everything is fine and we are thus potentially fooling ourselves that no further work is required in that package - very much like with compiler warnings. What is your opinion?
Regards,
Peter
