pre-commit / pre-commit-hooks

Some out-of-the-box hooks for pre-commit
MIT License
5.39k stars 710 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 4 months ago

Shubhij12 commented 4 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 4 months ago

your configuration doesn't include any hooks from this repo