Pin PSScriptAnalyzer settings to shared org raw file#224
Merged
Conversation
Mirror the shared PSScriptAnalyzer settings locally and refresh from a pinned raw file during setup so ConfluencePS uses the same reviewed lint policy as other AtlassianPS modules.
Restore the local analyzer settings baseline expected by ConfluencePS tests and keep the pinned setup sync logic with a lint-compliant helper name.
Validate the shared analyzer payload via pinned commit and hash, but only overwrite local settings when explicitly requested to avoid CI regressions from baseline drift.
Switch to a PS5-compatible Join-Path expression so the setup script can resolve the local settings file in the Windows PowerShell CI lane.
Retain the commit-pinned raw source while removing SHA checks and handling download failures as warnings to match a lower-friction trust model.
Add a Tools/update.dependencies.ps1 helper that can refresh dependency versions and update the commit-pinned shared PSScriptAnalyzer settings URL in Tools/setup.ps1.
Download the pinned analyzer settings directly as response content in setup and keep the optional local write path for explicit updates.
Stop setup and pin-refresh workflows when shared PSScriptAnalyzer settings cannot be downloaded or resolved, so CI fails deterministically instead of continuing with stale or missing lint config. Co-authored-by: Cursor <cursoragent@cursor.com>
Generate PSScriptAnalyzer settings from the pinned shared source on every setup run and stop tracking repo-local copies, so lint/build always use the pinned configuration without committing generated files. Co-authored-by: Cursor <cursoragent@cursor.com>
Continue failing fast on pinned shared config download, but materialize the existing ConfluencePS analyzer profile so current test baselines stay green while the shared source remains reachable. Co-authored-by: Cursor <cursoragent@cursor.com>
Materialize the pinned shared PSScriptAnalyzer settings in setup and reformat the flagged ConfluencePS files so the repository passes the stricter shared lint profile. Co-authored-by: Cursor <cursoragent@cursor.com>
Write the setup script as UTF-8 without BOM so style checks and generated release files keep repository encoding conventions. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Sync-PSScriptAnalyzerSettingsstep inTools/setup.ps1to fetch the shared rules file fromAtlassianPS/.githubPSScriptAnalyzerSettings.psd1Test plan
pwsh -NoLogo -NonInteractive -NoProfile -Command '& { Set-Location "./"; ./Tools/setup.ps1 }'in the ConfluencePS worktreeInvoke-Build -Task InstallDependenciescompletes during setupPSScriptAnalyzerSettings.psd1hash is stable locallyAtlassianPS/.githubshared-config PR merges to confirm remote sync succeeds without fallbackDepends on: https://github.com/AtlassianPS/.github/pull/new/shared-pssa-config
Made with Cursor