Wire tommy as conformist TOML formatter + codegen linter#171
Open
friedenberg wants to merge 3 commits into
Open
Wire tommy as conformist TOML formatter + codegen linter#171friedenberg wants to merge 3 commits into
friedenberg wants to merge 3 commits into
Conversation
- conformist.toml: add [formatter.tommy] (tommy fmt over *.toml) and [linter.tommy-codegen] (whole-tree check + repair driving `tommy generate` for sweatfile.go's //go:generate directive). The codegen repair regenerates sweatfile_tommy.go, so it lands in the `conformist --commit` chore. - flake.nix: add a self-gating conformist-tommy-codegen driver (skips when tommy/go are off PATH) and put it + tommy on the conformistFmt wrapper and devshell PATH so `just fmt` / `just lint-fmt` (which run conformist in the devshell) resolve both the formatter and the linter.
Use command="true" for the check so conformist check never reports false codegen drift (tommy generate --check compares against tommy's raw render, which can diverge from the formatter-post-processed committed file). The repair-command still regenerates so codegen lands in the conformist --commit chore; true staleness stays gated by just gen-tommy.
Replace the inline codegen driver with tommy.packages.${system}.conformist-tommy-codegen,
so the tommy flake (the pinned input) resolves which tommy backs the codegen
linter. conformist.toml is unchanged (the binary name is the same).
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.
conformist.toml: add[formatter.tommy](tommy fmtover*.toml) and[linter.tommy-codegen]. The linter's repair regeneratesinternal/sweatfile/sweatfile_tommy.goviatommy generateso it lands in theconformist --commitchore; the check is a no-optruesoconformist checknever reports false codegen drift (true staleness stays gated byjust gen-tommy).flake.nix: put tommy + the codegen driver on theconformistFmtwrapper and devShell PATH sojust fmt/just lint-fmt(which run conformist in the devshell) resolve both. The driver is sourced from the tommy flake (tommy.packages.<system>.conformist-tommy-codegen), so the pinned tommy input resolves which tommy backs it.Depends on amarbel-llc/tommy#136. Not validated with
nixin the authoring environment.https://claude.ai/code/session_01HWabFkHATxynhaY8LB4wF9
Generated by Claude Code