if not otherfile:
reporter.code_issue(includedfile,
"includes non-local file as {0}".format(includedfile))
- # TODO: Reinstantiate a check once there is clarity on what we want
- # to enforce.
- #elif fileobj.is_installed() and not includedfile.is_relative():
- # reporter.code_issue(includedfile,
- # "installed header includes {0} using non-relative path"
- # .format(includedfile))
if not otherfile:
return
if fileobj.is_installed() and not otherfile.is_installed():
check_file(fileobj, reporter)
for includedfile in fileobj.get_includes():
check_include(fileobj, includedfile, reporter)
- if fileobj.should_includes_be_sorted() \
- and not includesorter.check_sorted(fileobj):
- reporter.code_issue(fileobj, "include style/order is not consistent")
+ if fileobj.should_includes_be_sorted():
+ is_sorted, details = includesorter.check_sorted(fileobj)
+ if not is_sorted:
+ details.append("You can use includesorter.py to do the sorting automatically; see docs/dev-manual/gmxtree.rst")
+ reporter.code_issue(fileobj,
+ "include style/order is not consistent; see docs/dev-manual/includestyle.rst", details)
for classobj in tree.get_classes():
check_class(classobj, reporter)