File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ name : pre-commit
3+ on :
4+ push :
5+ pull_request :
6+ jobs :
7+ pre-commit :
8+ runs-on : ubuntu-latest
9+ steps :
10+ - name : Checkout
11+ uses : actions/checkout@v3
12+ - name : Run pre-commit
13+ uses : pre-commit/action@v3.0.0
Original file line number Diff line number Diff line change 1+ ---
2+ repos :
3+ - repo : https://github.com/pre-commit/pre-commit-hooks
4+ rev : v4.4.0
5+ hooks :
6+ - id : check-merge-conflict
7+ - id : check-yaml
8+ - id : end-of-file-fixer
9+ - id : mixed-line-ending
10+ args :
11+ - --fix=lf
12+ - id : trailing-whitespace
13+ - repo : https://github.com/hadolint/hadolint
14+ rev : v2.12.0
15+ hooks :
16+ - id : hadolint-docker
17+ - repo : https://github.com/igorshubovych/markdownlint-cli
18+ rev : v0.33.0
19+ hooks :
20+ - id : markdownlint-docker
21+ args :
22+ - --disable=MD013
23+ - repo : local
24+ hooks :
25+ - id : psscriptanalyzer-check
26+ name : check PowerShell code using PSScriptAnalyzer
27+ language : script
28+ entry : PSScriptAnalyzer-wrapper.ps1 -Check
29+ args :
30+ - -ExcludeRule
31+ - PSUseBOMForUnicodeEncodedFile
32+ - -Fix
33+ types :
34+ - file
35+ files : \.ps[dm]?1$
36+ - id : psscriptanalyzer-format
37+ name : format PowerShell code using PSScriptAnalyzer
38+ language : script
39+ entry : PSScriptAnalyzer-wrapper.ps1 -Format
40+ types :
41+ - file
42+ files : \.ps[dm]?1$
Original file line number Diff line number Diff line change 1+ ---
2+ - id : psscriptanalyzer-check
3+ name : check PowerShell code using PSScriptAnalyzer
4+ language : script
5+ entry : PSScriptAnalyzer-wrapper.ps1 -Check
6+ args :
7+ - -ExcludeRule
8+ - PSUseBOMForUnicodeEncodedFile
9+ - -Fix
10+ types :
11+ - file
12+ files : \.ps[dm]?1$
13+ - id : psscriptanalyzer-format
14+ name : format PowerShell code using PSScriptAnalyzer
15+ language : script
16+ entry : PSScriptAnalyzer-wrapper.ps1 -Format
17+ types :
18+ - file
19+ files : \.ps[dm]?1$
20+ - id : psscriptanalyzer-check-docker
21+ name : check PowerShell code using PSScriptAnalyzer
22+ language : docker
23+ entry : PSScriptAnalyzer-wrapper.ps1 -Check
24+ args :
25+ - -ExcludeRule
26+ - PSUseBOMForUnicodeEncodedFile
27+ - -Fix
28+ types :
29+ - file
30+ files : \.ps[dm]?1$
31+ - id : psscriptanalyzer-format-docker
32+ name : format PowerShell code using PSScriptAnalyzer
33+ language : docker
34+ entry : PSScriptAnalyzer-wrapper.ps1 -Format
35+ types :
36+ - file
37+ files : \.ps[dm]?1$
Original file line number Diff line number Diff line change 1+ FROM mcr.microsoft.com/powershell:lts-alpine-3.14
2+
3+ COPY PSScriptAnalyzer-wrapper.ps1 /usr/local/bin/
4+ RUN chmod 0755 /usr/local/bin/PSScriptAnalyzer-wrapper.ps1 && \
5+ pwsh -Command \
6+ "Set-PSRepository -ErrorAction Stop -InstallationPolicy Trusted -Name PSGallery -Verbose; \
7+ Install-Module -ErrorAction Stop -Name PSScriptAnalyzer -Scope AllUsers"
8+
9+ ENTRYPOINT ["/usr/local/bin/PSScriptAnalyzer-wrapper.ps1" ]
You can’t perform that action at this time.
0 commit comments