diff --git a/gitinspector/comment.py b/gitinspector/comment.py index 2df26d1..02ec7e2 100644 --- a/gitinspector/comment.py +++ b/gitinspector/comment.py @@ -22,17 +22,17 @@ __comment_begining__ = {"java": "/*", "c": "/*", "cc": "/*", "cpp": "/*", "cs": "/*", "h": "/*", "hh": "/*", "hpp": "/*", "hs": "{-", "html": "", "php": "/*", "py": "\"\"\"", "glsl": "*/", "rb": "=end", "js": "*/", "jspx": "-->", "scala": "*/", "sql": "*/", "tex": "\\end{comment}", "xhtml": "-->", "xml": "-->", "ml": "*)", "mli": "*)", - "go": "*/", "ly": "%}", "ily": "%}"} + "go": "*/", "ly": "%}", "ily": "%}", "groovy": "*/"} __comment__ = {"java": "//", "c": "//", "cc": "//", "cpp": "//", "cs": "//", "h": "//", "hh": "//", "hpp": "//", "hs": "--", "pl": "#", "php": "//", "py": "#", "glsl": "//", "rb": "#", "robot": "#", "rs": "//", "rlib": "//", "js": "//", "scala": "//", "sql": "--", "tex": "%", "ada": "--", "ads": "--", "adb": "--", "pot": "#", "po": "#", "go": "//", - "ly": "%", "ily": "%"} + "ly": "%", "ily": "%", "groovy": "//"} __comment_markers_must_be_at_begining__ = {"tex": True} diff --git a/gitinspector/metrics.py b/gitinspector/metrics.py index d4aeead..a404bdc 100644 --- a/gitinspector/metrics.py +++ b/gitinspector/metrics.py @@ -24,9 +24,9 @@ from . import comment, filtering, interval __metric_eloc__ = {"java": 500, "c": 500, "cpp": 500, "cs": 500, "h": 300, "hpp": 300, "php": 500, "py": 500, "glsl": 1000, - "rb": 500, "js": 500, "sql": 1000, "xml": 1000} + "rb": 500, "js": 500, "sql": 1000, "xml": 1000, "groovy": 500} -__metric_cc_tokens__ = [[["java", "js", "c", "cc", "cpp"], ["else", r"for\s+\(.*\)", r"if\s+\(.*\)", r"case\s+\w+:", +__metric_cc_tokens__ = [[["java", "js", "c", "cc", "cpp","groovy"], ["else", r"for\s+\(.*\)", r"if\s+\(.*\)", r"case\s+\w+:", "default:", r"while\s+\(.*\)"], ["assert", "break", "continue", "return"]], [["cs"], ["else", r"for\s+\(.*\)", r"foreach\s+\(.*\)", r"goto\s+\w+:", r"if\s+\(.*\)", r"case\s+\w+:",