overcommit 0.51.0 → 0.54.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/config/default.yml +39 -1
- data/lib/overcommit/exceptions.rb +19 -16
- data/lib/overcommit/git_repo.rb +10 -9
- data/lib/overcommit/hook/base.rb +15 -1
- data/lib/overcommit/hook/pre_commit/author_name.rb +2 -2
- data/lib/overcommit/hook/pre_commit/go_fmt.rb +17 -0
- data/lib/overcommit/hook/pre_commit/golangci_lint.rb +21 -0
- data/lib/overcommit/hook/pre_commit/mdl.rb +3 -3
- data/lib/overcommit/hook/pre_commit/php_cs.rb +6 -13
- data/lib/overcommit/hook/pre_commit/pronto.rb +3 -14
- data/lib/overcommit/hook/pre_push/base.rb +21 -0
- data/lib/overcommit/hook/pre_push/go_test.rb +14 -0
- data/lib/overcommit/hook/pre_push/golangci_lint.rb +16 -0
- data/lib/overcommit/hook/pre_push/pronto.rb +12 -0
- data/lib/overcommit/hook/pre_push/protected_branches.rb +40 -15
- data/lib/overcommit/hook/prepare_commit_msg/replace_branch.rb +1 -1
- data/lib/overcommit/hook/shared/pronto.rb +21 -0
- data/lib/overcommit/hook_context/pre_push.rb +9 -0
- data/lib/overcommit/printer.rb +1 -0
- data/lib/overcommit/version.rb +1 -1
- metadata +11 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e50387bc8d3183940247c41ecbadb7346b5c079eef654f98527e47452c628a9a
|
4
|
+
data.tar.gz: dd5ce92f909df4902d1571c1942767c15e8ce3dcbf834d1e264d0f30c306bb2c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ab4e383a229204921ce7d4bb78682ac12144adb579b9f97967f63e0ac6d8a27f2dd814ee66696da896fd0cef6c388317bf6f71259bcae8830d6c608f378ed9d1
|
7
|
+
data.tar.gz: 34b9fa4346108b2cbe156808b833fee0f167b48af36577e3aae19f76e5410820c6b8bd1a52e82105683a29db0fbd57dcefdffa936ee45ba033ab398cebbec09b
|
data/config/default.yml
CHANGED
@@ -337,6 +337,23 @@ PreCommit:
|
|
337
337
|
flags: ['-IEHnw']
|
338
338
|
keywords: ['FContext','FDescribe','FIt','FMeasure','FSpecify','FWhen']
|
339
339
|
|
340
|
+
GoFmt:
|
341
|
+
enabled: true
|
342
|
+
description: 'Fix with go fmt'
|
343
|
+
required_executable: 'go'
|
344
|
+
command: ['go', 'fmt']
|
345
|
+
parallelize: false
|
346
|
+
include: '**/*.go'
|
347
|
+
|
348
|
+
GolangciLint:
|
349
|
+
enabled: false
|
350
|
+
description: 'Analyze with golangci-lint'
|
351
|
+
required_executable: 'golangci-lint'
|
352
|
+
install_command: 'go get github.com/golangci/golangci-lint/cmd/golangci-lint'
|
353
|
+
flags: ['--out-format=line-number', '--print-issued-lines=false']
|
354
|
+
command: ['golangci-lint', 'run']
|
355
|
+
include: '**/*.go'
|
356
|
+
|
340
357
|
GoLint:
|
341
358
|
enabled: false
|
342
359
|
description: 'Analyze with golint'
|
@@ -868,7 +885,7 @@ PreCommit:
|
|
868
885
|
enabled: false
|
869
886
|
description: 'Analyze with YAMLlint'
|
870
887
|
required_executable: 'yamllint'
|
871
|
-
flags: ['--format=parsable']
|
888
|
+
flags: ['--format=parsable', '--strict']
|
872
889
|
install_command: 'pip install yamllint'
|
873
890
|
include:
|
874
891
|
- '**/*.yaml'
|
@@ -1253,6 +1270,20 @@ PrePush:
|
|
1253
1270
|
required_executable: 'git-lfs'
|
1254
1271
|
install_command: 'brew install git-lfs'
|
1255
1272
|
|
1273
|
+
GolangciLint:
|
1274
|
+
enabled: false
|
1275
|
+
description: 'Analyze with golangci-lint'
|
1276
|
+
required_executable: 'golangci-lint'
|
1277
|
+
install_command: 'go get github.com/golangci/golangci-lint/cmd/golangci-lint'
|
1278
|
+
flags: ['--out-format=line-number', '--print-issued-lines=false']
|
1279
|
+
command: ['golangci-lint', 'run']
|
1280
|
+
|
1281
|
+
GoTest:
|
1282
|
+
enabled: false
|
1283
|
+
description: 'Run go test suite'
|
1284
|
+
required_executable: 'go'
|
1285
|
+
command: ['go', 'test', './...']
|
1286
|
+
|
1256
1287
|
Minitest:
|
1257
1288
|
enabled: false
|
1258
1289
|
description: 'Run Minitest test suite'
|
@@ -1266,6 +1297,13 @@ PrePush:
|
|
1266
1297
|
flags: ['--bootstrap', 'vendor/autoload.php', 'tests']
|
1267
1298
|
install_command: 'composer require --dev phpunit/phpunit'
|
1268
1299
|
|
1300
|
+
Pronto:
|
1301
|
+
enabled: false
|
1302
|
+
description: 'Analyzing with pronto'
|
1303
|
+
required_executable: 'pronto'
|
1304
|
+
install_command: 'gem install pronto'
|
1305
|
+
flags: ['run', '--exit-code']
|
1306
|
+
|
1269
1307
|
ProtectedBranches:
|
1270
1308
|
enabled: false
|
1271
1309
|
description: 'Check for illegal pushes to protected branches'
|
@@ -1,52 +1,55 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Overcommit::Exceptions
|
4
|
+
# Base error class.
|
5
|
+
class Error < StandardError; end
|
6
|
+
|
4
7
|
# Raised when a {Configuration} could not be loaded from a file.
|
5
|
-
class ConfigurationError <
|
8
|
+
class ConfigurationError < Error; end
|
6
9
|
|
7
10
|
# Raised when the Overcommit configuration file signature has changed.
|
8
|
-
class ConfigurationSignatureChanged <
|
11
|
+
class ConfigurationSignatureChanged < Error; end
|
9
12
|
|
10
13
|
# Raised when trying to read/write to/from the local repo git config fails.
|
11
|
-
class GitConfigError <
|
14
|
+
class GitConfigError < Error; end
|
12
15
|
|
13
16
|
# Raised when there was a problem reading submodule information for a repo.
|
14
|
-
class GitSubmoduleError <
|
17
|
+
class GitSubmoduleError < Error; end
|
15
18
|
|
16
19
|
# Raised when there was a problem reading git revision information with `rev-list`.
|
17
|
-
class GitRevListError <
|
20
|
+
class GitRevListError < Error; end
|
18
21
|
|
19
22
|
# Raised when a {HookContext} is unable to setup the environment before a run.
|
20
|
-
class HookSetupFailed <
|
23
|
+
class HookSetupFailed < Error; end
|
21
24
|
|
22
25
|
# Raised when a {HookContext} is unable to clean the environment after a run.
|
23
|
-
class HookCleanupFailed <
|
26
|
+
class HookCleanupFailed < Error; end
|
24
27
|
|
25
28
|
# Raised when a hook run was cancelled by the user.
|
26
|
-
class HookCancelled <
|
29
|
+
class HookCancelled < Error; end
|
27
30
|
|
28
31
|
# Raised when a hook could not be loaded by a {HookRunner}.
|
29
|
-
class HookLoadError <
|
32
|
+
class HookLoadError < Error; end
|
30
33
|
|
31
34
|
# Raised when a {HookRunner} could not be loaded.
|
32
|
-
class HookContextLoadError <
|
35
|
+
class HookContextLoadError < Error; end
|
33
36
|
|
34
37
|
# Raised when a pipe character is used in the `execute` helper, as this was
|
35
38
|
# likely used in error.
|
36
|
-
class InvalidCommandArgs <
|
39
|
+
class InvalidCommandArgs < Error; end
|
37
40
|
|
38
41
|
# Raised when an installation target is not a valid git repository.
|
39
|
-
class InvalidGitRepo <
|
42
|
+
class InvalidGitRepo < Error; end
|
40
43
|
|
41
44
|
# Raised when a hook was defined incorrectly.
|
42
|
-
class InvalidHookDefinition <
|
45
|
+
class InvalidHookDefinition < Error; end
|
43
46
|
|
44
47
|
# Raised when one or more hook plugin signatures have changed.
|
45
|
-
class InvalidHookSignature <
|
48
|
+
class InvalidHookSignature < Error; end
|
46
49
|
|
47
50
|
# Raised when there is a problem processing output into {Hook::Messages}s.
|
48
|
-
class MessageProcessingError <
|
51
|
+
class MessageProcessingError < Error; end
|
49
52
|
|
50
53
|
# Raised when an installation target already contains non-Overcommit hooks.
|
51
|
-
class PreExistingHooks <
|
54
|
+
class PreExistingHooks < Error; end
|
52
55
|
end
|
data/lib/overcommit/git_repo.rb
CHANGED
@@ -109,15 +109,16 @@ module Overcommit
|
|
109
109
|
# @return [Array<String>] list of absolute file paths
|
110
110
|
def list_files(paths = [], options = {})
|
111
111
|
ref = options[:ref] || 'HEAD'
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
112
|
+
|
113
|
+
result = Overcommit::Utils.execute(%W[git ls-tree --name-only #{ref}], args: paths)
|
114
|
+
unless result.success?
|
115
|
+
raise Overcommit::Exceptions::Error,
|
116
|
+
"Error listing files. EXIT STATUS(es): #{result.statuses}.\n" \
|
117
|
+
"STDOUT(s): #{result.stdouts}.\n" \
|
118
|
+
"STDERR(s): #{result.stderrs}."
|
119
|
+
end
|
120
|
+
|
121
|
+
result.stdout.split(/\n/).
|
121
122
|
map { |relative_file| File.expand_path(relative_file) }.
|
122
123
|
reject { |file| File.directory?(file) } # Exclude submodule directories
|
123
124
|
end
|
data/lib/overcommit/hook/base.rb
CHANGED
@@ -79,12 +79,18 @@ module Overcommit::Hook
|
|
79
79
|
@config['enabled'] != false
|
80
80
|
end
|
81
81
|
|
82
|
+
def excluded?
|
83
|
+
exclude_branches.any? { |p| File.fnmatch(p, current_branch) }
|
84
|
+
end
|
85
|
+
|
82
86
|
def skip?
|
83
|
-
@config['skip']
|
87
|
+
@config['skip'] ||
|
88
|
+
(@config['skip_if'] ? execute(@config['skip_if']).success? : false)
|
84
89
|
end
|
85
90
|
|
86
91
|
def run?
|
87
92
|
enabled? &&
|
93
|
+
!excluded? &&
|
88
94
|
!(@config['requires_files'] && applicable_files.empty?)
|
89
95
|
end
|
90
96
|
|
@@ -276,5 +282,13 @@ module Overcommit::Hook
|
|
276
282
|
status
|
277
283
|
end
|
278
284
|
end
|
285
|
+
|
286
|
+
def exclude_branches
|
287
|
+
@config['exclude_branches'] || []
|
288
|
+
end
|
289
|
+
|
290
|
+
def current_branch
|
291
|
+
@current_branch ||= Overcommit::GitRepo.current_branch
|
292
|
+
end
|
279
293
|
end
|
280
294
|
end
|
@@ -12,9 +12,9 @@ module Overcommit::Hook::PreCommit
|
|
12
12
|
result.stdout.chomp
|
13
13
|
end
|
14
14
|
|
15
|
-
|
15
|
+
if name.empty?
|
16
16
|
return :fail,
|
17
|
-
"Author must
|
17
|
+
"Author name must be non-0 in length.\n" \
|
18
18
|
'Set your name with `git config --global user.name "Your Name"` ' \
|
19
19
|
'or via the GIT_AUTHOR_NAME environment variable'
|
20
20
|
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Overcommit::Hook::PreCommit
|
4
|
+
# Runs go fmt for all modified Go files
|
5
|
+
class GoFmt < Base
|
6
|
+
def run
|
7
|
+
errors = []
|
8
|
+
applicable_files.each do |file|
|
9
|
+
result = execute(command, args: [file])
|
10
|
+
errors << (result.stdout + result.stderr) unless result.success?
|
11
|
+
end
|
12
|
+
return :pass if errors.empty?
|
13
|
+
|
14
|
+
[:fail, errors.join("\n")]
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Overcommit::Hook::PreCommit
|
4
|
+
# Runs `golangci-lint run` against any modified packages
|
5
|
+
#
|
6
|
+
# @see https://github.com/golangci/golangci-lint
|
7
|
+
class GolangciLint < Base
|
8
|
+
def run
|
9
|
+
packages = applicable_files.map { |f| File.dirname(f) }.uniq
|
10
|
+
result = execute(command, args: packages)
|
11
|
+
return :pass if result.success?
|
12
|
+
return [:fail, result.stderr] unless result.stderr.empty?
|
13
|
+
|
14
|
+
extract_messages(
|
15
|
+
result.stdout.split("\n"),
|
16
|
+
/^(?<file>(?:\w:)?[^:]+):(?<line>\d+)/,
|
17
|
+
nil
|
18
|
+
)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -19,9 +19,9 @@ module Overcommit::Hook::PreCommit
|
|
19
19
|
json_messages.map do |message|
|
20
20
|
Overcommit::Hook::Message.new(
|
21
21
|
:error,
|
22
|
-
message[
|
23
|
-
message[
|
24
|
-
message[
|
22
|
+
message['filename'],
|
23
|
+
message['line'],
|
24
|
+
"#{message['filename']}:#{message['line']} #{message['rule']} #{message['description']}"
|
25
25
|
)
|
26
26
|
end
|
27
27
|
end
|
@@ -12,21 +12,14 @@ module Overcommit::Hook::PreCommit
|
|
12
12
|
def run
|
13
13
|
messages = []
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
# Discard the csv header
|
21
|
-
rows.shift
|
22
|
-
|
23
|
-
# Push each of the errors in the particular file into the array
|
24
|
-
rows.map do |row|
|
25
|
-
messages << row
|
26
|
-
end
|
27
|
-
end
|
15
|
+
result = execute(command, args: applicable_files)
|
16
|
+
if result.status
|
17
|
+
messages = result.stdout.split("\n")
|
18
|
+
# Discard the csv header
|
19
|
+
messages.shift
|
28
20
|
end
|
29
21
|
|
22
|
+
return :fail if messages.empty? && !result.success?
|
30
23
|
return :pass if messages.empty?
|
31
24
|
|
32
25
|
parse_messages(messages)
|
@@ -1,23 +1,12 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'overcommit/hook/shared/pronto'
|
4
|
+
|
3
5
|
module Overcommit::Hook::PreCommit
|
4
6
|
# Runs `pronto`
|
5
7
|
#
|
6
8
|
# @see https://github.com/mmozuras/pronto
|
7
9
|
class Pronto < Base
|
8
|
-
|
9
|
-
type.include?('E') ? :error : :warning
|
10
|
-
end
|
11
|
-
|
12
|
-
def run
|
13
|
-
result = execute(command)
|
14
|
-
return :pass if result.success?
|
15
|
-
|
16
|
-
extract_messages(
|
17
|
-
result.stdout.split("\n"),
|
18
|
-
/^(?<file>(?:\w:)?[^:]+):(?<line>\d+) (?<type>[^ ]+)/,
|
19
|
-
MESSAGE_TYPE_CATEGORIZER,
|
20
|
-
)
|
21
|
-
end
|
10
|
+
include Overcommit::Hook::Shared::Pronto
|
22
11
|
end
|
23
12
|
end
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'forwardable'
|
4
|
+
require 'overcommit/utils/messages_utils'
|
4
5
|
|
5
6
|
module Overcommit::Hook::PrePush
|
6
7
|
# Functionality common to all pre-push hooks.
|
@@ -8,5 +9,25 @@ module Overcommit::Hook::PrePush
|
|
8
9
|
extend Forwardable
|
9
10
|
|
10
11
|
def_delegators :@context, :remote_name, :remote_url, :pushed_refs
|
12
|
+
|
13
|
+
def run?
|
14
|
+
super &&
|
15
|
+
!exclude_remotes.include?(remote_name) &&
|
16
|
+
(include_remote_ref_deletions? || !@context.remote_ref_deletion?)
|
17
|
+
end
|
18
|
+
|
19
|
+
private
|
20
|
+
|
21
|
+
def extract_messages(*args)
|
22
|
+
Overcommit::Utils::MessagesUtils.extract_messages(*args)
|
23
|
+
end
|
24
|
+
|
25
|
+
def exclude_remotes
|
26
|
+
@config['exclude_remotes'] || []
|
27
|
+
end
|
28
|
+
|
29
|
+
def include_remote_ref_deletions?
|
30
|
+
@config['include_remote_ref_deletions']
|
31
|
+
end
|
11
32
|
end
|
12
33
|
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Overcommit::Hook::PrePush
|
4
|
+
# Runs `go test ./...` command on prepush
|
5
|
+
class GoTest < Base
|
6
|
+
def run
|
7
|
+
result = execute(command)
|
8
|
+
return :pass if result.success?
|
9
|
+
|
10
|
+
output = result.stdout + result.stderr
|
11
|
+
[:fail, output]
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Overcommit::Hook::PrePush
|
4
|
+
# Runs golangci-lint
|
5
|
+
#
|
6
|
+
# @see https://github.com/golangci/golangci-lint
|
7
|
+
class GolangciLint < Base
|
8
|
+
def run
|
9
|
+
result = execute(command)
|
10
|
+
return :pass if result.success?
|
11
|
+
|
12
|
+
output = result.stdout + result.stderr
|
13
|
+
[:fail, output]
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -1,7 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Overcommit::Hook::PrePush
|
4
|
-
# Prevents
|
4
|
+
# Prevents updates to specified branches.
|
5
|
+
# Accepts a 'destructive_only' option globally or per branch
|
6
|
+
# to only prevent destructive updates.
|
5
7
|
class ProtectedBranches < Base
|
6
8
|
def run
|
7
9
|
return :pass unless illegal_pushes.any?
|
@@ -17,32 +19,55 @@ module Overcommit::Hook::PrePush
|
|
17
19
|
|
18
20
|
def illegal_pushes
|
19
21
|
@illegal_pushes ||= pushed_refs.select do |pushed_ref|
|
20
|
-
protected?(pushed_ref
|
22
|
+
protected?(pushed_ref)
|
21
23
|
end
|
22
24
|
end
|
23
25
|
|
24
|
-
def protected?(
|
26
|
+
def protected?(ref)
|
27
|
+
find_pattern(ref.remote_ref)&.destructive?(ref)
|
28
|
+
end
|
29
|
+
|
30
|
+
def find_pattern(remote_ref)
|
25
31
|
ref_name = remote_ref[%r{refs/heads/(.*)}, 1]
|
26
|
-
return
|
27
|
-
|
28
|
-
|
32
|
+
return if ref_name.nil?
|
33
|
+
|
34
|
+
patterns.find do |pattern|
|
35
|
+
File.fnmatch(pattern.to_s, ref_name)
|
29
36
|
end
|
30
37
|
end
|
31
38
|
|
32
|
-
def
|
33
|
-
@
|
34
|
-
concat(Array(config['branch_patterns']))
|
39
|
+
def patterns
|
40
|
+
@patterns ||= fetch_patterns
|
35
41
|
end
|
36
42
|
|
37
|
-
def
|
43
|
+
def fetch_patterns
|
44
|
+
branch_configurations.map do |pattern|
|
45
|
+
if pattern.is_a?(Hash)
|
46
|
+
Pattern.new(pattern.keys.first, pattern['destructive_only'])
|
47
|
+
else
|
48
|
+
Pattern.new(pattern, global_destructive_only?)
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
def branch_configurations
|
54
|
+
config['branches'].to_a + config['branch_patterns'].to_a
|
55
|
+
end
|
56
|
+
|
57
|
+
def global_destructive_only?
|
38
58
|
config['destructive_only'].nil? || config['destructive_only']
|
39
59
|
end
|
40
60
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
61
|
+
Pattern = Struct.new('Pattern', :name, :destructive_only) do
|
62
|
+
alias_method :to_s, :name
|
63
|
+
alias_method :destructive_only?, :destructive_only
|
64
|
+
|
65
|
+
def destructive?(ref)
|
66
|
+
if destructive_only?
|
67
|
+
ref.destructive?
|
68
|
+
else
|
69
|
+
true
|
70
|
+
end
|
46
71
|
end
|
47
72
|
end
|
48
73
|
end
|
@@ -17,7 +17,7 @@ module Overcommit::Hook::PrepareCommitMsg
|
|
17
17
|
Overcommit::Utils.log.debug("Writing #{commit_message_filename} with #{new_template}")
|
18
18
|
|
19
19
|
modify_commit_message do |old_contents|
|
20
|
-
"#{new_template}
|
20
|
+
"#{new_template} #{old_contents}"
|
21
21
|
end
|
22
22
|
|
23
23
|
:pass
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Overcommit::Hook::Shared
|
4
|
+
# Shared code used by all Pronto hooks. Runs pronto linter.
|
5
|
+
module Pronto
|
6
|
+
MESSAGE_TYPE_CATEGORIZER = lambda do |type|
|
7
|
+
type.include?('E') ? :error : :warning
|
8
|
+
end
|
9
|
+
|
10
|
+
def run
|
11
|
+
result = execute(command)
|
12
|
+
return :pass if result.success?
|
13
|
+
|
14
|
+
extract_messages(
|
15
|
+
result.stdout.split("\n"),
|
16
|
+
/^(?<file>(?:\w:)?[^:]+):(?<line>\d+) (?<type>[^ ]+)/,
|
17
|
+
MESSAGE_TYPE_CATEGORIZER,
|
18
|
+
)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -13,6 +13,15 @@ module Overcommit::HookContext
|
|
13
13
|
@args[1]
|
14
14
|
end
|
15
15
|
|
16
|
+
def remote_ref_deletion?
|
17
|
+
return @remote_ref_deletion if defined?(@remote_ref_deletion)
|
18
|
+
|
19
|
+
@remote_ref_deletion ||= input_lines.
|
20
|
+
first&.
|
21
|
+
split(' ')&.
|
22
|
+
first == '(deleted)'
|
23
|
+
end
|
24
|
+
|
16
25
|
def pushed_refs
|
17
26
|
input_lines.map do |line|
|
18
27
|
PushedRef.new(*line.split(' '))
|
data/lib/overcommit/printer.rb
CHANGED
data/lib/overcommit/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: overcommit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.54.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shane da Silva
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-07-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: childprocess
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: 0.6.3
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '
|
22
|
+
version: '5'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: 0.6.3
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
32
|
+
version: '5'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: iniparse
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -139,8 +139,10 @@ files:
|
|
139
139
|
- lib/overcommit/hook/pre_commit/foodcritic.rb
|
140
140
|
- lib/overcommit/hook/pre_commit/forbidden_branches.rb
|
141
141
|
- lib/overcommit/hook/pre_commit/ginkgo_focus.rb
|
142
|
+
- lib/overcommit/hook/pre_commit/go_fmt.rb
|
142
143
|
- lib/overcommit/hook/pre_commit/go_lint.rb
|
143
144
|
- lib/overcommit/hook/pre_commit/go_vet.rb
|
145
|
+
- lib/overcommit/hook/pre_commit/golangci_lint.rb
|
144
146
|
- lib/overcommit/hook/pre_commit/hadolint.rb
|
145
147
|
- lib/overcommit/hook/pre_commit/haml_lint.rb
|
146
148
|
- lib/overcommit/hook/pre_commit/hard_tabs.rb
|
@@ -210,8 +212,11 @@ files:
|
|
210
212
|
- lib/overcommit/hook/pre_push/base.rb
|
211
213
|
- lib/overcommit/hook/pre_push/brakeman.rb
|
212
214
|
- lib/overcommit/hook/pre_push/cargo_test.rb
|
215
|
+
- lib/overcommit/hook/pre_push/go_test.rb
|
216
|
+
- lib/overcommit/hook/pre_push/golangci_lint.rb
|
213
217
|
- lib/overcommit/hook/pre_push/minitest.rb
|
214
218
|
- lib/overcommit/hook/pre_push/php_unit.rb
|
219
|
+
- lib/overcommit/hook/pre_push/pronto.rb
|
215
220
|
- lib/overcommit/hook/pre_push/protected_branches.rb
|
216
221
|
- lib/overcommit/hook/pre_push/pytest.rb
|
217
222
|
- lib/overcommit/hook/pre_push/python_nose.rb
|
@@ -227,6 +232,7 @@ files:
|
|
227
232
|
- lib/overcommit/hook/shared/composer_install.rb
|
228
233
|
- lib/overcommit/hook/shared/index_tags.rb
|
229
234
|
- lib/overcommit/hook/shared/npm_install.rb
|
235
|
+
- lib/overcommit/hook/shared/pronto.rb
|
230
236
|
- lib/overcommit/hook/shared/rake_target.rb
|
231
237
|
- lib/overcommit/hook/shared/submodule_status.rb
|
232
238
|
- lib/overcommit/hook/shared/yarn_install.rb
|
@@ -290,7 +296,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
290
296
|
- !ruby/object:Gem::Version
|
291
297
|
version: '0'
|
292
298
|
requirements: []
|
293
|
-
rubygems_version: 3.
|
299
|
+
rubygems_version: 3.1.1
|
294
300
|
signing_key:
|
295
301
|
specification_version: 4
|
296
302
|
summary: Git hook manager
|