diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-10-17 09:09:45 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-10-17 09:10:48 +0200 |
commit | 493a7e9932b09ddafd31f443ef2dc03d85f4b12b (patch) | |
tree | fb516d3875dda3deadd0c7630c082390e52d6a6c /compilerplugins/clang | |
parent | b64fbcf9655885684bc39b64f66ec9f3b18baf6a (diff) |
loplugin:finalclasses trim the output a little
Change-Id: Iad0f0ded624e95448421c19a04535c2511b66a02
Diffstat (limited to 'compilerplugins/clang')
-rwxr-xr-x | compilerplugins/clang/finalclasses.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/compilerplugins/clang/finalclasses.py b/compilerplugins/clang/finalclasses.py index 64d192905f7c..304074688363 100755 --- a/compilerplugins/clang/finalclasses.py +++ b/compilerplugins/clang/finalclasses.py @@ -31,7 +31,13 @@ with open("loplugin.finalclasses.log") as txt: tmpset = set() for clazz in sorted(definitionSet - inheritFromSet): - tmpset.add((clazz, definitionToFileDict[clazz])) + file = definitionToFileDict[clazz] + # ignore classes defined inside compilation units, the compiler knows they are final already + if (".cxx" in file): continue + # ignore test and external code + if ("/qa/" in file): continue + if (file.startswith("workdir/")): continue + tmpset.add((clazz, file)) # sort the results using a "natural order" so sequences like [item1,item2,item10] sort nicely def natural_sort_key(s, _nsre=re.compile('([0-9]+)')): |