Enhance pre-commit config and modernize CI workflow#1
Conversation
Add comprehensive validation hooks for Shell, Fish, Python, YAML, and Vim files. Replace custom CI jobs with official pre-commit action for consistent validation locally and in CI. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
.github/workflows/ubuntu-latest.yml
Outdated
| uses: actions/cache@v4 | ||
| with: | ||
| path: ~/.cache/pre-commit | ||
| key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }} |
There was a problem hiding this comment.
Cache key missing linter configuration files
Medium Severity
The cache key only includes .pre-commit-config.yaml, but several hooks reference external config files (linters/.yamllint and linters/.config/flake8). When these linter configs change, the cache won't invalidate, causing CI to run with stale configurations while local pre-commit runs use the updated configs. This creates inconsistent validation behavior.
- fish-shop/syntax-check is a GitHub Action, not a pre-commit hook - Replace with local hook using 'fish --no-execute' - Replace daveparsonsdev/pre-commit-vint (mutable master ref) with local hook - Local vint hook uses additional_dependencies to install vim-vint [anthropic/claude-opus-4-5]
- Replace flake8 with ruff (linting + formatting) - Remove vint (incompatible with Python 3.14) - Remove extraterm scripts (no longer used) - Exclude third-party files (__bass.py, ipython_config.py) - Add check-merge-conflict, check-json, check-toml hooks - Update README with current hook list [anthropic/claude-opus-4-5]
- Fix bash syntax in setup-generic (was using fish 'set' syntax) - Disable yamllint key-ordering rule (too strict) - Increase yamllint line-length to 120 - Install fish in CI workflow for syntax checking - Use Python 3.13 in CI (3.14 has compatibility issues) - Improve cache key for pre-commit [anthropic/claude-opus-4-5]
- Remove +x from config files that shouldn't be executable - Fix markdown formatting (blank lines around headings/code blocks) [anthropic/claude-opus-4-5]
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| hooks: | ||
| - id: ruff | ||
| args: ['--fix'] | ||
| - id: ruff-format |
There was a problem hiding this comment.
Missing vint hook removes Vim linting from CI
Medium Severity
The PR description claims to add "Vim script linting (vint) - validates .vim files and vimrc", but no vint hook is present in .pre-commit-config.yaml. Meanwhile, the old vimlint CI job that ran on vim/.vimrc is being removed. This causes a regression where Vim files in the repository (.vim/vimrc, .vim/autoload/pathogen.vim, etc.) are no longer validated.


Summary
.pre-commit-config.yamlfor Shell, Fish, Python, YAML, and Vim filesChanges
Enhanced Pre-commit Configuration
Added new validation hooks:
linters/.yamllintconfig.shfiles.fishfileslinters/.config/flake8config.vimfiles andvimrcModernized CI Workflow
pre-commit/action@v3.0.1pull_requesttrigger for PR validationDocumentation
Benefits
✅ Comprehensive validation covering all file types in the repository
✅ Consistent validation locally and in CI
✅ Faster CI runs with environment caching
✅ Reuses existing linter configurations from
linters/directory✅ Simplified workflow maintenance (single pre-commit action vs multiple custom jobs)
Test plan
pre-commit run --all-filespasses locally🤖 Generated with Claude Code
Note
Medium Risk
Moderate risk because it changes CI gates and adds auto-fixing linters (e.g.,
ruff --fix) that can rewrite files and potentially cause new CI failures until the repo conforms.Overview
Adopts
pre-commitas the primary validation layer by adding a new.pre-commit-config.yamlwith broader checks (shebang/executable sanity, YAML/JSON/TOML validation,shellcheck, fish syntax via a local hook,rufflint+format,yamllint,markdownlint,gitleaks, and conventional commit enforcement).Simplifies and modernizes CI by replacing the prior fish/vim lint jobs with a single
pre-commitGitHub Actions workflow, addingpull_requesttriggering, and caching~/.cache/pre-commit.Also removes legacy Extraterm helper scripts from
.config/fish/extraterm/, tweakslinters/.yamllintto relaxkey-orderingand set line length to 120, updatesREADME.mdwith pre-commit usage docs, and fixes minor bash correctness insetup-generic(env var export + quoting for krew installer variables).Written by Cursor Bugbot for commit d7f427a. This will update automatically on new commits. Configure here.