pre-commit / pre-commit-hooks

Some out-of-the-box hooks for pre-commit
MIT License
5.2k stars 694 forks source link

While Performing Powershell linting using Pre-commit through hook 'PSScriptanalyzer' I am getting below error: Invoke-ScriptAnalyzer : A positional parameter cannot be found that accepts argument #1070

Closed Shubhij12 closed 2 months ago

Shubhij12 commented 2 months ago

I have Installed PSScriptAnalyzer module in my local and while plugin in with precommit i have given below config file:

Please find following Config file

repo: local hooks: - id: PSScriptAnalyzer name: PSScriptAnalyzer description: Run PSScriptAnalyzer on commit language: system entry: powershell -NoProfile -NonInteractive -Command Invoke-ScriptAnalyzer -EnableExit -Path files: ^.*.ps1$ pass_filenames: true Getting below Error : A positional parameter cannot be found that accepts argument in ___.ps1

asottile commented 2 months ago

your configuration doesn't include any hooks from this repo