Repository navigation
Lint: typos, oxlint and ShellCheck in CI and the hook (sc-9611) - #261
Open
ndbroadbent wants to merge 2 commits into
Open
ndbroadbent wants to merge 2 commits into
ndbroadbent wants to merge 2 commits into
Conversation
…(typos -w fixes and stages); the hook runs one tool at a time (sc-9611) Starts green: two endsWith fixes (scripts/screenshots/lightbox.mjs), cp -R and a here-string in place of grep -q in a pipe (visual.sh, on-dev). _typos.toml allows the domain words (PNGs, BRIN, FlateDecode, DecodeParms), the test inputs misspelled on purpose and possessive identifiers. .oxlintrc.json turns off no-control-regex for the gallery's URL checks (on purpose) and no-empty-file for Sprockets' manifest. scripts/ci/shellcheck.sh checks every shell script, found by shebang.
…iberate misspellings only where they occur; hook lints .astro and shellchecks only staged scripts (review)
This branch has not been deployed
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.
Fifth PR for sc-9611. It's stacked on #259.
New checks in CI's
securityjob and the pre-commit hook (mise.toml pins them):_typos.toml). The hook runstypos -w, which fixes what it's sure of and stages the result..oxlintrc.json,--deny-warnings).scripts/ci/shellcheck.sh). Until now only the orb's scripts and the workflows'run:blocks were checked.It starts green:
_typos.tomlallows each kind with its reason:café;thresold,APP_S3_REGOIN,MYAPP_DATABSE_POOL), which check that typos in settings get caught;unparseable, which is valid English;close_the_branchs_builds). Renaming those would touch app code other sessions are working in.endsWithfixes inscripts/screenshots/lightbox.mjs(same behaviour).no-control-regexis off for the gallery'smodel.ts: its URL checks reject control characters on purpose. Done in config, so the gallery files are untouched.no-empty-fileis off for Sprockets' requiredmanifest.js.cp -Rin place ofcp -r(scripts/ci/visual.sh), and a here-string in place of| grep -qunder pipefail (scripts/on-dev).Hook: it now runs one tool at a time. rustfmt and
typos -wboth rewrite staged files, and two fixers on one file in parallel would lose an edit. The whole hook takes about 2 s.Checked in a scratch clone: a staged
.rsfile withteh recieveand bad formatting was committed asthe receive, formatted. A planted/x$/.test(s)made the commit fail on oxlint. Everything passes on the tree.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.