fix(no_excessive_lines_per_function): expand max_lines Range in NoExcessiveLinesPerFunctionOptions#7714
Conversation
🦋 Changeset detectedLatest commit: 162427a The changes in this PR will be included in the next version bump. This PR includes changesets to release 13 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
WalkthroughChanged the Suggested labels
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ 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). (3)
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. Comment |
dyc3
left a comment
There was a problem hiding this comment.
There needs to be a changeset for this.
|
@MeGaNeKoS can you please add a changeset? |
|
Ok. |
…eroU8 to NonZeroU16 Updated the max_lines field in NoExcessiveLinesPerFunctionOptions to use NonZeroU16 instead of NonZeroU8. This change allows for a greater range of values for the maximum number of lines allowed in a function body.
Updated the max line option to uint16 (up to 65,535) to prevent JSX/front-end projects from being hindered by the previous 255 line limit. This change ensures better compatibility and flexibility for larger codebases.
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
packages/@biomejs/biome/configuration_schema.jsonis excluded by!**/configuration_schema.jsonand included by**
📒 Files selected for processing (2)
.changeset/gold-lamps-try.md(1 hunks)crates/biome_rule_options/src/no_excessive_lines_per_function.rs(2 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
.changeset/*.md
📄 CodeRabbit inference engine (CONTRIBUTING.md)
.changeset/*.md: In changesets, only use #### or ##### headers; other header levels are not allowed
Changesets should cover user-facing changes only; internal changes do not need changesets
Use past tense for what you did and present tense for current Biome behavior in changesets
When fixing a bug in a changeset, start with an issue link (e.g., “Fixed #1234: …”)
When referencing a rule or assist in a changeset, include a link to its page on the website
Include code blocks in changesets when applicable to illustrate changes
End every sentence in a changeset with a period
Files:
.changeset/gold-lamps-try.md
crates/biome_*/**
📄 CodeRabbit inference engine (CLAUDE.md)
Place core crates under /crates/biome_*/
Files:
crates/biome_rule_options/src/no_excessive_lines_per_function.rs
**/*.rs
📄 CodeRabbit inference engine (CONTRIBUTING.md)
**/*.rs: Format Rust files before committing (e.g., viajust fwhich formats Rust)
Document rules, assists, and options with inline rustdoc in source
Files:
crates/biome_rule_options/src/no_excessive_lines_per_function.rs
🧬 Code graph analysis (1)
crates/biome_rule_options/src/no_excessive_lines_per_function.rs (1)
packages/@biomejs/backend-jsonrpc/src/workspace.ts (1)
NoExcessiveLinesPerFunctionOptions(8013-8026)
🔇 Additional comments (1)
crates/biome_rule_options/src/no_excessive_lines_per_function.rs (1)
3-3: Verified: no range assumptions or breaking changes detected.The type change from
NonZeroU8toNonZeroU16is correctly propagated. The rule logic simply counts line tokens and compares againstoptions.max_lines—no hardcoded u8 boundary checks or validation logic were found. Backward compatible since existing configurations withmax_lines ≤ 255remain valid.
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
…essiveLinesPerFunctionOptions (biomejs#7714) Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
Updated the
max_linesfield inNoExcessiveLinesPerFunctionOptionsto useNonZeroU16instead ofNonZeroU8.This change increases the maximum configurable number of lines per function, providing greater flexibility for large codebases.
This update improves maintainability for frontend projects (e.g., Next.js) and supports more consistent code style enforcement across teams working with complex components.