|
75 | 75 | ]}. |
76 | 76 |
|
77 | 77 | {project_plugins, [ |
78 | | - {rebar3_hex, "~> 7.0"}, |
79 | | - {rebar3_lint, "~> 4.1"}, |
| 78 | + {rebar3_hex, "~> 7.1"}, |
| 79 | + {rebar3_lint, "~> 5.0"}, |
80 | 80 | {rebar3_ex_doc, "~> 0.2"}, |
81 | | - {erlfmt, "~> 1.7"}, |
| 81 | + {erlfmt, "~> 1.8"}, |
82 | 82 | {covertool, "~> 2.0"} |
83 | 83 | ]}. |
84 | 84 |
|
|
109 | 109 | ]}. |
110 | 110 |
|
111 | 111 | {elvis, [ |
112 | | - #{ |
113 | | - dirs => [ |
114 | | - "src", |
115 | | - "src/collectors", |
116 | | - "src/collectors/vm", |
117 | | - "src/contrib", |
118 | | - "src/formats", |
119 | | - "src/metrics" |
120 | | - ], |
121 | | - filter => "*.erl", |
122 | | - rules => [ |
123 | | - {elvis_text_style, line_length, #{limit => 120, skip_comments => false}}, |
124 | | - {elvis_style, consistent_generic_type, #{preferred_type => term}}, |
125 | | - {elvis_style, invalid_dynamic_call, #{ |
126 | | - ignore => [ |
127 | | - prometheus_misc, |
128 | | - prometheus_registry, |
129 | | - prometheus_sup |
130 | | - ] |
131 | | - }}, |
132 | | - {elvis_style, god_modules, #{limit => 40}}, |
133 | | - {elvis_style, dont_repeat_yourself, #{min_complexity => 15}}, |
134 | | - {elvis_style, no_catch_expressions, disable} |
135 | | - ], |
136 | | - ruleset => erl_files |
137 | | - }, |
138 | | - #{ |
139 | | - dirs => ["src/model"], |
140 | | - filter => "prometheus_model_helpers.erl", |
141 | | - rules => [ |
142 | | - {elvis_text_style, line_length, #{limit => 120}}, |
143 | | - {elvis_style, invalid_dynamic_call, #{ |
144 | | - ignore => [ |
145 | | - %% FIXME: why create_mf calls collect_metrics?? |
146 | | - prometheus_model_helpers |
147 | | - ] |
148 | | - }}, |
149 | | - {elvis_style, god_modules, #{limit => 40}} |
150 | | - ], |
151 | | - ruleset => erl_files |
152 | | - }, |
153 | | - #{ |
154 | | - dirs => ["test/eunit", "test/eunit/format", "test/eunit/contrib", "test/eunit/metric"], |
155 | | - filter => "*.erl", |
156 | | - rules => [ |
157 | | - {elvis_text_style, line_length, #{limit => 120}}, |
158 | | - {elvis_style, invalid_dynamic_call, #{ignore => []}}, |
159 | | - {elvis_style, god_modules, #{limit => 40}}, |
160 | | - %% looks like eunit generates underscored vars |
161 | | - {elvis_style, variable_naming_convention, #{regex => "^([A-Z_][0-9a-zA-Z_]*)$"}}, |
162 | | - {elvis_style, dont_repeat_yourself, #{min_complexity => 200}}, |
163 | | - {elvis_style, no_block_expressions, disable} |
164 | | - ], |
165 | | - ruleset => erl_files |
166 | | - }, |
167 | | - #{ |
168 | | - dirs => ["."], |
169 | | - filter => "rebar.config", |
170 | | - ruleset => rebar_config |
171 | | - } |
| 112 | + {config, [ |
| 113 | + #{ |
| 114 | + files => ["src/**/*.erl"], |
| 115 | + ignore => ["src/model/"], |
| 116 | + rules => [ |
| 117 | + {elvis_text_style, max_line_length, #{limit => 120, skip_comments => false}}, |
| 118 | + {elvis_style, dont_repeat_yourself, #{min_complexity => 15}}, |
| 119 | + {elvis_style, generic_type, #{preferred_type => term}}, |
| 120 | + {elvis_style, no_invalid_dynamic_calls, #{ |
| 121 | + ignore => [ |
| 122 | + prometheus_misc, |
| 123 | + prometheus_registry, |
| 124 | + prometheus_sup |
| 125 | + ] |
| 126 | + }}, |
| 127 | + {elvis_style, no_god_modules, #{limit => 40}}, |
| 128 | + {elvis_style, no_catch_expressions, disable} |
| 129 | + ], |
| 130 | + ruleset => erl_files |
| 131 | + }, |
| 132 | + #{ |
| 133 | + files => ["src/model/prometheus_model_helpers.erl"], |
| 134 | + rules => [ |
| 135 | + {elvis_text_style, max_line_length, #{limit => 120}}, |
| 136 | + %% FIXME: why create_mf calls collect_metrics?? |
| 137 | + {elvis_style, no_invalid_dynamic_calls, disable}, |
| 138 | + {elvis_style, no_god_modules, #{limit => 40}} |
| 139 | + ], |
| 140 | + ruleset => erl_files |
| 141 | + }, |
| 142 | + #{ |
| 143 | + files => ["test/eunit/**/*.erl"], |
| 144 | + rules => [ |
| 145 | + {elvis_text_style, max_line_length, #{limit => 120}}, |
| 146 | + {elvis_style, no_god_modules, #{limit => 40}}, |
| 147 | + %% looks like eunit generates underscored vars |
| 148 | + {elvis_style, variable_naming_convention, #{regex => "^([A-Z_][0-9a-zA-Z_]*)$"}}, |
| 149 | + {elvis_style, dont_repeat_yourself, #{min_complexity => 200}}, |
| 150 | + {elvis_style, no_block_expressions, disable} |
| 151 | + ], |
| 152 | + ruleset => erl_files |
| 153 | + }, |
| 154 | + #{ |
| 155 | + files => ["rebar.config"], |
| 156 | + ruleset => rebar_config |
| 157 | + } |
| 158 | + ]} |
172 | 159 | ]}. |
0 commit comments