Goal
Set up cheap CI gates and pre-commit hooks so style/typo/syntax issues are caught before review.
What lands here
GitHub Actions (.github/workflows/lint.yml) - 5 cheap jobs only:
typos (crate-ci/typos) with _typos.toml ignoring HBN subject IDs and EEG jargon
actionlint (workflow YAML lint)
yamllint (.yamllint.yml)
markdownlint (.markdownlint.json, excludes derivatives/)
matlab-syntax: matlab-actions/setup-matlab + checkcode over src/matlab/**/*.m, fail only on severe
Local CI (scripts/local_ci.sh) - heavy MATLAB only, NOT in GH Actions:
mh_style + mh_lint (miss_hit) over src/matlab
- MATLAB
checkcode + runtests('tests/matlab') against local EEGLAB + R3 100 Hz BIDS
- Env:
MATLAB_BIN, EEGLAB_PATH, BIDS_ROOT
Pre-commit (.pre-commit-config.yaml):
- File hygiene (trailing-ws, EOF, large-file 1 MB, line-endings); skips
.set/.fdt/.bdf/.edf/.mat
- typos, yamllint, markdownlint
- ruff + ruff-format (only fires on staged
.py)
mh_style --fix + mh_lint (MATLAB, no MATLAB binary needed)
Why split GH vs local
MATLAB licensing on GH Actions is fine for checkcode (syntax only). Anything that needs EEGLAB plugins on real BDF data must run locally where we have the licensed install and the 100 Hz R3 dataset. Keeps CI minutes cheap and feedback fast.
Out of scope (separate issue)
- 30-second test fixture from real R3 BDF for runtests in
scripts/local_ci.sh. Separate issue tracks that.
Acceptance
Goal
Set up cheap CI gates and pre-commit hooks so style/typo/syntax issues are caught before review.
What lands here
GitHub Actions (
.github/workflows/lint.yml) - 5 cheap jobs only:typos(crate-ci/typos) with_typos.tomlignoring HBN subject IDs and EEG jargonactionlint(workflow YAML lint)yamllint(.yamllint.yml)markdownlint(.markdownlint.json, excludesderivatives/)matlab-syntax:matlab-actions/setup-matlab+checkcodeoversrc/matlab/**/*.m, fail only on severeLocal CI (
scripts/local_ci.sh) - heavy MATLAB only, NOT in GH Actions:mh_style+mh_lint(miss_hit) oversrc/matlabcheckcode+runtests('tests/matlab')against local EEGLAB + R3 100 Hz BIDSMATLAB_BIN,EEGLAB_PATH,BIDS_ROOTPre-commit (
.pre-commit-config.yaml):.set/.fdt/.bdf/.edf/.mat.py)mh_style --fix+mh_lint(MATLAB, no MATLAB binary needed)Why split GH vs local
MATLAB licensing on GH Actions is fine for
checkcode(syntax only). Anything that needs EEGLAB plugins on real BDF data must run locally where we have the licensed install and the 100 Hz R3 dataset. Keeps CI minutes cheap and feedback fast.Out of scope (separate issue)
scripts/local_ci.sh. Separate issue tracks that.Acceptance
lint.ymlgreen on PRpre-commit run --all-filescleanscripts/local_ci.shruns locally without MATLAB errors (with emptysrc/matlabearly on, smoke tests added later)