Commit 2143bd9 1 parent 74dd296 commit 2143bd9 Copy full SHA for 2143bd9
File tree 1 file changed +26
-23
lines changed
1 file changed +26
-23
lines changed Original file line number Diff line number Diff line change @@ -207,23 +207,39 @@ defmodule Credo.CLI.Output do
207
207
:reset ,
208
208
:faint ,
209
209
"your version of Elixir (#{ System . version ( ) } ).\n \n " ,
210
- "You can deactivate these checks by adding this to the `checks` list in your config:\n "
210
+ "You can deactivate these checks by adding them to the `: checks`/`:disabled ` list in your config:\n "
211
211
]
212
212
213
213
UI . puts ( "" )
214
214
UI . puts ( msg )
215
215
216
- skipped_checks
217
- |> Enum . map ( & check_name / 1 )
218
- |> print_disabled_check_config
219
- end
216
+ UI . puts ( [
217
+ :faint ,
218
+ """
219
+ checks: %{
220
+ disabled: [
221
+ """
222
+ |> String . trim_trailing ( )
223
+ ] )
220
224
221
- defp check_name ( { check , _check_info } ) , do: check_name ( { check } )
225
+ skipped_checks
226
+ |> Enum . flat_map ( fn { check , params } ->
227
+ [
228
+ :reset ,
229
+ :cyan ,
230
+ " {#{ Credo.Code.Module . name ( check ) } , #{ inspect ( params ) } },\t # requires Elixir #{ check . elixir_version ( ) } \n "
231
+ ]
232
+ end )
233
+ |> UI . puts ( )
222
234
223
- defp check_name ( { check } ) do
224
- check
225
- |> to_string
226
- |> String . replace ( ~r/ ^Elixir\. / , "" )
235
+ UI . puts ( [
236
+ :faint ,
237
+ """
238
+ # ...
239
+ ]
240
+ }
241
+ """
242
+ ] )
227
243
end
228
244
229
245
defp print_numbered_list ( list ) do
@@ -239,17 +255,4 @@ defmodule Credo.CLI.Output do
239
255
end )
240
256
|> UI . warn ( )
241
257
end
242
-
243
- defp print_disabled_check_config ( list ) do
244
- list
245
- |> Enum . flat_map ( fn string ->
246
- [
247
- :reset ,
248
- String . pad_leading ( " " , 4 ) ,
249
- :faint ,
250
- "{#{ string } , false},\n "
251
- ]
252
- end )
253
- |> UI . puts ( )
254
- end
255
258
end
You can’t perform that action at this time.
0 commit comments