summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-03-02 15:13:37 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-03-03 08:26:40 +0100
commitb0a07d94095883c17ab444801a27d30819aec201 (patch)
tree048d8bb31d3bd4f493a4543e34369631d70931e0 /bin
parentb8077713987253f6db0887ddad56fd6871374a8b (diff)
remove some dead code
GpgComponentFactory is unused since: commit 06d7dbb3568889aa50f46d6307a39fa53a17313b Date: Sun May 21 14:28:57 2017 +0200 gpg4libre: share static xmlsec lib between nss and gpg tableautoformatfield.cxx should have been removed in: commit 5990beed9aba690ea9487e2c4a64615b7504a0a1 Date: Fri Aug 29 16:37:43 2014 +0200 Dead code xmlRow is unused since initial import Change-Id: Ief186e9ef46238cc8cdb49f4adde52a45a98cbc4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89830 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/find-files-not-referenced-by-makefile.py53
1 files changed, 53 insertions, 0 deletions
diff --git a/bin/find-files-not-referenced-by-makefile.py b/bin/find-files-not-referenced-by-makefile.py
new file mode 100755
index 000000000000..70232ed1c459
--- /dev/null
+++ b/bin/find-files-not-referenced-by-makefile.py
@@ -0,0 +1,53 @@
+#!/usr/bin/python2
+
+# Look for CXX files that are not referenced by any makefile
+
+import subprocess
+import sys
+
+sourceFiles = set()
+
+a = subprocess.Popen("git ls-files", stdout=subprocess.PIPE, shell=True)
+with a.stdout as txt:
+ for filename in txt:
+ if filename.find(".cxx") != -1 \
+ and filename.find("precompiled") == -1 \
+ and filename.find("/workben") == -1 \
+ and not filename.startswith("odk/examples/") \
+ and not filename.startswith("bridges/") \
+ and not filename.startswith("compilerplugins/") \
+ and filename.find("/qa/") == -1 \
+ and filename.find("/test/") == -1 \
+ and not filename.startswith("testtools/") \
+ and not filename.startswith("vcl/") \
+ and not filename.startswith("cli_ure/"):
+ sourceFiles.add(filename.strip())
+
+a = subprocess.Popen("git ls-files */*.mk", stdout=subprocess.PIPE, shell=True)
+with a.stdout as txt:
+ for makefilename in txt:
+ makefilename = makefilename.strip()
+ with open(makefilename, "r") as makefile:
+ moduleName = makefilename[:makefilename.find("/")]
+ state = 0
+ for line in makefile:
+ line = line.strip()
+ if state == 0 and "_add_exception_objects" in line:
+ state = 1
+ elif state == 1 and line != "))":
+ s = line.replace("\\","").replace(")", "").strip()
+ # parse line like: $(call gb_Helper_optional,AVMEDIA,svx/source/sidebar/media/MediaPlaybackPanel) \
+ idx = s.rfind(",")
+ if idx != -1:
+ s = s[idx+1:].strip()
+ sourceFiles.discard(s + ".cxx")
+ elif state == 1:
+ state = 0
+
+
+
+
+print "files not listed in makefile"
+print "----------------------------"
+for x in sorted(sourceFiles):
+ print x