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

Group dialyzer warnings by file and concentrate output #828

Merged
merged 7 commits into from
Sep 30, 2015

Conversation

Licenser
Copy link
Contributor

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

@ferd
Copy link
Collaborator

ferd commented Sep 22, 2015

How does Cyan look on a white background?

@Licenser
Copy link
Contributor Author

As good (or bad) as the green, actually I find it a bit better then the green ;)
1 bash 2015-09-22 20-46-24

@ferd
Copy link
Collaborator

ferd commented Sep 22, 2015

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).
Copy link
Contributor

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)?

Copy link
Contributor Author

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)

@fishcakez
Copy link
Contributor

Should file warnings be the new format, just without colour?

@Licenser
Copy link
Contributor Author

@fishcakez file warnings use the dialyzer formatting to not break automatic processing of the output

@Licenser
Copy link
Contributor Author

Failing suite is this: I'm confused how this

- - - - - - - - - - - - - - - - - - - - - - - - - -
rebar_src_dirs_SUITE:src_dirs_in_erl_opts failed on line 76
Reason: {badmatch,{error,
    {rebar_prv_app_discovery,
        {mul...}
- - - - - - - - - - - - - - - - - - - - - - - - - -
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.

@tsloughter
Copy link
Collaborator

You'll need to rebase.

@tsloughter
Copy link
Collaborator

Cool. @ferd you good with this?

ferd added a commit that referenced this pull request Sep 30, 2015
Group dialyzer warnings by file and concentrate output
@ferd ferd merged commit 1a4b8ef into erlang:master Sep 30, 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

Successfully merging this pull request may close these issues.

None yet

4 participants