Open juju4 opened 1 year ago
It's up to you if want CI with warning(continue-on-error) or not and if violation fixes should go into this PR too. if small or exclusions, certainly. if bigger, probably better separate.
Only warnings here but exit code is equivalent to error. https://github.com/juju4/PSScriptAnalyzer/actions/runs/5984855087/job/16236411056#step:5:3575
And self-apply in github workflows.
PR Summary
This allows easy integration with pre-commit that can be use to validate/lint code before commit (and also after/server side as per github workflow example).
Tested on Macos and Linux. Note that current workflow fail is related to warnings as seen on https://github.com/juju4/PSScriptAnalyzer/actions/runs/3867323454/jobs/6592019858#step:5:3554 can change severity to errors if prefer.
Further improvement discussion in https://github.com/pre-commit/pre-commit/issues/2645
PR Checklist
.cs
,.ps1
and.psm1
files have the correct copyright headerWIP:
to the beginning of the title and remove the prefix when the PR is ready.