From fcbb25c0881eb0a17d5f839274e6497d35156586 Mon Sep 17 00:00:00 2001 From: Alexis La Goutte Date: Thu, 22 Jul 2021 15:23:15 +0200 Subject: [PATCH] PSSA: Add Github Actions for launch PSSA (PowerShell Script Analyzer) when launch PR (#11) Add also vscode/PSScriptAnalyzerSettings.psd1 for Settings for PSSA (can be reuse also for vscode...) --- .github/workflows/pssa.yml | 16 ++++++++++++++++ .vscode/PSScriptAnalyzerSettings.psd1 | 5 +++++ 2 files changed, 21 insertions(+) create mode 100644 .github/workflows/pssa.yml create mode 100644 .vscode/PSScriptAnalyzerSettings.psd1 diff --git a/.github/workflows/pssa.yml b/.github/workflows/pssa.yml new file mode 100644 index 0000000..446a549 --- /dev/null +++ b/.github/workflows/pssa.yml @@ -0,0 +1,16 @@ +name: CI +on: [pull_request] +jobs: + lint: + name: Run PSSA + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: lint + uses: docker://devblackops/github-action-psscriptanalyzer:2.3.0 + with: + settingsPath: .vscode/PSScriptAnalyzerSettings.psd1 + sendComment: false + failOnInfos: true + failOnErrors: true + failOnWarnings: true \ No newline at end of file diff --git a/.vscode/PSScriptAnalyzerSettings.psd1 b/.vscode/PSScriptAnalyzerSettings.psd1 new file mode 100644 index 0000000..311a301 --- /dev/null +++ b/.vscode/PSScriptAnalyzerSettings.psd1 @@ -0,0 +1,5 @@ +@{ + ExcludeRules = @( + 'PSUseToExportFieldsInManifest' + ) +} \ No newline at end of file