Skip to content

Add pre-commit hooks guidance to CONTRIBUTING.md#1388

Open
palas wants to merge 2 commits into
masterfrom
document-commit-hook-issues
Open

Add pre-commit hooks guidance to CONTRIBUTING.md#1388
palas wants to merge 2 commits into
masterfrom
document-commit-hook-issues

Conversation

@palas
Copy link
Copy Markdown
Contributor

@palas palas commented Jun 2, 2026

Context

Contributors working outside of the Nix development shell encounter confusing failures from pre-commit hooks (e.g. cabal-gild not found). This documents the requirement and common workarounds.

How to trust this PR

Documentation-only change to CONTRIBUTING.md. No code changes.

Review the diff — it adds a new "Pre-commit hooks" section covering:

  • The Nix shell requirement for hook tools
  • Using --no-verify for WIP commits
  • Workaround for broken builds that prevent entering the Nix shell

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated. See Running tests for more details
  • Self-reviewed the diff
  • Changelog fragment added in .changes/

Copilot AI review requested due to automatic review settings June 2, 2026 01:31
@palas palas self-assigned this Jun 2, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds contributor-facing documentation describing how this repository’s Nix-provided pre-commit hooks behave (and how to work around common failures when not in the Nix dev shell), alongside the required changelog fragment.

Changes:

  • Documented pre-commit hook requirements and common workarounds in CONTRIBUTING.md.
  • Added a .changes/ documentation fragment for the update.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
CONTRIBUTING.md Adds a new “Pre-commit hooks” section explaining the Nix shell dependency and suggested workarounds.
.changes/20260602_013028_cardano-cli_pablo.lamela_document_commit_hook_issues.yml Changelog fragment recording the documentation update.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .changes/20260602_013028_cardano-cli_pablo.lamela_document_commit_hook_issues.yml Outdated
Comment thread CONTRIBUTING.md Outdated
Comment thread CONTRIBUTING.md Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Comment thread CONTRIBUTING.md
For packages that we do not control, we can end up in a situation where we have a fork that looks like it will be long-lived or permanent (e.g. the maintainer is unresponsive, or the change has been merged but not released).
In that case, release a patched version to the [CHaP repository][CHaP], which allows us to remove the `source-repository-package` stanza.

## Pre-commit hooks
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggestion: use one sentence per line. Would be more diff friendly.

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.

3 participants