-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #471 from crystal-ameba/feature/rule-since-version
Implement rule versioning
- Loading branch information
Showing
91 changed files
with
337 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
require "../../spec_helper" | ||
|
||
module Ameba | ||
private def with_rule_versions_presenter(&) | ||
rules = Config.load.rules | ||
|
||
with_presenter(Presenter::RuleVersionsPresenter, rules) do |presenter, output| | ||
yield rules, output, presenter | ||
end | ||
end | ||
|
||
describe Presenter::RuleVersionsPresenter do | ||
it "outputs rule versions" do | ||
with_rule_versions_presenter do |_rules, output| | ||
output.should contain <<-TEXT | ||
- 0.1.0 | ||
- Layout/LineLength | ||
- Layout/TrailingBlankLines | ||
- Layout/TrailingWhitespace | ||
- Lint/ComparisonToBoolean | ||
- Lint/DebuggerStatement | ||
- Lint/LiteralInCondition | ||
- Lint/LiteralInInterpolation | ||
- Style/UnlessElse | ||
TEXT | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
Version: "1.5.0" | ||
|
||
Lint/ComparisonToBoolean: | ||
Enabled: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.