feat(tools): warn when a pull request adds a technical debt entry over 1000 characters #6757
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/6757"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by LeandroLP23 on 2026-10-16T09:47:32Z.
What
Proposal 2 of #6755. A new
debt-lengthrule intools/check_conventions.py, at warning level: a line a pull request adds or edits indocs/dev/TechnicalDebt.mdordocs/dev/debt/*.mdthat starts an entry (-) and is over 1000 characters is annotated. The annotation asks to state the gap first and keep only the behaviour the gap needs. Warnings don't fail the job:output()already counts only errors.The goal is that an edit shortens an entry instead of extending it. On
mainthe median entry is 564 characters, 177 of 984 are over 1000, and the longest is 5478. Over the 289 first-parent commits since 2026-10-13 that touched the debt files, 108 added or edited at least one entry over the limit.Check.debt_entries, with the testlong_debt_entryas a function, so it doesn't touch thedocs()lines #6723 changes.Tested
conventions_debt_length(registered inCMakeLists.txt). It checks the threshold boundary, that prose lines are ignored, and a temporary repository whose second commit adds a long entry: one finding on the right line, andoutput()returns 0. With the rule set toerroror the limit doubled, the test fails.tools/tests/test_check_conventions_*.pypass, including all sixcommentsshards.tools/check_conventions.py --base origin/mainpasses on this branch.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-16T10:24:23Z.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
CMakeLists.txtCMakeLists.txtCMakeLists.txtCMakeLists.txtCMakeLists.txtCMakeLists.txtCMakeLists.txtCMakeLists.txtCMakeLists.txtCMakeLists.txtCMakeLists.txtCMakeLists.txtImported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-19T10:18:38Z.
Checked the
debt-lengthrule: it only reports added lines starting an entry (-) inTechnicalDebt.md/docs/dev/debt/*.md, stays at warning level sooutput()still returns 0, andconventions_debt_lengthis registered in ctest and passes (boundary, prose ignored, temporary repo with one long entry). Merged.