Reputation: 11
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
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
Upvotes: 0
Views: 50