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

* Add support of wildcards in xref.config paths. #30

Merged
merged 1 commit into from
Aug 25, 2015

Conversation

NOMORECOFFEE
Copy link
Contributor

Here's an example:

[
   {xref, [
            {config, #{
                dirs => ["apps/*/ebin"],
                extra_paths => ["deps/*/ebin"]
            }},
            {checks, [ undefined_function_calls
                     , undefined_functions
                     , locals_not_used
                     , exports_not_used
                     , deprecated_function_calls
                     , deprecated_functions
                     ]}
          ]
   }
].

@elbrujohalcon
Copy link
Member

@NOMORECOFFEE great addition! Can you add a test case for this, please?

@NOMORECOFFEE
Copy link
Contributor Author

@elbrujohalcon ok. Sorry for delay.

@elbrujohalcon
Copy link
Member

@NOMORECOFFEE : Not to push you, but… were you able to add some tests here? :trollface:

match_one_character_dir_with_subdir(Config) ->
PrivDir = ?config(priv_dir, Config),
Dirs = [filename:join([PrivDir, "?", "ebin"])],
?assertEqual(["a", "b", "c"], basenames(dirnames(xref_runner:find_dirs(Dirs)))).
Copy link
Member

Choose a reason for hiding this comment

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

According to Elvis:

Line 53 is too long: ?assertEqual(["a", "b", "c"], basenames(dirnames(xref_runner:find_dirs(Dirs))))..

@elbrujohalcon
Copy link
Member

@NOMORECOFFEE please don't use eunit. We are already using common_test in this project.


match_alternatives_with_subdir(Config) ->
PrivDir = ?config(priv_dir, Config),
Dirs = [filename:join([PrivDir, "{a,dd}", "ebin"])],
Copy link
Member

Choose a reason for hiding this comment

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

According to Elvis:

Missing space after "," on line 99

@elbrujohalcon
Copy link
Member

So awesome!

elbrujohalcon pushed a commit that referenced this pull request Aug 25, 2015
* Add support of wildcards in xref.config paths.
@elbrujohalcon elbrujohalcon merged commit e00eac9 into inaka:master Aug 25, 2015

match_alternatives_with_subdir(Config) ->
PrivDir = ?config(priv_dir, Config),
Dirs = [filename:join([PrivDir, "{a,dd}", "ebin"])],
Copy link
Member

Choose a reason for hiding this comment

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

According to Elvis:

Missing space after "," on line 80

@NOMORECOFFEE
Copy link
Contributor Author

@elbrujohalcon thank!

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

3 participants