-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🩹 [Patch]: Update linting and git configuration and license year (#308)
## Description This pull request includes several changes across different configuration files to update linters, modify validation settings, and update documentation. The most important changes are summarized below: ### Linter Configuration Updates: * [`.github/linters/.jscpd.json`](diffhunk://#diff-557094e283c00b23265c1c75872f41c6b1a524a00f0d99dd68ebd22cb63bfdd6R1-R10): Added a new configuration file for `jscpd` with a threshold of 0, console reporting, and ignoring test files. * [`.github/linters/.powershell-psscriptanalyzer.psd1`](diffhunk://#diff-aae69c9d6774628ed181eacf53aee0f38eb6c2f53492cf3a5b7f7bdb6ef43b6aL1-L16): Updated the `PSScriptAnalyzer` settings to enable various rules, including alignment, long lines, semicolon usage, brace placement, comment help, consistent indentation, and whitespace. ### Validation Settings: * [`.github/workflows/Linter.yml`](diffhunk://#diff-482e65806ed9e4a7320f14964764086b91fed4a28d12e4efde1776472e147e79L30-L34): Changed validation settings by disabling `VALIDATE_JSON_PRETTIER` and removing `VALIDATE_GITLEAKS` and `VALIDATE_POWERSHELL`. ### Documentation Updates: * [`Coverage.md`](diffhunk://#diff-dbfc2288d75ec9b5432d4012b7f852336ed6550ea8964dd6227b64b4a38d7777L8-R20): Updated function coverage numbers and added new API endpoint coverage details. [[1]](diffhunk://#diff-dbfc2288d75ec9b5432d4012b7f852336ed6550ea8964dd6227b64b4a38d7777L8-R20) [[2]](diffhunk://#diff-dbfc2288d75ec9b5432d4012b7f852336ed6550ea8964dd6227b64b4a38d7777R243-R244) [[3]](diffhunk://#diff-dbfc2288d75ec9b5432d4012b7f852336ed6550ea8964dd6227b64b4a38d7777R551-R552) * [`LICENSE`](diffhunk://#diff-c693279643b8cd5d248172d9c22cb7cf4ed163a3c98c8a3f69c2717edd3eacb7L3-R3): Updated the copyright year from 2024 to 2025. ### Minor Fixes: * [`.github/linters/.markdown-lint.yml`](diffhunk://#diff-2fd3619d2b7372123257bc21645edb90c24293e66babbc6053033a89e21bab34L9-R17): Corrected the punctuation list format for the `MD026` rule. ## Type of change <!-- Use the check-boxes [x] on the options that are relevant. --> - [ ] 📖 [Docs] - [ ] 🪲 [Fix] - [x] 🩹 [Patch] - [ ]⚠️ [Security fix] - [ ] 🚀 [Feature] - [ ] 🌟 [Breaking change] ## Checklist <!-- Use the check-boxes [x] on the options that are relevant. --> - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas --------- Co-authored-by: github-actions <[email protected]>
- Loading branch information
1 parent
58ad447
commit ca15da3
Showing
8 changed files
with
95 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"threshold": 0, | ||
"reporters": [ | ||
"consoleFull" | ||
], | ||
"ignore": [ | ||
"**/tests/**", | ||
"**/src/functions/**", | ||
"**/tools/utilities/**", | ||
"**/.github/workflows/Nightly-Run.yml", | ||
"**/.github/workflows/Process-PSModule.yml" | ||
], | ||
"absolute": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,56 @@ | ||
#Documentation: https://github.com/PowerShell/PSScriptAnalyzer/blob/master/docs/Cmdlets/Invoke-ScriptAnalyzer.md#-settings | ||
@{ | ||
#CustomRulePath='path\to\CustomRuleModule.psm1' | ||
#RecurseCustomRulePath='path\of\customrules' | ||
# Severity = @( | ||
# 'Error' | ||
# 'Warning' | ||
# ) | ||
#IncludeDefaultRules=${true} | ||
@{ | ||
Rules = @{ | ||
PSAlignAssignmentStatement = @{ | ||
Enable = $true | ||
CheckHashtable = $true | ||
} | ||
PSAvoidLongLines = @{ | ||
Enable = $true | ||
MaximumLineLength = 150 | ||
} | ||
PSAvoidSemicolonsAsLineTerminators = @{ | ||
Enable = $true | ||
} | ||
PSPlaceCloseBrace = @{ | ||
Enable = $true | ||
NewLineAfter = $false | ||
IgnoreOneLineBlock = $true | ||
NoEmptyLineBefore = $false | ||
} | ||
PSPlaceOpenBrace = @{ | ||
Enable = $true | ||
OnSameLine = $true | ||
NewLineAfter = $true | ||
IgnoreOneLineBlock = $true | ||
} | ||
PSProvideCommentHelp = @{ | ||
Enable = $true | ||
ExportedOnly = $false | ||
BlockComment = $true | ||
VSCodeSnippetCorrection = $false | ||
Placement = 'begin' | ||
} | ||
PSUseConsistentIndentation = @{ | ||
Enable = $true | ||
IndentationSize = 4 | ||
PipelineIndentation = 'IncreaseIndentationForFirstPipeline' | ||
Kind = 'space' | ||
} | ||
PSUseConsistentWhitespace = @{ | ||
Enable = $true | ||
CheckInnerBrace = $true | ||
CheckOpenBrace = $true | ||
CheckOpenParen = $true | ||
CheckOperator = $true | ||
CheckPipe = $true | ||
CheckPipeForRedundantWhitespace = $true | ||
CheckSeparator = $true | ||
CheckParameter = $true | ||
IgnoreAssignmentOperatorInsideHashTable = $true | ||
} | ||
} | ||
ExcludeRules = @( | ||
'PSMissingModuleManifestField' | ||
'PSMissingModuleManifestField', # This rule is not applicable until the module is built. | ||
'PSUseToExportFieldsInManifest' | ||
) | ||
#IncludeRules = @( | ||
# 'PSAvoidUsingWriteHost', | ||
# 'MyCustomRuleName' | ||
#) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters