summaryrefslogtreecommitdiff
path: root/util.py
diff options
context:
space:
mode:
Diffstat (limited to 'util.py')
-rw-r--r--util.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/util.py b/util.py
index e1dd9af..9b40518 100644
--- a/util.py
+++ b/util.py
@@ -45,11 +45,16 @@ def passCodeQuality(path, language):
with open(path, encoding='utf-8', errors='replace') as f:
res = f.read()
return "global " not in res
- if language == "c":
+ if language in ["c", "llvm-c"]:
res = subprocess.check_output(
["ctags", "-R", "-x", "--sort=yes", "--c-kinds=v", path])
lines = res.splitlines()
return len([line for line in lines if b"const" not in line]) == 0
+ if language in ["cc", "llvm-cc"]:
+ res = subprocess.check_output(
+ ["ctags", "-R", "-x", "--sort=yes", "--c++-kinds=v", path])
+ lines = res.splitlines()
+ return len([line for line in lines if b"const" not in line]) == 0
def getAllFiles(root):