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

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

alt text

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
    
  • Re-run in your IDE the analyzer or with command :

    dart analyze
    

Custom limit #

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

analyzer:
  plugins:
    - custom_lint

custom_lint:
  rules:
    - function_max_lines:
      max_lines: 50
2
likes
0
points
52
downloads

Publisher

unverified uploader

Weekly Downloads

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

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

analyzer, custom_lint_builder

More

Packages that depend on max_lines_function_lint