diff options
Diffstat (limited to 'util.py')
-rw-r--r-- | util.py | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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): |