feat(build): enforce strict warnings across all linters#392
Merged
Conversation
- add ShellCheck CI workflow, PowerShell wrapper, and .shellcheckrc config - promote YamlLint warnings to failures for strict warnings compliance - add ShellCheck and YamlLint Pester unit tests with strict mode coverage - integrate ShellCheck into pr-validation and main workflows - update CONTRIBUTING.md warning policy table and package.json scripts Closes #6 🔧 - Generated by Copilot
…e paths - remove LASTEXITCODE reset that silently masked all test failures in CI - add explicit exit 1 when Pester reports failed tests - fix test dot-source paths from broken scripts/lib symlinks to shared/lib 🐛 - Generated by Copilot
Contributor
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Snapshot WarningsEnsure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice. OpenSSF Scorecard
Scanned Files
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #392 +/- ##
==========================================
+ Coverage 64.04% 64.40% +0.35%
==========================================
Files 250 251 +1
Lines 15319 15433 +114
Branches 2108 2060 -48
==========================================
+ Hits 9811 9939 +128
+ Misses 5220 5206 -14
Partials 288 288
🚀 New features to boost your workflow:
|
- default exit code to failure before try block prevents undefined variable error under StrictMode when CLI binary is not installed 🐛 - Generated by Copilot
agreaves-ms
reviewed
Apr 6, 2026
agreaves-ms
approved these changes
Apr 6, 2026
Contributor
rezatnoMsirhC
left a comment
There was a problem hiding this comment.
I'm now realizing this PR is for linters and not tests, so leaving soft-fail: true on terraform-tests and go-tests was probably intentional. Do we have another issue for enforcing strict warnings/errors on those later on?
…t-warnings # Conflicts: # .github/workflows/main.yml # .github/workflows/pr-validation.yml # package.json # scripts/linting/Invoke-ShellCheck.ps1 # scripts/tests/lib/Get-VerifiedDownload.Tests.ps1 # scripts/tests/lib/terraform-outputs.Tests.ps1 # scripts/tests/linting/Invoke-ShellCheck.Tests.ps1
- update PSScriptAnalyzer path from shared/ci/linting/ to scripts/linting/ 📝 - Generated by Copilot
…k.ps1 - update relative path from ../../../scripts/lib/ to ../lib/ after shared/ci rename 🔧 - Generated by Copilot
katriendg
approved these changes
Apr 8, 2026
2 tasks
WilliamBerryiii
pushed a commit
that referenced
this pull request
Apr 9, 2026
🤖 I have created a release *beep* *boop* --- ## [0.7.0](v0.6.1...v0.7.0) (2026-04-09) ### ✨ Features * **build:** add hve-core release pipeline with dependency SBOM and signing artifacts ([#420](#420)) ([2ff839a](2ff839a)) * **build:** enforce strict warnings across all linters ([#392](#392)) ([b75e217](b75e217)) * **evaluation:** add fuzz testing infrastructure and property-based tests ([#416](#416)) ([d97d42c](d97d42c)) * **infrastructure:** add optional ADLS Gen2 data lake storage account ([#398](#398)) ([3bb9012](3bb9012)) * **settings:** add HVE Core extension to workspace and devcontainer recommendations ([#226](#226)) ([f0735d8](f0735d8)) ### 🐛 Bug Fixes * **docs:** fix broken links, harden Docusaurus config, and integrate CI workflow ([#430](#430)) ([ea99997](ea99997)) * **scripts:** join shellcheck version output before -match to populate $Matches ([#432](#432)) ([8768e76](8768e76)) * **scripts:** map unmapped ShellCheck severity levels and harden version parsing ([#434](#434)) ([1e95a17](1e95a17)) * **scripts:** resolve ShellCheck SC2034 and enable source-path resolution ([#443](#443)) ([04438ea](04438ea)) ### 🔧 Miscellaneous * **deps-dev:** bump basic-ftp from 5.2.0 to 5.2.1 ([#429](#429)) ([438660a](438660a)) * **deps:** bump cryptography from 46.0.6 to 46.0.7 ([#425](#425)) ([2366647](2366647)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: physical-ai-toolchain-release[bot] <267194360+physical-ai-toolchain-release[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.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.
This PR established a warnings-as-errors policy across all CI linters and fixed a critical bug where Pester test failures were silently masked in CI. ShellCheck was added as a new linter with full CI integration, YamlLint was promoted to strict mode, and all remaining soft-fail linter jobs were switched to hard-fail.
Closes #6
Description
Critical Bug Fix
The Pester test workflow contained a
$global:LASTEXITCODE = 0reset that silently swallowed all test failures, allowing broken builds to pass CI. This was removed and replaced with explicitexit 1calls when Pester reports failures or throws exceptions. Two test files also had stale dot-source paths referencing thescripts/lib/symlink target instead of the canonicalshared/lib/location — these were corrected.ShellCheck Integration
A complete ShellCheck linting pipeline was added to the repository:
shell=bash,severity=warning, andexternal-sources=true.shfiles, runs ShellCheck with JSON output, classifies findings, writes structured results tologs/, and emits CI annotations — treating warnings as failuressoft-fail: falseYamlLint Strict Mode
Invoke-YamlLint.ps1 was updated to treat warnings as failures by broadening the failure condition to include
$warningCount -gt 0. The corresponding Pester tests in Invoke-YamlLint.Tests.ps1 were updated to reflect strict mode expectations.Soft-Fail Policy
Linting jobs enforce strict failures (
soft-fail: false):main.ymlpr-validation.ymlsoft-fail: falsesoft-fail: falsesoft-fail: falsesoft-fail: falsesoft-fail: falsesoft-fail: falseTest and documentation jobs remain advisory (
soft-fail: true) to avoid blocking PRs on infrastructure test flakiness or non-critical doc checks:main.ymlpr-validation.ymlsoft-fail: truesoft-fail: truesoft-fail: truesoft-fail: truesoft-fail: truesoft-fail: trueDocumentation and Tooling
lint:shandlint:pyscripts and updatedlint:allto include themType of Change
Component(s) Affected
infrastructure/terraform/prerequisites/- Azure subscription setupinfrastructure/terraform/- Terraform infrastructureinfrastructure/setup/- OSMO control plane / Helmworkflows/- Training and evaluation workflowstraining/- Training pipelines and scriptsdocs/- DocumentationTesting Performed
Documentation Impact
Bug Fix Checklist
Checklist