Skip to content

Add pre-commit hook setup instructions to contributing guide#2882

Merged
koxudaxi merged 3 commits intomainfrom
docs/add-pre-commit-hook-setup
Dec 31, 2025
Merged

Add pre-commit hook setup instructions to contributing guide#2882
koxudaxi merged 3 commits intomainfrom
docs/add-pre-commit-hook-setup

Conversation

@koxudaxi
Copy link
Copy Markdown
Owner

@koxudaxi koxudaxi commented Dec 31, 2025

Summary by CodeRabbit

  • Documentation
    • Updated development contribution guide with new pre-commit hooks setup instructions
    • Reorganized development workflow steps to reflect the updated setup process

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Dec 31, 2025

Warning

Rate limit exceeded

@koxudaxi has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 27 minutes and 34 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 1739427 and 6f438f2.

📒 Files selected for processing (1)
  • docs/development-contributing.md
📝 Walkthrough

Walkthrough

A new pre-commit hooks installation section was added to the development contributing guide before the existing "Create new branch" step. Two commands (uv tool install prek and prek install) were introduced, and all subsequent step numbers were incremented by one.

Changes

Cohort / File(s) Summary
Documentation Update
docs/development-contributing.md
Added new section 5 "Install pre-commit hooks" with setup commands; renumbered steps 6–8+ to 7–9+.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A hop, a skip, through the dev guide we go,
Pre-commit hooks now in a beautiful row!
Step five hops in with prek so fine,
The path to clean code, now perfectly aligned.

Pre-merge checks

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely describes the main change: adding pre-commit hook setup instructions to the contributing documentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 31, 2025

📚 Docs Preview: https://pr-2882.datamodel-code-generator.pages.dev

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Dec 31, 2025

CodSpeed Performance Report

Merging #2882 will not alter performance

Comparing docs/add-pre-commit-hook-setup (6f438f2) with main (294acb6)

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

Summary

✅ 11 untouched
⏩ 98 skipped1

Footnotes

  1. 98 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 31, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.37%. Comparing base (9dc9dd4) to head (6f438f2).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2882   +/-   ##
=======================================
  Coverage   99.37%   99.37%           
=======================================
  Files          92       92           
  Lines       16040    16046    +6     
  Branches     1893     1893           
=======================================
+ Hits        15939    15945    +6     
  Misses         52       52           
  Partials       49       49           
Flag Coverage Δ
unittests 99.37% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
docs/development-contributing.md (1)

32-34: Consider adding context about what pre-commit hooks do.

prek is a Rust-based reimplementation of pre-commit, designed to be a faster, dependency-free and drop-in alternative. The section could benefit from a brief explanation of why contributors need to set up pre-commit hooks—for instance, that they automatically run code quality checks before commits.

You might also mention that this requires a .pre-commit-config.yaml file in the repository that defines which hooks are configured.

🔎 Suggested enhancement
~## 5. Install pre-commit hooks
+## 5. Install pre-commit hooks
+
+Pre-commit hooks automatically run code quality checks before commits.
+
~$ uv tool install prek
~$ prek install
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9dc9dd4 and 1739427.

📒 Files selected for processing (1)
  • docs/development-contributing.md
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (15)
  • GitHub Check: py312-isort6 on Ubuntu
  • GitHub Check: py312-isort7 on Ubuntu
  • GitHub Check: 3.14 on Ubuntu
  • GitHub Check: 3.10 on Ubuntu
  • GitHub Check: 3.10 on Windows
  • GitHub Check: 3.12 on Windows
  • GitHub Check: 3.11 on Ubuntu
  • GitHub Check: 3.11 on Windows
  • GitHub Check: py312-pydantic1 on Ubuntu
  • GitHub Check: py312-isort5 on Ubuntu
  • GitHub Check: py312-black22 on Ubuntu
  • GitHub Check: 3.14 on Windows
  • GitHub Check: 3.13 on Windows
  • GitHub Check: Analyze (python)
  • GitHub Check: benchmarks
🔇 Additional comments (1)
docs/development-contributing.md (1)

36-52: Step numbering is consistent and correct.

The sequential step numbers have been properly incremented throughout to accommodate the new pre-commit hooks installation step.

@koxudaxi koxudaxi enabled auto-merge (squash) December 31, 2025 19:02
@koxudaxi koxudaxi merged commit 20ad1a1 into main Dec 31, 2025
33 checks passed
@koxudaxi koxudaxi deleted the docs/add-pre-commit-hook-setup branch December 31, 2025 19:04
@github-actions
Copy link
Copy Markdown
Contributor

Breaking Change Analysis

Result: No breaking changes detected

Reasoning: PR #2882 only modifies the documentation file docs/development-contributing.md. The changes add pre-commit hook setup instructions for contributors and renumber the development workflow steps. There are no changes to code, CLI options, templates, generated output, or any runtime behavior. This is purely a documentation update for contributors and has no impact on end users of the library.


This analysis was performed by Claude Code Action

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jan 1, 2026

🎉 Released in 0.51.0

This PR is now available in the latest release. See the release notes for details.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant