Skip to content

Conversation

@sugan0tech
Copy link
Member

@sugan0tech sugan0tech commented Aug 19, 2025

This PR updates pre-commit policies for file size and commit message issue references.

Changes

  • Line count: warn above 500 lines; error above 750 lines.
  • Issue reference: convert from hard error to warning when no #<num> is present.
  • Case-insensitive exemptions for Merge/Revert and release/bump commits.
  • Updated hook names/descriptions and documentation to match behavior.

Files

  • scripts/line_count_check.sh
  • scripts/require_issue_ref.sh
  • .pre-commit-config.yaml
  • CONTRIBUTING.md

Rationale

  • Reduce friction on commits while still nudging best practices.
  • Allow larger files within reason; keep a hard stop at 750+ lines.

Refs #34

@sugan0tech sugan0tech requested a review from aslamcodes August 19, 2025 19:01
@ssanumand
Copy link
Member

@sugan0tech, while I appreciate the changes, I also think we're creating more resistance for the open source contributors with all these rules. What's your opinion?

@sugan0tech
Copy link
Member Author

@sugan0tech, while I appreciate the changes, I also think we're creating more resistance for the open source contributors with all these rules. What's your opinion?

Agreed with your concerns, if we start to maintain these hygenes from the start will be feastable. and for the external contributors we have to consider them as black blox, for a genuine contributors these are the typical standards has to be followed. As with my previous experience each oss tools comes with their own set of guidelines integration multiple platform. Where as ours is all in github that's a advantage. But these remains a mandatory requiremet. Also that's why i had it as warning to a extent then it's an error for the file size case.

@sugan0tech
Copy link
Member Author

If required i can make the commit issue reference can be a warning instead of a commit blocker. And with my recent talke with @venkatsp17 the EOF file validator is quite annoying, need to to make it auto apply at commit instead of doing a redo.

@sugan0tech sugan0tech requested a review from a team August 20, 2025 08:06
@venkatsp17
Copy link
Contributor

Yeah, It must be auto-fixed in code editor instead of Pass check @sugan0tech.

@venkatsp17
Copy link
Contributor

Apart from that I appreciate adding issue number with comment is to be mandatory and not case sensitive, Because I feel it would easy to track out commits when application scales.

@ssanumand
Copy link
Member

@sugan0tech, I agree with you, automating fixes for these checks instead of showing warnings/errors to the user is the right approach.

If this is the case, I'm not as concerned as before. Good work guys. 👏

@MSHRISH
Copy link

MSHRISH commented Aug 21, 2025

Irunga da dai, Github paduchutu varan onumea purla 😭

@sugan0tech
Copy link
Member Author

hile I appreciate the changes, I also think we're creating more resistance for the open source contributors with all these rules. What's your opinion?

if LGTM naah approve please.

…Warn above 500 lines; error above 750 lines.\n- Downgrade missing issue reference from error to warning.\n- Make exemptions (merge/revert/release bump) case-insensitive.\n\nRefs #34
@ssanumand
Copy link
Member

Sorry for the delay, I'll approve the changes.

@ssanumand
Copy link
Member

It's up to @venkatsp17 and @aslamcodes. Guys, please review and approve.

@sugan0tech sugan0tech changed the title chore(pre-commit): require issue reference in commit messages chore(pre-commit): line-count 500/750; warn on issue refs Aug 21, 2025
@sugan0tech sugan0tech removed the request for review from venkatsp17 August 25, 2025 11:32
@venkatsp17 venkatsp17 merged commit e687deb into main Aug 28, 2025
2 checks passed
@venkatsp17 venkatsp17 deleted the chore/34-commit-msg-issue-ref branch August 28, 2025 06:40
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.

6 participants