Teach Checkrun merge-hook fragment filetypes#30
Merged
Conversation
Summary Add registry coverage for dot merge-hook fragment suffixes so Checkrun can project stable editor language associations for VS Code and Neovim. - map SSH fragments to the VS Code `ssh_config` language via the shared `sshconfig` filetype - map hgrc-style Sapling fragments to `ini`, avoiding false Git config lint failures while still giving editors syntax highlighting - map text fragment suffixes and legacy agent-rule target `.conf` paths to plaintext - cover preferred and legacy suffixes in capabilities, registry, and Neovim adapter tests Testing - `checkrun format share/checkrun/registry.json test/suites/capabilities-test test/suites/nvim-test test/suites/registry-test` - `checkrun lint share/checkrun/registry.json test/suites/capabilities-test test/suites/nvim-test test/suites/registry-test` - `test/suites/capabilities-test && test/suites/registry-test && test/suites/nvim-test` - `test/checkrun-test`
Summary Teach Checkrun to treat tab-separated fragment files as text so generated editor settings classify dot merge-hook TSV sources without renaming them away from their common data-file suffix. - map `*.tsv` to Checkrun's text filetype and VS Code plaintext projection - cover the capability surface and registry planning for representative TSV fragments Testing - `test/suites/capabilities-test && test/suites/registry-test` - `checkrun lint share/checkrun/registry.json test/suites/capabilities-test test/suites/registry-test` - `test/checkrun-test`
Summary Expand the registry with conservative editor filetype associations from VS Code and common built-in editor conventions so Checkrun, Neovim, and downstream editor projection share the same vocabulary. Keep broad or risky associations out of the registry: generated lockfiles are not treated as normal format targets, snippets are not forced away from their native language, and generic conf files are left alone so existing path-scoped merge-hook compatibility remains intact. Update registry inference so exact filenames win first, narrow glob associations can override generic suffixes, and generic extensions remain the fallback. This makes json theme/config suffix associations effective instead of relying on json and jsonc currently selecting the same tools. Testing - test/suites/capabilities-test - test/suites/registry-test - test/suites/nvim-test - checkrun lint share/checkrun/registry.json test/suites/capabilities-test test/suites/registry-test test/suites/nvim-test lib/checkrun/registry.py - registry ordering check for extension, filename, and pattern mappings - test/checkrun-test - fresh-eyes subagent review
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.
Summary
Add Checkrun registry coverage for dot merge-hook fragment suffixes and common editor filetype associations so Checkrun, Neovim, VS Code projection, and other repositories share one durable language vocabulary.
This maps:
*.ssh_configand legacy*.ssh-configto thessh_configVS Code languageiniinstead of Git config, avoiding false lint failures on valid hgrc hook keys.confpaths to plaintext.env,.clang-format,.gitignore,.npmrc,.flake8,settings.json,tasks.json,devcontainer.json,Pipfile, and VS Code workspace/profile/theme configuration names*.jsonl, alternate Markdown extensions,*.dockerfile,*.containerfile,*.properties, and common ignore/properties-style config suffixesThe registry intentionally avoids broad or risky mappings: generic
.confremains unmapped, generated lockfiles are not routed through normal format selectors, and.code-snippetsis left to its native VS Code snippets language.This also updates Checkrun filetype inference so exact filenames win first, narrow glob patterns can override generic extensions, and generic extensions remain the fallback. That makes patterns such as
*color-theme.jsonand*language-configuration.jsonresolve as JSONC instead of being shadowed by.json.Testing
checkrun format share/checkrun/registry.json test/suites/capabilities-test test/suites/nvim-test test/suites/registry-testcheckrun lint share/checkrun/registry.json test/suites/capabilities-test test/suites/nvim-test test/suites/registry-testcheckrun lint share/checkrun/registry.json test/suites/capabilities-test test/suites/registry-test test/suites/nvim-test lib/checkrun/registry.pytest/suites/capabilities-testtest/suites/registry-testtest/suites/nvim-testtest/checkrun-test