-
Notifications
You must be signed in to change notification settings - Fork 512
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
Group dialyzer warnings by file and concentrate output #828
Conversation
How does Cyan look on a white background? |
Yeah I guess that's workable. |
@@ -402,15 +402,11 @@ run_dialyzer(State, Opts, Output) -> | |||
end. | |||
|
|||
format_warnings(Output, Warnings) -> | |||
Warnings1 = format_warnings(Warnings), | |||
Warnings1 = rebar_dialyzer_format:format_warnings(Warnings), | |||
console_warnings(Warnings1), | |||
file_warnings(Output, Warnings), | |||
length(Warnings1). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this length still correct? Should use length(Warnings)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
length is still correct, but that said it still might be more sensible to use length(warnings)
Should file warnings be the new format, just without colour? |
@fishcakez file warnings use the dialyzer formatting to not break automatic processing of the output |
Failing suite is this: I'm confused how this
src_dirs_in_erl_opts(Config) ->
AppDir = ?config(apps, Config),
Name = rebar_test_utils:create_random_name("app1_"),
Vsn = rebar_test_utils:create_random_vsn(),
rebar_test_utils:create_app(AppDir, Name, Vsn, [kernel, stdlib]),
RebarConfig = [{erl_opts, [{src_dirs, ["foo", "bar", "baz"]}]}],
{ok, State} = rebar_test_utils:run_and_check(Config, RebarConfig, ["compile"], return),
["foo", "bar", "baz"] = rebar_dir:src_dirs(rebar_state:opts(State), []). I'm not sure how this is related. |
You'll need to rebase. |
d7b0293
to
cf70dbf
Compare
Cool. @ferd you good with this? |
Group dialyzer warnings by file and concentrate output
Some more improvements on output, it's now easier to spot the file / line number the warning is in those are coded cyan. Also warnings are grouped by file now and the filename is only printed once.
This combination allows for a more concise output while staying nicely readable.
![1 bash 2015-09-22 19-18-31](https://cloud.githubusercontent.com/assets/119093/10025865/bb9fad28-615e-11e5-8b4c-af626b577fbe.png)