diff options
author | Noel Grandin <noel@peralex.com> | 2016-02-09 13:37:03 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-02-12 06:14:02 +0000 |
commit | 198f3ec116996788be1d73f9462ecb808b78f309 (patch) | |
tree | 52dc3868d3ae0821aebc18c1ebffa6382b0882cd /compilerplugins | |
parent | 6cc5d37d87406671ac76e94a43f8a57f346caaaf (diff) |
loplugin:unusedmethods
Change-Id: I0fb06079ff8a9d0b2f5a2929f31846f91391f5c4
Reviewed-on: https://gerrit.libreoffice.org/22229
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'compilerplugins')
-rwxr-xr-x | compilerplugins/clang/unusedmethods.py | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/compilerplugins/clang/unusedmethods.py b/compilerplugins/clang/unusedmethods.py index 504a97fc4e32..a81bd6b5fd9f 100755 --- a/compilerplugins/clang/unusedmethods.py +++ b/compilerplugins/clang/unusedmethods.py @@ -260,10 +260,10 @@ def natural_sort_key(s, _nsre=re.compile('([0-9]+)')): tmp1list = sorted(tmp1set, key=lambda v: natural_sort_key(v[1])) # print out the results -#for t in tmp1list: -# print t[1] -# print " ", t[0] -#sys.exit(0) +with open("unused.methods", "wt") as f: + for t in tmp1list: + f.write(t[1] + "\n") + f.write(" " + t[0] + "\n") # ------------------------------------------- # Do the "unused return types" part @@ -304,9 +304,10 @@ for d in definitionSet: # sort results by name and line number tmp2list = sorted(tmp2set, key=lambda v: natural_sort_key(v[1])) -#for t in tmp2list: -# print t[1] -# print " ", t[0] +with open("unused.returns", "wt") as f: + for t in tmp2list: + f.write(t[1]) + f.write(" " + t[0] + "\n") # ------------------------------------------- @@ -328,11 +329,10 @@ for d in publicDefinitionSet: # sort results by name and line number tmp3list = sorted(tmp3set, key=lambda v: natural_sort_key(v[1])) -for t in tmp3list: - print t[1] - print " ", t[0] +with open("unused.public", "wt") as f: + for t in tmp3list: + f.write(t[1] + "\n") + f.write(" " + t[0] + "\n") -# add an empty line at the end to make it easier for the unusedmethodsremove plugin to mmap() the output file -print |