max_lines_function_lint 1.2.4 copy "max_lines_function_lint: ^1.2.4" to clipboard
max_lines_function_lint: ^1.2.4 copied to clipboard

Check that your function don't exceed a maximum of lines with a beautiful lint

Feature #

max_lines_function_lint allows you to display a warning when one of your functions/methods exceeds a certain number of lines

Installing #

max_lines_function_lint is implemented using [custom_lint]. As such, it uses custom_lint's installation logic.
Long story short:

  • Add both max_lines_function_lint and custom_lint to your pubspec.yaml:

    dev_dependencies:
      custom_lint:
      max_lines_function_lint:
    
  • Enable custom_lint's plugin in your analysis_options.yaml:

    analyzer:
      plugins:
        - custom_lint
    
  • run with the command:

    dart run custom_lint
    

Custom limit #

Limit the maximum of line with a custom value (default 30)

analyzer:
  plugins:
    - custom_lint

custom_lint:
  rules:
    - max_lines_function:
      limit: 50

alt text

2
likes
90
points
46
downloads
screenshot

Publisher

unverified uploader

Weekly Downloads

Check that your function don't exceed a maximum of lines with a beautiful lint

Repository (GitHub)

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

analyzer, custom_lint_builder

More

Packages that depend on max_lines_function_lint