overcommit 0.11.1 → 0.12.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2aebb6ab71945c02062f371523a8eea70e426379
4
- data.tar.gz: d767537a9df14218b77ca816f7052e5919d4edae
3
+ metadata.gz: 24385419d31ec2658a5088bbc7805f993e78f55d
4
+ data.tar.gz: 9532a577df43ec23f97c045f8539dd9d44a555f6
5
5
  SHA512:
6
- metadata.gz: f167631135213cc30d439e469b3d53a40a48aa9c67d845062ff34884db8306764a9c15d54a326e27211124dc7a579ef31567ce03e5d38aaafc284e81de61a69f
7
- data.tar.gz: 03a5d3bd2062ba1c1757383559dab5b1052ceb34793d299aa11f7d91723dc182cda515ca48e999662e3779dd15a16d82c4f70bf435150f091d224158c06df6a0
6
+ metadata.gz: 6573a5e8d63690e215e693d6a0d1a920632a1687bb008c689b0aae0e4ab563cc7668214cbdfc2002eb55efb9f304334a7b82dd053d7f90829d33cdf915626276
7
+ data.tar.gz: 0e32d2d386baf428288518982dbc52c1751d1d8a90e7e806f634f7e368aa0a698892b43f86ec684aa96168218ba66e8dff37455dbe475fe3e9bd25a069ff27b0
data/config/default.yml CHANGED
@@ -28,7 +28,8 @@ PostCheckout:
28
28
  - 'Gemfile.lock'
29
29
  - '*.gemspec'
30
30
  IndexTags:
31
- description: 'Indexing source code tags'
31
+ description: 'Generating tags file from source'
32
+ enabled: false
32
33
 
33
34
  # Hooks that are run after `git commit` is executed, before the commit message
34
35
  # editor is displayed. These hooks are ideal for syntax checkers, linters, and
@@ -79,12 +80,18 @@ PreCommit:
79
80
  description: 'Analyzing with csslint'
80
81
  include: '**/*.css'
81
82
 
83
+ GoLint:
84
+ description: 'Analyzing with golint'
85
+ include: '**/*.go'
86
+
82
87
  HamlLint:
83
88
  description: 'Analyzing with haml-lint'
84
89
  include: '**/*.haml'
85
90
 
86
91
  HardTabs:
87
92
  description: 'Checking for hard tabs'
93
+ exclude:
94
+ - '**/*.go'
88
95
 
89
96
  ImageOptim:
90
97
  description: 'Checking for optimizable images'
@@ -0,0 +1,16 @@
1
+ module Overcommit::Hook::PreCommit
2
+ # Runs `golint` against any modified Golang files.
3
+ class GoLint < Base
4
+ def run
5
+ unless in_path?('golint')
6
+ return :warn, 'Run `go get `github.com/golang/lint/golint`'
7
+ end
8
+
9
+ result = execute(%w[golint] + applicable_files)
10
+ # Unfortunately the exit code is always 0
11
+ return :good if result.stdout.empty?
12
+
13
+ [:bad, result.stdout]
14
+ end
15
+ end
16
+ end
@@ -1,4 +1,4 @@
1
1
  # Defines the gem version.
2
2
  module Overcommit
3
- VERSION = '0.11.1'
3
+ VERSION = '0.12.0'
4
4
  end
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.11.1
4
+ version: 0.12.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: 2014-06-02 00:00:00.000000000 Z
12
+ date: 2014-06-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: childprocess
@@ -43,16 +43,16 @@ dependencies:
43
43
  name: rspec
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - '='
46
+ - - ~>
47
47
  - !ruby/object:Gem::Version
48
- version: 2.14.1
48
+ version: '3.0'
49
49
  type: :development
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - '='
53
+ - - ~>
54
54
  - !ruby/object:Gem::Version
55
- version: 2.14.1
55
+ version: '3.0'
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: image_optim
58
58
  requirement: !ruby/object:Gem::Requirement
@@ -111,6 +111,7 @@ files:
111
111
  - lib/overcommit/hook/pre_commit/berksfile_check.rb
112
112
  - lib/overcommit/hook/pre_commit/merge_conflicts.rb
113
113
  - lib/overcommit/hook/pre_commit/trailing_whitespace.rb
114
+ - lib/overcommit/hook/pre_commit/go_lint.rb
114
115
  - lib/overcommit/hook/pre_commit/author_name.rb
115
116
  - lib/overcommit/hook/pre_commit/rubocop.rb
116
117
  - lib/overcommit/hook/pre_commit/python_flake8.rb