Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pre-commit hook no longer enforced #45

Open
jstolarek opened this issue Jun 13, 2024 · 1 comment
Open

Pre-commit hook no longer enforced #45

jstolarek opened this issue Jun 13, 2024 · 1 comment
Labels
Ops/CI/CD/Nix Infrastructure and build system

Comments

@jstolarek
Copy link
Contributor

jstolarek commented Jun 13, 2024

It seems that the pre-commit hook no longer works, making it possible to commit code that does not pass pre-commit checks:

[killy@skynet : /dane/projekty/binarapps/trustless-sidechain] git add .
[killy@skynet : /dane/projekty/binarapps/trustless-sidechain] git commit
Aborting commit due to empty commit message.
[killy@skynet : /dane/projekty/binarapps/trustless-sidechain] make format-staged
Creating a git commit object to snapshot the current staged files...
21cefd4fd7e39ab7cb66bf0d47d5fac1008adc19
Formatting `*.hs`...
Loaded config from: /dane/projekty/binarapps/trustless-sidechain/fourmolu.yaml
Formatting `*.cabal`...
Formatting whitespace...
Formatting `*.purs`...
Formatting `*.js`...
Formatting `*.dhall`...
Formatting `*.nix` files...
[killy@skynet : /dane/projekty/binarapps/trustless-sidechain] git st
On branch ETCM-7669-implement-modular-governance
Your branch is ahead of 'origin/ETCM-7669-implement-modular-governance' by 1 commit.
  (use "git push" to publish your local commits)

Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
        modified:   onchain/src/TrustlessSidechain/DParameter.hs
        modified:   onchain/src/TrustlessSidechain/Governance/Admin.hs
        modified:   onchain/src/TrustlessSidechain/PermissionedCandidates.hs
        modified:   onchain/src/TrustlessSidechain/Reserve.hs
        modified:   onchain/src/TrustlessSidechain/Versioning.hs

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   onchain/src/TrustlessSidechain/DParameter.hs
        modified:   onchain/src/TrustlessSidechain/PermissionedCandidates.hs
        modified:   onchain/src/TrustlessSidechain/Versioning.hs

Had I not aborted the commit, I would be able to commit incorrectly formatted files, as witnessed by the fact that make format-stagged re-formatted some of the staged files.


IOG Jira: https://input-output.atlassian.net/browse/ETCM-7677

@jstolarek jstolarek changed the title Commit pre-hook no longer enforced Pre-ommit hook no longer enforced Jun 13, 2024
@jstolarek jstolarek changed the title Pre-ommit hook no longer enforced Pre-commit hook no longer enforced Jun 13, 2024
@jstolarek
Copy link
Contributor Author

Ok, I think we might have actually disabled this on purpose since the new version of the formatter (formoulu?) uses different layout rules, resulting in lots of unnecessary reformatting being done to the code.

@gilligan gilligan transferred this issue from another repository Jul 15, 2024
@jstolarek jstolarek added the Ops/CI/CD/Nix Infrastructure and build system label Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ops/CI/CD/Nix Infrastructure and build system
Projects
None yet
Development

No branches or pull requests

1 participant