Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Feature Request]: Add Support for Limiting Function Length (Max Line Count) #348

@aehabdelouadoud

Description

@aehabdelouadoud

I would like to request a new feature for cpplint: the ability to enforce a maximum function length (number of lines per function). This would help teams maintain readability and prevent overly long functions that are harder to maintain and understand.

Use Case:

This would be useful in scenarios where code maintainability and readability are a priority.
Having a configurable rule to enforce a limit on function size would help catch long functions early in the review process.

Expected Behavior:
A new configurable rule or check that allows users to specify a maximum number of lines allowed per function.
For example, something like:

`cpplint --max-function-lines=25 your_file.cpp`

Additional Information:

  • This feature would align with best practices for clean, maintainable code.
  • It could be useful in both C++ and C projects.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions