Skip to content

Commit

Permalink
add flags to semgrep
Browse files Browse the repository at this point in the history
  • Loading branch information
clavedeluna committed Oct 17, 2023
1 parent 017280d commit 0f5811b
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/codemodder/semgrep.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,20 @@ def run(execution_context: CodemodExecutionContext, yaml_files: List[Path]) -> d
"-o",
temp_sarif_file.name,
]

if execution_context.path_exclude:
command.extend(
itertools.chain.from_iterable(
map(lambda f: ["--exclude", str(f)], execution_context.path_exclude)
)
)
if execution_context.path_include:
command.extend(
itertools.chain.from_iterable(
map(lambda f: ["--include", str(f)], execution_context.path_include)
)
)

command.extend(
itertools.chain.from_iterable(
map(lambda f: ["--config", str(f)], yaml_files)
Expand Down

0 comments on commit 0f5811b

Please sign in to comment.