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: fail on hlint errors #253

Merged
merged 1 commit into from
Sep 21, 2023
Merged

Conversation

smelc
Copy link
Contributor

@smelc smelc commented Sep 20, 2023

Description

Copy of IntersectMBO/cardano-cli#296 to make the pre-commit hook fail when there are hlint issues that would make the CI fail.

Changelog

- description: |
    Update to the pre-commit script, so that it fails on hlint errors
# uncomment types applicable to the change:
  type:
  # - feature        # introduces a new feature
  # - breaking       # the API has changed in a breaking way
  # - compatible     # the API has changed but is non-breaking
  # - optimisation   # measurable performance improvements
  - improvement    # QoL changes e.g. refactoring
  # - bugfix         # fixes a defect
  # - test           # fixes/modifies tests
  # - maintenance    # not directly related to the code
  # - release        # related to a new release preparation
  # - documentation  # change in code docs, haddocks...

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • NA New tests are added if needed and existing tests are updated. These may include:
    • golden tests
    • property tests
    • roundtrip tests
    • integration tests
      See Runnings tests for more details
  • NA Any changes are noted in the CHANGELOG.md for affected package
  • NA The version bounds in .cabal files are updated
  • CI passes. See note on CI. The following CI checks are required:
    • Code is linted with hlint. See .github/workflows/check-hlint.yml to get the hlint version
    • Code is formatted with stylish-haskell. See .github/workflows/stylish-haskell.yml to get the stylish-haskell version
    • Code builds on Linux, MacOS and Windows for ghc-8.10.7 and ghc-9.2.7
  • Self-reviewed the diff

Note on CI

If your PR is from a fork, the necessary CI jobs won't trigger automatically for security reasons.
You will need to get someone with write privileges. Please contact IOG node developers to do this
for you.

@smelc smelc added the enhancement New feature or request label Sep 20, 2023
@smelc smelc force-pushed the smelc/improve-pre-commit-hook branch from 24457ad to 28a7e1c Compare September 20, 2023 13:04
@smelc smelc requested a review from a team as a code owner September 20, 2023 14:17
@smelc smelc force-pushed the smelc/improve-pre-commit-hook branch from 34438a1 to 1d6cbbd Compare September 21, 2023 07:56
@smelc smelc enabled auto-merge September 21, 2023 07:56
@smelc smelc added this pull request to the merge queue Sep 21, 2023
Merged via the queue into main with commit 34cd3e1 Sep 21, 2023
20 checks passed
@smelc smelc deleted the smelc/improve-pre-commit-hook branch September 21, 2023 08:28
newhoggy pushed a commit that referenced this pull request Sep 21, 2023
…-hook

pre-commit hook: fail on hlint errors
newhoggy pushed a commit that referenced this pull request Mar 11, 2024
…n-build-fails

Fix CI gating when required build steps fail
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants