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

[Closes #271] Release 0.2.6-alpha1 #272

Merged
merged 2 commits into from
Sep 7, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 36 additions & 24 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Change Log

## [0.2.6-alpha1](https://github.com/inaka/elvis/tree/0.2.6-alpha1) (2015-09-07)

[Full Changelog](https://github.com/inaka/elvis/compare/0.2.5...0.2.6-alpha1)

**Fixed bugs:**

- Incorrect matching of files [\#252](https://github.com/inaka/elvis/issues/252)

**Merged pull requests:**

- \[Closes \#252\] Incorrect matching of files [\#268](https://github.com/inaka/elvis/pull/268) ([jfacorro](https://github.com/jfacorro))

## [0.2.5](https://github.com/inaka/elvis/tree/0.2.5) (2015-08-31)

[Full Changelog](https://github.com/inaka/elvis/compare/0.2.5-beta4...0.2.5)
Expand All @@ -10,20 +22,44 @@

- Options for max\_module\_length [\#261](https://github.com/inaka/elvis/issues/261)

- Improve git\_for\_deps\_erlang\_mk and git\_for\_deps\_rebar [\#199](https://github.com/inaka/elvis/issues/199)

- Add --version option [\#174](https://github.com/inaka/elvis/issues/174)

- Add an elvis:rock\_this/1 function to rock specific modules [\#159](https://github.com/inaka/elvis/issues/159)

**Fixed bugs:**

- Possible false positive? [\#236](https://github.com/inaka/elvis/issues/236)

- Missing space after comma inside a string being reported [\#233](https://github.com/inaka/elvis/issues/233)

- Unhandled abstract form issue with fun\(\(...\) [\#239](https://github.com/inaka/elvis/issues/239)

- Non spacing not detected [\#221](https://github.com/inaka/elvis/issues/221)

**Closed issues:**

- Release version 0.2.5 [\#266](https://github.com/inaka/elvis/issues/266)

- Order line results by line\_num [\#219](https://github.com/inaka/elvis/issues/219)

- White output [\#209](https://github.com/inaka/elvis/issues/209)

- Don't use spaces for indentation [\#178](https://github.com/inaka/elvis/issues/178)

- Fix the specs on elvis\_style and elvis\_project [\#162](https://github.com/inaka/elvis/issues/162)

- New rule: max\_function\_length [\#153](https://github.com/inaka/elvis/issues/153)

- New rule: max\_module\_length [\#152](https://github.com/inaka/elvis/issues/152)

- No Trailing Whitespace [\#147](https://github.com/inaka/elvis/issues/147)

**Merged pull requests:**

- \[Closes \#266\] Release 0.2.5 [\#267](https://github.com/inaka/elvis/pull/267) ([jfacorro](https://github.com/jfacorro))

- \[Closes \#263\] Options for max function length [\#265](https://github.com/inaka/elvis/pull/265) ([jfacorro](https://github.com/jfacorro))

- \[Closes \#261\] Options for max module line length [\#264](https://github.com/inaka/elvis/pull/264) ([jfacorro](https://github.com/jfacorro))
Expand Down Expand Up @@ -74,8 +110,6 @@

- Not using elvis.config from the PR branch [\#242](https://github.com/inaka/elvis/issues/242)

- Unhandled abstract form issue with fun\(\(...\) [\#239](https://github.com/inaka/elvis/issues/239)

**Closed issues:**

- Pre-release 0.2.5-beta3 [\#246](https://github.com/inaka/elvis/issues/246)
Expand All @@ -94,28 +128,12 @@

[Full Changelog](https://github.com/inaka/elvis/compare/0.2.5-beta...0.2.5-beta2)

**Implemented enhancements:**

- Improve git\_for\_deps\_erlang\_mk and git\_for\_deps\_rebar [\#199](https://github.com/inaka/elvis/issues/199)

- Add --version option [\#174](https://github.com/inaka/elvis/issues/174)

**Fixed bugs:**

- Non spacing not detected [\#221](https://github.com/inaka/elvis/issues/221)

**Closed issues:**

- exception error: undefined function [\#230](https://github.com/inaka/elvis/issues/230)

- Order line results by line\_num [\#219](https://github.com/inaka/elvis/issues/219)

- Instead of using master, use the current branch for elvis.config [\#216](https://github.com/inaka/elvis/issues/216)

- White output [\#209](https://github.com/inaka/elvis/issues/209)

- Don't use spaces for indentation [\#178](https://github.com/inaka/elvis/issues/178)

- DRY [\#28](https://github.com/inaka/elvis/issues/28)

**Merged pull requests:**
Expand Down Expand Up @@ -150,8 +168,6 @@

**Implemented enhancements:**

- Add an elvis:rock\_this/1 function to rock specific modules [\#159](https://github.com/inaka/elvis/issues/159)

- Investigate erl\_tidy [\#38](https://github.com/inaka/elvis/issues/38)

**Fixed bugs:**
Expand All @@ -168,10 +184,6 @@

- Specify source file on the command line [\#170](https://github.com/inaka/elvis/issues/170)

- Fix the specs on elvis\_style and elvis\_project [\#162](https://github.com/inaka/elvis/issues/162)

- No Trailing Whitespace [\#147](https://github.com/inaka/elvis/issues/147)

- Don't let modules loose [\#29](https://github.com/inaka/elvis/issues/29)

- Exported vs. Non-exported [\#27](https://github.com/inaka/elvis/issues/27)
Expand Down
2 changes: 1 addition & 1 deletion src/elvis.app.src
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
application, elvis,
[
{description, "Erlang Style Reviewer, inspired on HoundCI"},
{vsn, "0.2.5"},
{vsn, "0.2.6-alpha1"},
{applications, [kernel, stdlib, ibrowse, ssl, jiffy, lager, aleppo, zipper]},
{modules,
[
Expand Down
8 changes: 2 additions & 6 deletions src/elvis_config.erl
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ dirs(#{}) ->
filter(_RuleGroup = #{filter := Filter}) ->
Filter;
filter(#{}) ->
undefined.
?DEFAULT_FILTER.

-spec files(config()) -> [string()].
files(_RuleGroup = #{files := Files}) ->
Expand All @@ -130,14 +130,10 @@ rules(#{}) ->
resolve_files(Config, Files) when is_list(Config) ->
Fun = fun(RuleGroup) -> resolve_files(RuleGroup, Files) end,
lists:map(Fun, Config);
resolve_files(RuleGroup = #{filter := Filter}, Files) ->
resolve_files(RuleGroup, Files) ->
Filter = filter(RuleGroup),
Dirs = dirs(RuleGroup),
FilteredFiles = elvis_file:filter_files(Files, Dirs, Filter),
RuleGroup#{files => FilteredFiles};
resolve_files(RuleGroup, Files) ->
Dirs = dirs(RuleGroup),
FilteredFiles = elvis_file:filter_files(Files, Dirs, ?DEFAULT_FILTER),
RuleGroup#{files => FilteredFiles}.

%% @doc Takes a configuration and finds all files according to its 'dirs'
Expand Down
14 changes: 10 additions & 4 deletions test/elvis_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -199,11 +199,17 @@ run_webhook(_Config) ->
elvis:start(),

meck:new(egithub, [passthrough]),
FakeFun1 = fun(_, _, _) -> {ok, []} end,
Files = [#{<<"filename">> => <<"test/examples/rebar.config.fail">>}],
FakeFun1 = fun(_, _, _) -> {ok, Files} end,
meck:expect(egithub, pull_req_files, FakeFun1),
meck:expect(egithub, pull_req_comments, FakeFun1),
meck:expect(egithub, issue_comments, FakeFun1),
FakeFun2 = fun(_, _, _, _) -> {error, error} end,

EmptyResultFun = fun(_, _, _) -> {ok, []} end,
meck:expect(egithub, pull_req_comments, EmptyResultFun),
meck:expect(egithub, issue_comments, EmptyResultFun),

FakeFun2 = fun(_, _, _, "elvis.config") ->
{error, error}
end,
meck:expect(egithub, file_content, FakeFun2),

ok = elvis:webhook(Request)
Expand Down