Skip to content

CI does not enforce formatting/lint (fourmolu, cabal-fmt, hlint) #72

Open

Description

@Emmanuel-Tyty

Gap found while working through the Month 2 roadmap item 'Update CI'.

flake.nix defines a pre-commit flake check (ormolu, cabal-fmt, nixfmt) intended to run locally as a git pre-commit hook, and CONTRIBUTING.md states: 'They are run automatically as pre-commit hooks, but CI will run them again and expect that to be a no-op.'

That is currently not true: .github/workflows/haskell.yml only builds/tests with cabal, it never runs nix flake check or any lint/format tool. So a PR with unformatted code or hlint violations can merge as long as it builds and tests pass, contradicting CONTRIBUTING.md and silently relying on contributors having pre-commit hooks installed locally.

Note: the hook already uses ormolu (ormolu.enable = true in flake.nix), not fourmolu — fourmolu.yaml at the repo root is dead config, never actually wired to the hook.

Proposed fix:

  • Add a CI job that runs the existing checks.pre-commit flake output (nix flake check) so formatting is enforced without requiring local hooks
  • Add an hlint CI step (hlint is already available in the nix devShell, per .hlint.yaml)
  • Update CONTRIBUTING.md if the enforcement mechanism changes

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions