SRE-3706 Submodule framework, shellcheck and codespell#4
Conversation
Add framework to run checks from consumer repos using this as a submodule. Add shellcheck as the first integrated linter to validate framework. Add pre-commit and GitHub guardrails for .code-checking-ref override usage - .github/workflows/bootstrap-checks.yml: updated to run bootstrap check via framework. - .github/workflows/checks.yml: Added to run the code checking via framework. - .pre-commit-hooks.yaml: hook definitions updated (guard + runner entrypoint) - .pre-commit-config.yaml: local hook config updated (guard + runner entrypoint) - README.md updated links to detailed integration/rules guidance - bin/ bootstrap-windows-dev.ps1: added pre-commit to bootstrap ide-workspace-setup.py: updated. run-linters.sh, run-linters.ps1: updated for shared orchestration and ref checks setup-dev.ps1 and setup-dev.sh: added pre-commit installation. setup-github-workflow.sh: setup work flow for submodule users sync-consumer.*: For initial setup of submodule consumer. - checks/ detect-linters.* and linters/shellcheck/run.*: framework wiring - checks/ ensure-code-checking-ref.sh, ensure-code-checking-ref.ps1, guard-code-checking-ref.sh, ensure-linter-tools.sh: added verify-executable-modes.sh: Check execute permissions. - docs/ integration.md: code-checking-ref usage guidance added. linters.md, usage.md: updated - ide/reference/recommended_settings.yml: Shelllcheck fix for GitHub Copilot interaction problem. - vscode-project-words.txt: More words added. Signed-off-by: John E. Malmberg <john.malmberg@hpe.com>
Signed-off-by: John E. Malmberg <john.malmberg@hpe.com>
ab91407 to
fe68745
Compare
Extend the shared linter framework with baseline text-focused checks. Added linters/checks: - codespell - text-hygiene (trailing whitespace and final newline) - filename-portability (non-ASCII filename guard) Also keep shellcheck in the same runner orchestration path and update pre-commit wiring to run the shared changed-file linter selection. Files updated: - .github/workflows/checks.yml - install codespell with shellcheck in CI dependency step - .pre-commit-hooks.yaml - .pre-commit-config.yaml - use shared basic source linter hook entrypoint - bin/run-linters.sh - bin/run-linters.ps1 - route selected linters to per-linter executors - checks/detect-linters.sh - checks/detect-linters.ps1 - select Wave A linters from changed file set - checks/ensure-linter-tools.sh - add codespell tool preflight check - checks/linters/codespell/run.sh - checks/linters/codespell/run.ps1 - checks/linters/text-hygiene/run.sh - checks/linters/text-hygiene/run.ps1 - checks/linters/filename-portability/run.sh - checks/linters/filename-portability/run.ps1 - add new linter executors - docs/linters.md - document added linter set and preflight mapping - ide/reference/recommended_settings.yml - map .ansible-lint and .yamllint to yaml for VS Code file type Signed-off-by: John E. Malmberg <john.malmberg@hpe.com>
fe68745 to
7d6f28a
Compare
janekmi
left a comment
There was a problem hiding this comment.
I am still in progress but I decided to publish since I noticed you go forward with the development. I am sorry if you did not expect reviewers to come at this time.
Note: I left all *.ps1 files to our PowerShell experts.
Added a setup-dev.sh smoke test to validate that it works on macOS. Signed-off-by: John E. Malmberg <john.malmberg@hpe.com>
JohnMalmberg
left a comment
There was a problem hiding this comment.
This was supposed to be the second of two separate PRs to reduce the number of lies changed in this review, but in my haste to get it committed before I left int actually contains both PRs and I started applying the fixes before I realized that it was both PRs.
I also did not have a chance to run the unit tests on this PR on a consumer repository.
New update pushed.
Signed-off-by: John E. Malmberg <john.malmberg@hpe.com>
Signed-off-by: John E. Malmberg <john.malmberg@hpe.com>
Missed all the reviewer comments because I did not expand the large diff. Signed-off-by: John E. Malmberg <john.malmberg@hpe.com>
JohnMalmberg
left a comment
There was a problem hiding this comment.
Hopefully the current push addresses all the concerns.
Missed these on the previous pass.
Signed-off-by: John E. Malmberg <john.malmberg@hpe.com>
|
Code has now been tested with https://github.com/daos-stack/system-pipeline-lib/actions/runs/24850838716/job/72750526068?pr=21 and got the expected results that the override to use this PR instead of tip of main is present. |
Signed-off-by: John E. Malmberg <john.malmberg@hpe.com>
Believe all requested changes have been resolved.
|
Apologies for not being able to attend this review till the end. Last week was too busy with other activities for me. |
Add framework to run checks from consumer repos using this as a submodule.
Add shellcheck as the first integrated linter to validate framework.
Add pre-commit and GitHub guardrails for .code-checking-ref override usage
.github/workflows/bootstrap-checks.yml: updated to run linters via framework.
.pre-commit-hooks.yaml: hook definitions updated (guard + runner entrypoint)
.pre-commit-config.yaml: local hook config updated (guard + runner entrypoint)
README.md updated links to detailed integration/rules guidance
bin/ bootstrap-windows-dev.ps1: added pre-commit to bootstrap ide-workspace-setup.py: updated. run-linters.sh, run-linters.ps1: updated for shared orchestration and ref checks setup-dev.ps1 and setup-dev.sh: added pre-commit installation.
checks/ detect-linters.* and linters/shellcheck/run.*: framework wiring
checks/ ensure-code-checking-ref.sh, ensure-code-checking-ref.ps1, guard-code-checking-ref.sh, ensure-linter-tools.sh: added
docs/ integration.md: code-checking-ref usage guidance added. linters.md, usage.md: updated
ide/reference/recommended_settings.yml: Shelllcheck fix for GitHub Copilot interaction problem.
vscode-project-words.txt: More words added.