-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Script Analyzer test should make use of multiple custom rule paths #100
Comments
I have mixed feelings about this. |
We could definitely add an array of analyzer rules to the build.yaml. The scenario is that we added repository specific analyzer rules to the SqlServerDsc repo: As a workaround we added a test that runs the analyzer rules: Analyzer rules: https://github.com/dsccommunity/SqlServerDsc/blob/main/tests/QA/ScriptAnalyzer.Tests.ps1 The QA test is run in the pipeline here: https://github.com/dsccommunity/SqlServerDsc/blob/49f78a8b12c0f540ef76cdcbf6605fffa30c17fa/azure-pipelines.yml#L65-L70 It would have been cleaner that these were run during the regular HQRM tests. |
The PSSA test
source/Tests/QA/PSSAResource.common.Tests.ps1
currently ignores a repository's Script Analyzer file. I Script Analyzer file can be used to add additional custom rules that should only be run for the repository.Script Analyzer is run with a settings file like this.
But a better option would be to allow custom rule paths to be specified in the build configuration file
build.yml
under the keyDscTest:
together with an option to include additional rules (if the rules are not prefixed withMeasue-*
).The custom rule paths that is set must point to one or more module or module files. Since Script Analyzer must be called like this:
The text was updated successfully, but these errors were encountered: