summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorGabor Kelemen <gabor.kelemen.extern@allotropia.de>2024-04-01 10:41:39 +0200
committerGabor Kelemen <gabor.kelemen.extern@allotropia.de>2024-04-09 18:53:11 +0200
commit6f10dc11015ed1640b847e7f0c0be5498b777c5b (patch)
treea7574a991f017c5a00fb06aea9ce6238e45f8112 /bin
parenta919a0aa4c434c906aa0301d842b1234bf287a9d (diff)
find-unneeded-includes: improve grepping for namespaces
for example this was not found: extensions/source/update/check/updatecheck.cxx:58:namespace frame = com::sun::star::frame ; due to the missing using and the space before the semicolon but IWYU correctly detected it as unused Change-Id: I404c93d41aec1a571c9ac49db7b7c7e8da824bf6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165698 Tested-by: Jenkins Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/find-unneeded-includes2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/find-unneeded-includes b/bin/find-unneeded-includes
index 99c77b654d3e..718ee67a2561 100755
--- a/bin/find-unneeded-includes
+++ b/bin/find-unneeded-includes
@@ -392,7 +392,7 @@ def processIWYUOutput(iwyuOutput, moduleRules, fileName, noexclude, checknamespa
print("WARNING:", fileName, "This 'using namespace' is likely unnecessary:", nameSpace)
# Get the row number, normal IWYU output does not contain this info
- subprocess.run(["git", "grep", "-n", "using namespace.*"+nameSpace+";", fileName])
+ subprocess.run(["git", "grep", "-n", "namespace.*[^a-zA-Z]"+nameSpace+" *;", fileName])
for remove in sorted(toRemove):
print("ERROR: %s: remove not needed include" % remove)