Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

max_function_length check fails unexpectedly #407

Closed
sargun opened this issue Oct 13, 2016 · 1 comment
Closed

max_function_length check fails unexpectedly #407

sargun opened this issue Oct 13, 2016 · 1 comment

Comments

@sargun
Copy link
Contributor

sargun commented Oct 13, 2016

Using the current master of elvis_core (70fd9d01fd076f4640da09fdfd53b310ec59a94c) is returning an error unexpectedly.

This file:
https://github.com/dcos/lashup/blob/7bab9d8fa211119bbec1722648bd98bfafe7283c/src/lashup_config.erl
Throws the following errors:

  - max_function_length
    - The code for function active_view_size has 80 lines which exceeds the maximum of 30.
    - The code for function passive_view_size has 82 lines which exceeds the maximum of 30.

The config is below:

[
  {
    elvis,
    [
      {config,
        [
          #{dirs => ["src"],
            filter => "lashup_*.erl",
            rules => [
            {elvis_style, max_function_length,
                #{
                    max_length => 30,
                    ignore_functions => [{lashup_hyparview_membership, handle_info}]
                }
            },
            {elvis_style, no_spec_with_records},
            {elvis_style, dont_repeat_yourself, #{min_complexity => 20}},
            {elvis_style, no_behavior_info},
            {elvis_style, used_ignored_variable},
            {elvis_style, nesting_level, #{level => 3}},
            {elvis_style, god_modules, #{limit => 25}},
            {elvis_style, line_length, #{limit => 120, count_comments => false}},
            {elvis_style, no_tabs},
            {elvis_style, no_trailing_whitespace},
            {elvis_style, macro_names},
            {elvis_style, macro_module_names},
            {elvis_style, operator_spaces, #{rules => [{right, ","}, {right, "++"}, {left, "++"}]}}
          ]
          }
        ]
      }
    ]
  }
].

@harenson
Copy link
Member

Fixed in inaka/elvis_core#64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants