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

What's wrong with the documented configuration? #309

Closed
waisbrot opened this issue Dec 10, 2015 · 1 comment
Closed

What's wrong with the documented configuration? #309

waisbrot opened this issue Dec 10, 2015 · 1 comment
Assignees

Comments

@waisbrot
Copy link
Contributor

When I copy the configuration from the main README, and add a check for old elvis configuration, elvis reports failure on the config file. I can't tell what's wrong.

[
 {
   elvis,
   [
    {config,
     [#{dirs => ["src", "test"],
        filter => "*.erl",
        rules => [{elvis_style, line_length, #{limit => 80}},
                  {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, "++"}]}
                  }
                 ]
       },
      #{dirs => ["."],
        filter => "Makefile",
        rules => [{elvis_project, no_deps_master_erlang_mk, []}]
       },
      #{dirs => ["."],
        filter => "rebar.config",
        rules => [{elvis_project, no_deps_master_rebar, []}]
       },
      #{dirs => ["."],
        filter => "elvis.config",
        rules => [{elvis_project, old_configuration_format}]
       }
     ]
    },
    %% Optional to select the output format, the default is colors
    {output_format, plain},
    %% Only necessary for the 'webhook' functionality
    {github_user, "user"},
    {github_password, "password"}
   ]
 }
].
@jfacorro
Copy link
Contributor

Thanks for reporting this. The example in the README is incorrect regarding the rules for the Makefile and rebar.config. The rule tuples with three elements should have an empty map instead of an empty list, since the options for each rules are specified through a map.

jfacorro added a commit that referenced this issue Dec 10, 2015
@jfacorro jfacorro self-assigned this Dec 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants