Repository navigation
ci: analyze sources with zsh-lint in observe mode - #210
Conversation
Add zsh-lint.json for the plugin's six source roots and an observe-mode caller of the organization zsh-lint workflow, pinned to zsh-lint v1.6.0. Closes #209
PR highlighting performance
Negative differences are faster. Medians use nine parses after one warm-up on the same runner. Behavioral assertions
|
ss-o
left a comment
There was a problem hiding this comment.
Fallback review under ADR-0026: Copilot request not registered on 74ff6ed
Findings
No actionable findings.
One observation, not adopted: zsh-n.yml, trunk-check.yml and zunit.yml also run on v*.*.* tag pushes, while zsh-lint.yml runs only on main pushes and pull requests. A release tag points at a commit already analyzed on main, and this check is advisory, so a tag trigger would repeat the same result. No change.
Scope: the complete diff of 74ff6ed: the new zsh-lint.json and .github/workflows/zsh-lint.yml, against #209.
Note
This fallback review is not an approval to merge.
Validation
- Passed: every check on this head, including Configured Zsh Lint in observe mode: 58 files, 0 parser errors, 0 errors, 0 warnings, 53 info, 5 hint. Its
diagnostics.jsonis byte-identical to the judged local run atmain1e36df5. - Passed, rerun independently: the organization runner in observe mode on this head (same counts), and both native reproductions behind the true positives listed in the description (
emulatestatus 1 withlocaloptionsoff underIFS=:andxtrace; region8 0instead of8 8for a word ending in@). - Unavailable: a Copilot review; the request did not register on this head.
Checklist verdicts and supporting evidence
- Configuration: correct. Schema version 2.
minimum_zsh5.8 matches the README,AGENTS.mdand the Zsh 5.8 job inzsh-n.yml. Identifierfshgives the documentedfsh_,_fsh_andfsh_plugin_unloadnames.chroma/is put onfpathand autoloaded by the entrypoint, so theautoload-functionprofile matches its use. All 58 Zsh production sources are covered;themes/,share/,docs/andtests/are excluded. - Workflow: correct. The organization reusable workflow is referenced at
@mainunder ADR-0042, and the analyzer is pinned by full SHA. The six literal paths equal the configuration roots. Permissions arecontents: read, concurrency matches the repository's other workflows, and the path filters cover every analyzed root plus the workflow and configuration files. - Code scanning: the CodeQL
actions/unpinned-tagalert on the@mainreference is answered with the ADR-0042 reason, dismissed as won't fix, and its thread is resolved, as the workflow contract directs. - Description: accurate. The per-rule counts match the runner output, and each judged-sample location was checked against the source.
- Compatibility and lifecycle: no impact. No plugin, theme or chroma source changes.
Limits and follow-up
The true positives in existing sources (the subversion chroma argument shift, the xtrace emulate initializer at two sites, one [ ] condition) are outside this pull request and are recorded for separate follow-up.
Pull request
Summary
zsh-lint.json(configuration schema version 2): kindplugin, minimum Zsh5.8, identifierfsh.F-Sy-H.plugin.zshandlibare sourced libraries;functionsandchromaare autoload functions;completionsare autoloaded completion functions;toolsholds standalone executables..github/workflows/zsh-lint.yml, an observe-mode caller of the organizationzsh-lint.ymlworkflow atmain, with the analyzer pinned to v1.6.0 (f6341241c398fd2a784452e75895dafb06186bbc) and the same six literal roots.Observe mode reports findings without failing the job; parser errors, invalid configuration, incomplete reports and tool failures still fail it. The check is not required, and the native syntax and ZUnit workflows are unchanged.
Closes #209
Findings at
main1e36df558 files, 0 parser errors, 0 errors, 0 warnings, 53 info, 5 hint. Every finding was checked against the source; the true positives were confirmed with
zsh -fon Zsh 5.9.2.quoting/unquoted-varsecurity/evalplugin/function-namespaceplugin/function-scoped-optionsstyle/prefer-double-bracketsJudged sample:
quoting/unquoted-var:${(M)_fsh_state[chroma-...]%\%*}atlib/highlight.zsh:678and${_fsh_styles[...]:#none}atlib/highlight.zsh:1188are optional arguments meant to drop when empty;${${(s.:.)widgets[$cur_widget]}[2,3]}atF-Sy-H.plugin.zsh:481must stay unquoted to pass two arguments;$__start_pos,$__end_posandreturn $rethold numbers that are never empty.security/eval: the widget stubs atF-Sy-H.plugin.zsh:477and:482quote every interpolated name with(q);lib/lifecycle.zsh:648andfunctions/fsh_theme:532restore declarations Zsh generated from in-process state.plugin/function-namespace:_zsh_highlight(F-Sy-H.plugin.zsh:253,lib/lifecycle.zsh:610) is the zsh-syntax-highlighting compatibility entry point.quoting/unquoted-var:chroma/_fsh_chroma_subversion:63. For a word ending in@,$revis empty and is dropped, so_fsh_chroma_subversion_parse_revisionreceives shifted arguments and adds the region8 0styled as a number where the quoted form adds an empty8 8region.plugin/function-scoped-options:chroma/_fsh_chroma_ssh:20andfunctions/fsh_theme:14. Withxtraceon and an inheritedIFSthat lacks a space,${=${options[xtrace]:#off}:+-o xtrace}stays one word,emulatefails with status 1, andlocaloptionsstays off.style/prefer-double-brackets:chroma/_fsh_chroma_zi:284uses[ ... ].This pull request does not change those sources. The true positives are recorded for separate follow-up.
Verification
automation/ci/zsh_lint_ci.pyfrom z-shell/.githubmain) in observe mode, with this configuration, on this branch:passed, with the counts above. Its diagnostics are byte-identical to the judged run atmain1e36df5.zsh-lint --config zsh-lint.jsonrun resolves every input to a configured source root.zsh-lint-survey -judgeagrees withzsh -f -non all 58 files;-trace-parsescounts 102 parses, maximum adapter depth 10.trunk check --no-fix --ci zsh-lint.json .github/workflows/zsh-lint.yml: no issues.Zsh Lintcheck on this head is the remaining acceptance evidence.Compatibility and lifecycle
No compatibility or lifecycle impact: no plugin source, theme or chroma function changes.
Agent handoff
No handoff needed.