-
Notifications
You must be signed in to change notification settings - Fork 1
Home
This is a PowerShell module which runs a series of Pester 5 tests to validate code quality against it's rules
The standards that these scripts are enforcing are detailed here: Standards
The rules that are tested are detailed here: Module Tests and here: Script Tests
Check the folder C:\Scripts:
Invoke-PSQualityCheck -Path 'C:\Scripts'
Check the folders C:\Scripts and C:\MoreScripts':
Invoke-PSQualityCheck -Path @('C:\Scripts', 'C:\MoreScripts')
Check the file C:\Scripts\Script.ps1:
Invoke-PSQualityCheck -File 'C:\Scripts\Script.ps1'
Check the file C:\Scripts\Script.ps1 with the extra PSScriptAnalyzer rules used by SonarQube:
Invoke-PSQualityCheck -File 'C:\Scripts\Script.ps1' -SonarQubeRulesPath 'C:\SonarQubeRules'
This will display a summary of the checks performed (example below uses sample data):
Invoke-PSQualityCheck -Path 'C:\Scripts' -ShowCheckResults
Name Files Tested Total Passed Failed Skipped
---- ------------ ----- ------ ------ -------
Module Tests 2 14 14 0 0
Extracting functions 2 2 2 0 0
Extracted function script tests 22 330 309 0 21
Total 24 346 325 0 21
The plan for the future of the module is detailed here: Future Plans