Skip to content

Commit a3a6bd8

Browse files
committed
fix(snykcode): add Java to accpeted language names
1 parent 2cdf9f3 commit a3a6bd8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

codesectools/sasts/tools/SnykCode/parser.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class SnykCodeAnalysisResult(AnalysisResult):
5454
metadata, including timings, file lists, and defects.
5555
"""
5656

57-
normalize_lang_names = {"cpp": ["c", "cpp"]}
57+
normalize_lang_names = {"java": ["java"], "cpp": ["c", "cpp"]}
5858

5959
def __init__(self, output_dir: Path, result_data: dict, cmdout: dict) -> None:
6060
"""Initialize a SnykCodeAnalysisResult instance.
@@ -83,7 +83,7 @@ def __init__(self, output_dir: Path, result_data: dict, cmdout: dict) -> None:
8383
for result in run["results"]:
8484
rule_index = result["ruleIndex"]
8585
lang, *_, checker = result["ruleId"].split("/")
86-
if self.lang not in self.normalize_lang_names[lang]:
86+
if self.lang not in self.normalize_lang_names.get(lang, []):
8787
continue
8888

8989
start = (

0 commit comments

Comments
 (0)