-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into features/consistent_output_error_gh_119, u…
- Loading branch information
Showing
24 changed files
with
218 additions
and
59 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
* Add the ability to pass command line flags to Rubocop. `rubocop.flags` | ||
* Upgrade JSHint to 2.5.4 | ||
|
||
## 0.19.0 | ||
|
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 |
---|---|---|
|
@@ -13,7 +13,7 @@ def message | |
end | ||
|
||
def pattern | ||
'-e "^[ ]*debugger"' | ||
"^[ ]*debugger" | ||
end | ||
|
||
def self.description | ||
|
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 |
---|---|---|
|
@@ -9,7 +9,7 @@ def message | |
end | ||
|
||
def pattern | ||
"'<<<<<<<'" | ||
"<<<<<<<" | ||
end | ||
|
||
def self.description | ||
|
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 |
---|---|---|
|
@@ -9,7 +9,7 @@ def message | |
end | ||
|
||
def pattern | ||
"'^ *\t'" | ||
"^ *\t" | ||
end | ||
|
||
def self.description | ||
|
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
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,48 @@ | ||
require 'minitest_helper' | ||
require 'plugins/pre_commit/checks/local' | ||
|
||
describe PreCommit::Checks::Local do | ||
|
||
let(:config_file) { fixture_file("pre-commit.rb") } | ||
let(:check) { PreCommit::Checks::Local.new(nil, nil, []) } | ||
|
||
it "succeeds if there is no config" do | ||
check.call([]).must_equal nil | ||
end | ||
|
||
it "succeeds if script succeeds" do | ||
check.script = config_file | ||
check.call([]).must_equal nil | ||
end | ||
|
||
it "fails if script fails" do | ||
check.script = config_file | ||
check.call(["xxx"]).must_include "pre-commit.rb failed" | ||
end | ||
|
||
it "finds a local script" do | ||
in_tmpdir do | ||
FileUtils.mkdir_p("config") | ||
FileUtils.touch(File.join("config", "pre-commit.rb")) | ||
check.script.must_equal "config/pre-commit.rb" | ||
end | ||
end | ||
|
||
it "finds a local script with an underscored name" do | ||
in_tmpdir do | ||
FileUtils.mkdir_p("config") | ||
FileUtils.touch(File.join("config", "pre_commit.rb")) | ||
check.script.must_equal "config/pre_commit.rb" | ||
end | ||
end | ||
|
||
it "prefers the underscored local script name" do | ||
in_tmpdir do | ||
FileUtils.mkdir_p("config") | ||
FileUtils.touch(File.join("config", "pre_commit.rb")) | ||
FileUtils.touch(File.join("config", "pre-commit.rb")) | ||
check.script.must_equal "config/pre_commit.rb" | ||
end | ||
end | ||
|
||
end |
Oops, something went wrong.