Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

GitHub Action to run PSScriptAnalyzer static code analysis

License

NotificationsYou must be signed in to change notification settings

devblackops/github-action-psscriptanalyzer

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

GitHub Actions Status

GitHub Action to runPSScriptAnalyzer static code analysis checks on PowerShell forPull Requests.

Success Criteria

By default, this action will succeed ifzero PSScriptAnalyzererrors andwarnings are found.Failing on errors, warnings, or informational issues can be configured. SeeUsage below.The sending of comments back to the PR if the action fails can be disabled if desired.

Usage

Basic

Basic configuration that will run PSSA and fail on errors or warnings, and send a comment back to the PR with a summary.Note, thatrepoToken is required for sending comments back.

name:CIon:[pull_request]jobs:lint:name:Run PSSAruns-on:ubuntu-lateststeps:    -uses:actions/checkout@v2    -name:lintuses:devblackops/github-action-psscriptanalyzer@masterwith:repoToken:${{ secrets.GITHUB_TOKEN }}

Advanced

Advanced configuration that will run PSSA only in theMyModule directory, with custom PSSA settings, and fail on errors, warnings, or informational issues.A comment back to the PR with the PSSA summary will also be sent if any issues were detected.

name:CIon:[pull_request]jobs:lint:name:Run PSSAruns-on:ubuntu-lateststeps:    -uses:actions/checkout@v2    -name:lintuses:devblackops/github-action-psscriptanalyzer@masterwith:rootPath:MyModulesettingsPath:pssa_settings.psd1sendComment:truerepoToken:${{ secrets.GITHUB_TOKEN }}failOnErrors:truefailOnWarnings:truefailOnInfos:true

Docker

Use the Docker Hub version of the Action instead of building the container during the check.

name:CIon:[pull_request]jobs:lint:name:Run PSSAruns-on:ubuntu-lateststeps:    -uses:actions/checkout@v2    -name:lintuses:docker://devblackops/github-action-psscriptanalyzer:2.3.0with:repoToken:${{ secrets.GITHUB_TOKEN }}

Inputs

NameDefaultDescription
rootPath<none>The root directory to run PSScriptAnalyzer on. By default, this is the root of the repository.
settingsPath<none>The path to a PSScriptAnalyser settings file to control rules to execute.
sendCommenttrueEnable/disable sending comments with PSScriptAnalyzer results back to PR.
repoToken<none>GitHub token the action will use to send comments back to PR with. Use${{ secrets.GITHUB_TOKEN }}.
failOnErrorstrueEnable/disable failing the action on PSScriptAnalyzer error items.
failOnWarningstrueEnable/disable failing the action on PSScriptAnalyzer warning items.
failOnInfosfalseEnable/disable failing the action on PSScriptAnalyzer informational items.

Example

About

GitHub Action to run PSScriptAnalyzer static code analysis

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

  •  

Packages

No packages published

Contributors5


[8]ページ先頭

©2009-2025 Movatter.jp