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

output relative paths in dialyzer provider #2352

Merged
merged 1 commit into from
Nov 19, 2020

Conversation

tsloughter
Copy link
Collaborator

Forgot I did this. Was going to wait until I updated all of the cases of files being output but meh..

@tsloughter tsloughter requested a review from ferd September 12, 2020 12:59
Comment on lines 520 to 537
%% returns the path for printing to logs. if get_cwd succeeds it
%% attempts to return the relative path. It falls back on juts
%% returning the original path.
print_path(OriginalPath) ->
case file:get_cwd() of
{ok, Cwd} ->
case path_from_ancestor(OriginalPath, Cwd) of
{ok, ""} ->
OriginalPath;
{ok, Path} ->
Path;
_ ->
OriginalPath
end;
_ ->
OriginalPath
end.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rebar_dir already contains format_source_file_name/2; it requires 'opts' but supports compiler_source_format options from the compiler.

We should make a 1-arity wrapper that sends in empty opts and reuse it.

src/rebar_dir.erl Outdated Show resolved Hide resolved
src/rebar_file_utils.erl Outdated Show resolved Hide resolved
@tsloughter tsloughter merged commit e8b5e5b into erlang:master Nov 19, 2020
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.

2 participants