Skip to content

Wire tommy as conformist TOML formatter + codegen linter#171

Open
friedenberg wants to merge 3 commits into
masterfrom
claude/tommy-conformist-formatter-ps21a7
Open

Wire tommy as conformist TOML formatter + codegen linter#171
friedenberg wants to merge 3 commits into
masterfrom
claude/tommy-conformist-formatter-ps21a7

Conversation

@friedenberg

Copy link
Copy Markdown
Contributor
  • conformist.toml: add [formatter.tommy] (tommy fmt over *.toml) and [linter.tommy-codegen]. The linter's repair regenerates internal/sweatfile/sweatfile_tommy.go via tommy generate so it lands in the conformist --commit chore; the check is a no-op true so conformist check never reports false codegen drift (true staleness stays gated by just gen-tommy).
  • flake.nix: put tommy + the codegen driver on the conformistFmt wrapper and devShell PATH so just 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 nix in the authoring environment.

https://claude.ai/code/session_01HWabFkHATxynhaY8LB4wF9


Generated by Claude Code

claude added 3 commits June 13, 2026 20:53
- 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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants