Skip to content

Commit 9c45cf3

Browse files
Rangeet PanRangeet Pan
authored andcommitted
add logic to run codenalyzer when target files are provided
1 parent 1efa0fe commit 9c45cf3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cldk/analysis/java/codeanalyzer/codeanalyzer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ def _init_codeanalyzer(self, analysis_level=1) -> JApplication:
205205
logger.info("Reading analysis from the pipe.")
206206
# If target file is provided, the input is merged into a single string and passed to codeanalyzer
207207
if self.target_files:
208-
target_file_options = '-t '.join([s.strip() for s in self.target_files])
208+
target_file_options = ' -t '.join([s.strip() for s in self.target_files])
209209
codeanalyzer_args = codeanalyzer_exec + shlex.split(
210210
f"-i {Path(self.project_dir)} --analysis-level={analysis_level} -t {target_file_options}"
211211
)
@@ -231,7 +231,7 @@ def _init_codeanalyzer(self, analysis_level=1) -> JApplication:
231231
analysis_json_path_file = Path(self.analysis_json_path).joinpath("analysis.json")
232232
# If target file is provided, the input is merged into a single string and passed to codeanalyzer
233233
if self.target_files:
234-
target_file_options = '-t '.join([s.strip() for s in self.target_files])
234+
target_file_options = ' -t '.join([s.strip() for s in self.target_files])
235235
codeanalyzer_args = codeanalyzer_exec + shlex.split(
236236
f"-i {Path(self.project_dir)} --analysis-level={analysis_level}"
237237
f" -o {self.analysis_json_path} -t {target_file_options}"

0 commit comments

Comments
 (0)