overcommit 0.20.0 → 0.21.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea70d2648519c5c2f90bfa96c690a45414c1df2a
|
4
|
+
data.tar.gz: 65e1c6ccda24f2eb76fa6982439112964414dd4e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bae413ee48cbf60e6de660988fbdc8dc2c3a8044249d7089618500a033629df0b0fb6d22a8465732d774c043c2a8fd0abba3d0f30c618041f99b8292885303af
|
7
|
+
data.tar.gz: 26f3e6ffb0999a3f25573a53b48b8e2f236ba880423598845c43e0609e0c8aeec9c9236d7caee8f659e01b886f38461931e99781d20920e0690119cbddfc9ae4
|
data/config/default.yml
CHANGED
@@ -113,6 +113,7 @@ PreCommit:
|
|
113
113
|
|
114
114
|
HardTabs:
|
115
115
|
description: 'Checking for hard tabs'
|
116
|
+
quiet: true
|
116
117
|
exclude:
|
117
118
|
- '**/*.go'
|
118
119
|
- '**/Makefile'
|
@@ -160,9 +161,11 @@ PreCommit:
|
|
160
161
|
|
161
162
|
MergeConflicts:
|
162
163
|
description: 'Checking for merge conflicts'
|
164
|
+
quiet: true
|
163
165
|
|
164
166
|
PryBinding:
|
165
167
|
description: 'Checking for instances of binding.pry'
|
168
|
+
quiet: true
|
166
169
|
include:
|
167
170
|
- '**/*.rb'
|
168
171
|
- '**/*.rake'
|
@@ -208,6 +211,11 @@ PreCommit:
|
|
208
211
|
install_command: 'gem install scss-lint'
|
209
212
|
include: '**/*.scss'
|
210
213
|
|
214
|
+
ShellCheck:
|
215
|
+
description: 'Analyzing with ShellCheck'
|
216
|
+
required_executable: 'shellcheck'
|
217
|
+
include: '**/*.sh'
|
218
|
+
|
211
219
|
TrailingWhitespace:
|
212
220
|
description: 'Checking for trailing whitespace'
|
213
221
|
exclude:
|
@@ -215,8 +223,8 @@ PreCommit:
|
|
215
223
|
|
216
224
|
TravisLint:
|
217
225
|
description: 'Checking Travis CI configuration'
|
218
|
-
required_executable: 'travis
|
219
|
-
install_command: 'gem install travis
|
226
|
+
required_executable: 'travis'
|
227
|
+
install_command: 'gem install travis'
|
220
228
|
include: '.travis.yml'
|
221
229
|
|
222
230
|
YamlSyntax:
|
@@ -3,7 +3,7 @@ module Overcommit::Hook::PreCommit
|
|
3
3
|
# files.
|
4
4
|
class Jscs < Base
|
5
5
|
def run
|
6
|
-
result = execute(%W[#{executable} --reporter=inline] + applicable_files)
|
6
|
+
result = execute(%W[#{executable} --reporter=inline --verbose] + applicable_files)
|
7
7
|
return :pass if result.success?
|
8
8
|
|
9
9
|
if result.status == 1
|
@@ -11,6 +11,8 @@ module Overcommit::Hook::PreCommit
|
|
11
11
|
return :warn, result.stderr.chomp
|
12
12
|
end
|
13
13
|
|
14
|
+
# example message:
|
15
|
+
# path/to/file.js: line 7, col 0, ruleName: Error message
|
14
16
|
extract_messages(
|
15
17
|
result.stdout.split("\n"),
|
16
18
|
/^(?<file>[^:]+):[^\d]+(?<line>\d+)/,
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module Overcommit::Hook::PreCommit
|
2
|
+
# Runs `shellcheck` against any modified shell script files.
|
3
|
+
class ShellCheck < Base
|
4
|
+
MESSAGE_TYPE_CATEGORIZER = lambda do |type|
|
5
|
+
type.include?('note') ? :warning : :error
|
6
|
+
end
|
7
|
+
|
8
|
+
def run
|
9
|
+
result = execute(%W[#{executable} --format=gcc] + applicable_files)
|
10
|
+
return :pass if result.success?
|
11
|
+
|
12
|
+
extract_messages(
|
13
|
+
result.stdout.split("\n"),
|
14
|
+
/^(?<file>[^:]+):(?<line>\d+):[^ ]+ (?<type>[^ ]+)/,
|
15
|
+
MESSAGE_TYPE_CATEGORIZER,
|
16
|
+
)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -2,10 +2,10 @@ module Overcommit::Hook::PreCommit
|
|
2
2
|
# Runs `travis-lint` against any modified Travis CI files.
|
3
3
|
class TravisLint < Base
|
4
4
|
def run
|
5
|
-
result = execute([executable] + applicable_files)
|
5
|
+
result = execute([executable, 'lint'] + applicable_files)
|
6
6
|
return :pass if result.success?
|
7
7
|
|
8
|
-
[:fail, result.stdout.strip]
|
8
|
+
[:fail, (result.stdout + result.stderr).strip]
|
9
9
|
end
|
10
10
|
end
|
11
11
|
end
|
data/lib/overcommit/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: overcommit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.21.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Causes Engineering
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2015-01-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: childprocess
|
@@ -53,6 +53,20 @@ dependencies:
|
|
53
53
|
- - "~>"
|
54
54
|
- !ruby/object:Gem::Version
|
55
55
|
version: '3.0'
|
56
|
+
- !ruby/object:Gem::Dependency
|
57
|
+
name: travis
|
58
|
+
requirement: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - "~>"
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '1.7'
|
63
|
+
type: :development
|
64
|
+
prerelease: false
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - "~>"
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '1.7'
|
56
70
|
description: Utility to install, configure, and extend Git hooks
|
57
71
|
email:
|
58
72
|
- eng@causes.com
|
@@ -110,6 +124,7 @@ files:
|
|
110
124
|
- lib/overcommit/hook/pre_commit/reek.rb
|
111
125
|
- lib/overcommit/hook/pre_commit/rubocop.rb
|
112
126
|
- lib/overcommit/hook/pre_commit/scss_lint.rb
|
127
|
+
- lib/overcommit/hook/pre_commit/shell_check.rb
|
113
128
|
- lib/overcommit/hook/pre_commit/trailing_whitespace.rb
|
114
129
|
- lib/overcommit/hook/pre_commit/travis_lint.rb
|
115
130
|
- lib/overcommit/hook/pre_commit/yaml_syntax.rb
|