Skip to content

Add cabal-gild and shellcheck as part of the pre-commit hook in our Nix devShell.#5653

Merged
lehins merged 1 commit intomasterfrom
koslambrou/add-cabal-gild-pre-commit-hook-nix
Mar 21, 2026
Merged

Add cabal-gild and shellcheck as part of the pre-commit hook in our Nix devShell.#5653
lehins merged 1 commit intomasterfrom
koslambrou/add-cabal-gild-pre-commit-hook-nix

Conversation

@koslambrou
Copy link
Contributor

Description

Using pre-commit run --all-files will now run cabal-gild (as well as fourmolu) on all modified files.

Checklist

  • Commits in meaningful sequence and with useful messages.
  • Tests added or updated when needed.
  • CHANGELOG.md files updated for packages with externally visible changes.
    NOTE: New section is never added with the code changes. (See RELEASING.md).
  • Versions updated in .cabal and CHANGELOG.md files when necessary, according to the
    versioning process.
  • Version bounds in .cabal files updated when necessary.
    NOTE: If bounds change in a cabal file, that package itself must have a version increase. (See RELEASING.md).
  • Code formatted (use scripts/fourmolize.sh).
  • Cabal files formatted (use scripts/cabal-format.sh).
  • CDDL files are up to date (use scripts/gen-cddl.sh)
  • hie.yaml updated (use scripts/gen-hie.sh).
  • Self-reviewed the diff.

@koslambrou koslambrou requested a review from neilmayhew March 18, 2026 18:56
@koslambrou koslambrou requested a review from a team as a code owner March 18, 2026 18:56
@koslambrou koslambrou force-pushed the koslambrou/add-cabal-gild-pre-commit-hook-nix branch from 6539d8a to 110ecf8 Compare March 19, 2026 12:35
Copy link
Contributor

@aniketd aniketd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Thank you! 🙌

Copy link
Contributor

@neilmayhew neilmayhew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! I tested it locally and it works well. Thanks for doing this.

We should also consider enabling other tools in pre-commit. In cardano-ledger-release-tool I also have nixpkgs-fmt, shellcheck and hlint enabled.

@lehins lehins enabled auto-merge March 20, 2026 13:53
@koslambrou koslambrou force-pushed the koslambrou/add-cabal-gild-pre-commit-hook-nix branch from 110ecf8 to 2cfe8d0 Compare March 20, 2026 18:07
@koslambrou koslambrou changed the title Add cabal-gild as part of the pre-commit hook in our Nix devShell. Add cabal-gild, shellcheck and nixpkgs-fmt as part of the pre-commit hook in our Nix devShell. Mar 20, 2026
@koslambrou koslambrou force-pushed the koslambrou/add-cabal-gild-pre-commit-hook-nix branch 2 times, most recently from 006e46e to f9a5f71 Compare March 20, 2026 18:23
Copy link
Contributor

@neilmayhew neilmayhew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Only one small change needed.

I'm glad to see our nix formatting cleaned up, especially since it was done inconsistently in different time periods. I've been wanting someone to do this for a while.

@koslambrou koslambrou force-pushed the koslambrou/add-cabal-gild-pre-commit-hook-nix branch from f9a5f71 to 9a06606 Compare March 20, 2026 18:40
@koslambrou koslambrou requested a review from neilmayhew March 20, 2026 18:41
@koslambrou koslambrou force-pushed the koslambrou/add-cabal-gild-pre-commit-hook-nix branch from 9a06606 to dda0462 Compare March 20, 2026 21:35
…ur Nix devShell.

Using `pre-commit run --all-files` will now run `fourmolu`,
`cabal-gild` and `shellcheck` on all modified files.

Did not add `hlint` for now because there are *lots* of warnings that
will take time to fix.
@koslambrou koslambrou force-pushed the koslambrou/add-cabal-gild-pre-commit-hook-nix branch from dda0462 to 7c24652 Compare March 20, 2026 21:36
@koslambrou koslambrou changed the title Add cabal-gild, shellcheck and nixpkgs-fmt as part of the pre-commit hook in our Nix devShell. Add cabal-gild and shellcheck as part of the pre-commit hook in our Nix devShell. Mar 20, 2026
@lehins lehins merged commit 9302c04 into master Mar 21, 2026
125 of 126 checks passed
@lehins lehins deleted the koslambrou/add-cabal-gild-pre-commit-hook-nix branch March 21, 2026 00:04
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.

4 participants