-
Notifications
You must be signed in to change notification settings - Fork 481
feat(ci): Add comprehensive workflow linting and YAML autofo (#33871) #33872
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
spbolton
wants to merge
1
commit into
main
Choose a base branch
from
issue-33871-add-comprehensive-workflow-linting-and-yaml-auto
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
feat(ci): Add comprehensive workflow linting and YAML autofo (#33871) #33872
spbolton
wants to merge
1
commit into
main
from
issue-33871-add-comprehensive-workflow-linting-and-yaml-auto
Conversation
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
1 task
1 task
Contributor
Author
Implementation SummaryThis PR implements a complete workflow linting infrastructure with auto-formatting capabilities. 🎯 Key Features1. Linting Infrastructure
2. Auto-Formatting System
3. Pre-Commit Hook Enhancements (
|
This commit establishes a complete workflow linting infrastructure with auto-formatting capabilities to ensure high-quality, consistent GitHub Actions workflows and prevent syntax errors from being merged. - Add yamllint for YAML syntax validation (.yamllint config) - Add actionlint for GitHub Actions semantic validation (.github/actionlint.yaml) - Add mise.toml configuration for tool management - Add comprehensive linting strategy documentation (docs/core/LINTING_STRATEGY.md) - Add .prettierrc.yml for workflow-specific formatting rules - Integrate prettier auto-formatting into pre-commit hook - Two-tier validation: prettier (auto-fix) → yamllint (validate) - Format all 55 workflow and action files to establish clean baseline - Auto-format YAML files before validation - Run yamllint and actionlint on staged workflow files - Graceful degradation when tools are missing - Re-stage auto-formatted files automatically - Add workflow-lint job to PR validation (cicd_1-pr.yml) - Conditional execution based on workflow file changes - Update change detection filters (.github/filters.yaml) - Update initialize phase to detect workflow changes - Fix all script injection vulnerabilities (use env vars for untrusted input) - Update deprecated actions (checkout@v3→v4, setup-python@v4→v5, etc.) - Update custom actions from node16 to node20 - Fix undefined inputs and invalid references - Fix input default values not matching options - Remove trailing spaces (76 instances) - Normalize spacing and indentation across all workflows - Update docs/core/CICD_PIPELINE.md with workflow linting section - Add docs/core/LINTING_STRATEGY.md (comprehensive 640-line guide) - Complete linting strategy review across all layers - Git hook, frontend, backend, and CI/CD linting analysis - Gap analysis and recommendations for backend Java linting - Migration strategy for enabling additional linting tools ✅ 0 actionlint errors (all 47 issues fixed) ✅ 0 yamllint errors (all formatting issues resolved)⚠️ 108 yamllint warnings (acceptable line-length issues for URLs/JSON/bash) - **Prevention**: Catches workflow errors before merge - **Automation**: Auto-fixes formatting issues before commit - **Consistency**: Ensures uniform YAML formatting across project - **Speed**: Developers get immediate feedback locally - **Quality**: Reduces manual code review overhead - **Security**: Detects script injection vulnerabilities - **Maintenance**: Identifies deprecated actions and patterns This lays the foundation for preventing workflow syntax errors and establishes best practices for maintaining GitHub Actions workflows. 🤖 Generated with Claude Code (https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
05a6319 to
c594d32
Compare
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.
Description
Implements comprehensive workflow linting with yamllint and actionlint, adds prettier auto-formatting for YAML files, integrates with pre-commit hooks and CI/CD pipeline. Establishes clean formatting baseline for all 55+ workflow files with 47 actionlint issues resolved, including script injection fixes, deprecated action updates, and node16→node20 migration.
Changes
Testing
Closes #33871
Issue: Add comprehensive workflow linting and YAML autofo