Skip to content

OSOE-580: Custom analyzer rule for parameter and variable name styling #215

OSOE-580: Custom analyzer rule for parameter and variable name styling

OSOE-580: Custom analyzer rule for parameter and variable name styling #215

name: Test Analysis Failure
# Runs for PRs opened for any branch, and pushes to the dev branch.
on:
pull_request:
push:
branches:
- dev
jobs:
call-test-analysis-failure-nuget:
name: Test Analysis Failure - NuGet PackageReference
uses: Lombiq/GitHub-Actions/.github/workflows/test-analysis-failure.yml@dev
with:
machine-types: "['ubuntu-latest', 'windows-latest']"
build-directory: TestSolutions/Lombiq.Analyzers.PowerShell.PackageReference
timeout-minutes: 30
build-expected-code-analysis-errors: |
MSB3073: The command exited with non-zero code.
PSAvoidExclaimOperator: Avoid using the ! negation operator
PSAvoidUsingAutomaticVariableAlias: '$_' is an alias of '$PSItem'.
PSAvoidUsingCmdletAliases: '%' is an alias of 'ForEach-Object'.
PSAvoidUsingDoubleQuotesForConstantString: Use single quotes when a string is constant.
PSAvoidUsingEmptyCatchBlock: Empty catch block is used.
PSAvoidUsingLineContinuation: Using backtick (line continuation) makes the code harder to read and maintain.
PSAvoidUsingWriteHost: File 'Violate-Analyzers.ps1' uses Write-Host.
PSPlaceOpenBrace: Open brace is not on a new line.
PSUseApprovedVerbs: The cmdlet 'Violate-Analyzers' uses an unapproved verb.
PSUseConsistentIndentation: Indentation not consistent
PSUseCorrectAutomaticVariableNameCasing: Automatic variables should be used with the correct casing
PSUseCorrectParameterNameCasing: Parameter names should contain only alphanumeric characters and start with an uppercase letter
PSUseCorrectVariableNameCasing: Variable names should contain only alphanumeric characters and start with a lowercase letter
PSUseParameterNameDeclaredCasing: Parameters should be used with the declared casing
PSUseSingularNouns: The cmdlet 'Violate-Analyzers' uses a plural noun.
call-test-analysis-failure-local:
name: Test Analysis Failure - Local ProjectReference
uses: Lombiq/GitHub-Actions/.github/workflows/test-analysis-failure.yml@dev
with:
machine-types: "['ubuntu-latest', 'windows-latest']"
build-directory: TestSolutions/Lombiq.Analyzers.PowerShell.ProjectReference
timeout-minutes: 30
build-expected-code-analysis-errors: |
MSB3073: The command exited with non-zero code.
PSAvoidExclaimOperator: Avoid using the ! negation operator
PSAvoidUsingAutomaticVariableAlias: '$_' is an alias of '$PSItem'.
PSAvoidUsingCmdletAliases: '%' is an alias of 'ForEach-Object'.
PSAvoidUsingDoubleQuotesForConstantString: Use single quotes when a string is constant.
PSAvoidUsingEmptyCatchBlock: Empty catch block is used.
PSAvoidUsingLineContinuation: Using backtick (line continuation) makes the code harder to read and maintain.
PSAvoidUsingWriteHost: File 'Violate-Analyzers.ps1' uses Write-Host.
PSPlaceOpenBrace: Open brace is not on a new line.
PSUseApprovedVerbs: The cmdlet 'Violate-Analyzers' uses an unapproved verb.
PSUseConsistentIndentation: Indentation not consistent
PSUseCorrectAutomaticVariableNameCasing: Automatic variables should be used with the correct casing
PSUseCorrectParameterNameCasing: Parameter names should contain only alphanumeric characters and start with an uppercase letter
PSUseCorrectVariableNameCasing: Variable names should contain only alphanumeric characters and start with a lowercase letter
PSUseParameterNameDeclaredCasing: Parameters should be used with the declared casing
PSUseSingularNouns: The cmdlet 'Violate-Analyzers' uses a plural noun.