Full golang supportf (tested)

This commit is contained in:
Sam Sendelbach 2017-12-20 14:20:29 -06:00
parent 2350c15b97
commit cd4ca317e7

View file

@ -34,9 +34,8 @@ __metric_cc_tokens__ = [[["java", "js", "c", "cc", "cpp"], ["else", r"for\s+\(.*
["assert", "break", "continue", "return"]],
[["py"], [r"^\s+elif .*:$", r"^\s+else:$", r"^\s+for .*:", r"^\s+if .*:$", r"^\s+while .*:$"],
[r"^\s+assert", "break", "continue", "return"]],
[["go"], ["else", r"for\s+.*\{", r"if\s+.*\{", r"case\s+\w+:", "default:", r"goto\s+\w"],
["break", "continue", "return"]]]
# check ast.CommClause and range statements
[["go"], ["else", "range" "defer", r"for\s+.*\{", r"if\s+.*\{", r"case\s+\w+:", "default:", r"goto\s+\w"],
["break", "continue", "return", "quit"]]]
METRIC_CYCLOMATIC_COMPLEXITY_THRESHOLD = 50
METRIC_CYCLOMATIC_COMPLEXITY_DENSITY_THRESHOLD = 0.75