Shubhada P. Joshi
Shubhada P. Joshi

Reputation: 11

While Performing linting in Pre-commit through PSScriptanalyzer error:Invoke-ScriptAnalyzer: A positional parameter cannot be found that accepts args

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

Answers (0)

Related Questions