Skip to content

Commit

Permalink
Support cli_lint_mode: project
Browse files Browse the repository at this point in the history
  • Loading branch information
bdovaz committed Jan 10, 2023
1 parent b531448 commit fa175b3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion megalinter/linters/PowershellLinter.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ def build_lint_command(self, file=None):
pwsh_script[0] += " -Settings " + self.config_file

if self.linter_name == "powershell":
pwsh_script[0] += f" -Path '{file}'"
if self.cli_lint_mode == "file":
pwsh_script[0] += f" -Path '{file}'"
elif self.cli_lint_mode == "project":
pwsh_script[0] += f" -Path '{self.workspace}' -Recurse"
elif self.linter_name == "powershell_formatter":
pwsh_script[0] += f" -ScriptDefinition (Get-Content -Path '{file}' -Raw)"

Expand Down

0 comments on commit fa175b3

Please sign in to comment.