rubocop-git-kjanoudi 0.1.2

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.
Files changed (56) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +11 -0
  3. data/.travis.yml +31 -0
  4. data/Appraisals +30 -0
  5. data/Gemfile +3 -0
  6. data/LICENSE.txt +26 -0
  7. data/README.md +41 -0
  8. data/Rakefile +15 -0
  9. data/bin/rubocop-git +5 -0
  10. data/gemfiles/0.24.gemfile +7 -0
  11. data/gemfiles/0.25.gemfile +7 -0
  12. data/gemfiles/0.26.gemfile +7 -0
  13. data/gemfiles/0.27.gemfile +7 -0
  14. data/gemfiles/0.28.gemfile +7 -0
  15. data/gemfiles/0.29.gemfile +7 -0
  16. data/gemfiles/0.30.gemfile +7 -0
  17. data/gemfiles/0.31.gemfile +7 -0
  18. data/gemfiles/0.32.gemfile +7 -0
  19. data/gemfiles/0.33.gemfile +7 -0
  20. data/gemfiles/0.34.gemfile +7 -0
  21. data/gemfiles/0.35.gemfile +7 -0
  22. data/gemfiles/0.36.gemfile +7 -0
  23. data/gemfiles/0.37.gemfile +7 -0
  24. data/gemfiles/0.38.gemfile +7 -0
  25. data/gemfiles/0.39.gemfile +7 -0
  26. data/gemfiles/0.40.gemfile +7 -0
  27. data/gemfiles/0.41.gemfile +7 -0
  28. data/gemfiles/0.42.gemfile +7 -0
  29. data/gemfiles/0.43.gemfile +7 -0
  30. data/gemfiles/0.44.gemfile +7 -0
  31. data/gemfiles/0.45.gemfile +7 -0
  32. data/gemfiles/0.46.gemfile +7 -0
  33. data/gemfiles/0.47.gemfile +7 -0
  34. data/hound.yml +254 -0
  35. data/lib/rubocop/git.rb +22 -0
  36. data/lib/rubocop/git/cli.rb +71 -0
  37. data/lib/rubocop/git/commit.rb +22 -0
  38. data/lib/rubocop/git/commit_file.rb +51 -0
  39. data/lib/rubocop/git/diff_parser.rb +31 -0
  40. data/lib/rubocop/git/file_violation.rb +5 -0
  41. data/lib/rubocop/git/line.rb +8 -0
  42. data/lib/rubocop/git/options.rb +84 -0
  43. data/lib/rubocop/git/patch.rb +63 -0
  44. data/lib/rubocop/git/pseudo_pull_request.rb +36 -0
  45. data/lib/rubocop/git/pseudo_resource.rb +16 -0
  46. data/lib/rubocop/git/rubo_comment.rb +92 -0
  47. data/lib/rubocop/git/runner.rb +67 -0
  48. data/lib/rubocop/git/style_checker.rb +43 -0
  49. data/lib/rubocop/git/style_guide.rb +98 -0
  50. data/lib/rubocop/git/version.rb +5 -0
  51. data/rubocop-git-kjanoudi.gemspec +27 -0
  52. data/test/rubocop/git/cli_test.rb +12 -0
  53. data/test/rubocop/git/options_test.rb +18 -0
  54. data/test/rubocop/git/runner_test.rb +23 -0
  55. data/test/test_helper.rb +2 -0
  56. metadata +173 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 6acd40073c4d4e34f4b13374f1b5ed5d96263b94
4
+ data.tar.gz: 102a845f60770e119051e3962e76904dbb68a64b
5
+ SHA512:
6
+ metadata.gz: 61b5634ff1ad7b29ea6fa5c429b24fa24dcfa461fa33cd61ed5f04de1b75f0732219706891b7f65522350c924d36888975b3f87279b257a0612e5b43b09a4367
7
+ data.tar.gz: c3c3fa131543c44ed203e075cfa77181a6fcdbc6a69f17796645e5426eebc837483fd73e0950c5435e068a965e87a6efcbd777b9a882f5433818dcd05c134014
data/.gitignore ADDED
@@ -0,0 +1,11 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+
11
+ /gemfiles/*.gemfile.lock
data/.travis.yml ADDED
@@ -0,0 +1,31 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.1.10
4
+ - 2.4.0
5
+ gemfile:
6
+ - gemfiles/0.24.gemfile
7
+ - gemfiles/0.25.gemfile
8
+ - gemfiles/0.26.gemfile
9
+ - gemfiles/0.27.gemfile
10
+ - gemfiles/0.28.gemfile
11
+ - gemfiles/0.29.gemfile
12
+ - gemfiles/0.30.gemfile
13
+ - gemfiles/0.31.gemfile
14
+ - gemfiles/0.32.gemfile
15
+ - gemfiles/0.33.gemfile
16
+ - gemfiles/0.34.gemfile
17
+ - gemfiles/0.35.gemfile
18
+ - gemfiles/0.36.gemfile
19
+ - gemfiles/0.37.gemfile
20
+ - gemfiles/0.38.gemfile
21
+ - gemfiles/0.39.gemfile
22
+ - gemfiles/0.40.gemfile
23
+ - gemfiles/0.41.gemfile
24
+ - gemfiles/0.42.gemfile
25
+ - gemfiles/0.43.gemfile
26
+ - gemfiles/0.44.gemfile
27
+ - gemfiles/0.45.gemfile
28
+ - gemfiles/0.46.gemfile
29
+ - gemfiles/0.47.gemfile
30
+ before_install:
31
+ - gem update --system
data/Appraisals ADDED
@@ -0,0 +1,30 @@
1
+ %w(
2
+ 0.24.1
3
+ 0.25.0
4
+ 0.26.1
5
+ 0.27.1
6
+ 0.28.0
7
+ 0.29.1
8
+ 0.30.1
9
+ 0.31.0
10
+ 0.32.1
11
+ 0.33.0
12
+ 0.34.2
13
+ 0.35.1
14
+ 0.36.0
15
+ 0.37.2
16
+ 0.38.0
17
+ 0.39.0
18
+ 0.40.0
19
+ 0.41.2
20
+ 0.42.0
21
+ 0.43.0
22
+ 0.44.1
23
+ 0.45.0
24
+ 0.46.0
25
+ 0.47.1
26
+ ).each do |version|
27
+ appraise version[/\d+\.\d+/] do
28
+ gem 'rubocop', version
29
+ end
30
+ end
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,26 @@
1
+ Copyright (c) 2014 Masaki Takeuchi
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
+
24
+ Some code is:
25
+ Copyright (c) 2014 thoughtbot, inc.
26
+ Released under the MIT License in Hound, https://github.com/thoughtbot/hound
data/README.md ADDED
@@ -0,0 +1,41 @@
1
+ # RuboCop::Git
2
+
3
+ RuboCop for git diff.
4
+
5
+ [![Gem Version](https://badge.fury.io/rb/rubocop-git.svg)](http://badge.fury.io/rb/rubocop-git)
6
+ [![Build Status](https://travis-ci.org/m4i/rubocop-git.svg?branch=master)](https://travis-ci.org/m4i/rubocop-git)
7
+ [![Code Climate](https://codeclimate.com/github/m4i/rubocop-git.png)](https://codeclimate.com/github/m4i/rubocop-git)
8
+
9
+ ## Installation
10
+
11
+ Add this line to your application's Gemfile:
12
+
13
+ gem 'rubocop-git'
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install rubocop-git
22
+
23
+ ## Usage
24
+
25
+ Usage: rubocop-git [options] [[commit] commit]
26
+ -c, --config FILE Specify configuration file
27
+ -r, --require FILE Require Ruby file
28
+ -a, --auto-correct Auto-correct offenses
29
+ -d, --debug Display debug info
30
+ -D, --display-cop-names Display cop names in offense messages
31
+ --cached git diff --cached
32
+ --staged synonym of --cached
33
+ --hound Hound compatibility mode
34
+
35
+ ## Contributing
36
+
37
+ 1. Fork it ( https://github.com/m4i/rubocop-git/fork )
38
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
39
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
40
+ 4. Push to the branch (`git push origin my-new-feature`)
41
+ 5. Create a new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,15 @@
1
+ require 'bundler/gem_tasks'
2
+ require 'rake/testtask'
3
+ require 'appraisal'
4
+
5
+ Rake::TestTask.new(:test) do |t|
6
+ t.libs << 'test'
7
+ t.libs << 'lib'
8
+ t.test_files = FileList['test/**/*_test.rb']
9
+ end
10
+
11
+ if ENV['APPRAISAL_INITIALIZED'] || ENV['TRAVIS']
12
+ task default: :test
13
+ else
14
+ task default: :appraisal
15
+ end
data/bin/rubocop-git ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'rubocop/git/cli'
4
+
5
+ RuboCop::Git::CLI.new.run
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rubocop", "0.24.1"
6
+
7
+ gemspec :path => "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rubocop", "0.25.0"
6
+
7
+ gemspec :path => "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rubocop", "0.26.1"
6
+
7
+ gemspec :path => "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rubocop", "0.27.1"
6
+
7
+ gemspec :path => "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rubocop", "0.28.0"
6
+
7
+ gemspec :path => "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rubocop", "0.29.1"
6
+
7
+ gemspec :path => "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rubocop", "0.30.1"
6
+
7
+ gemspec :path => "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rubocop", "0.31.0"
6
+
7
+ gemspec :path => "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rubocop", "0.32.1"
6
+
7
+ gemspec :path => "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rubocop", "0.33.0"
6
+
7
+ gemspec :path => "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rubocop", "0.34.2"
6
+
7
+ gemspec :path => "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rubocop", "0.35.1"
6
+
7
+ gemspec :path => "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rubocop", "0.36.0"
6
+
7
+ gemspec :path => "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rubocop", "0.37.2"
6
+
7
+ gemspec :path => "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rubocop", "0.38.0"
6
+
7
+ gemspec :path => "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rubocop", "0.39.0"
6
+
7
+ gemspec :path => "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rubocop", "0.40.0"
6
+
7
+ gemspec :path => "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rubocop", "0.41.2"
6
+
7
+ gemspec :path => "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rubocop", "0.42.0"
6
+
7
+ gemspec :path => "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rubocop", "0.43.0"
6
+
7
+ gemspec :path => "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rubocop", "0.44.1"
6
+
7
+ gemspec :path => "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rubocop", "0.45.0"
6
+
7
+ gemspec :path => "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rubocop", "0.46.0"
6
+
7
+ gemspec :path => "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rubocop", "0.47.1"
6
+
7
+ gemspec :path => "../"
data/hound.yml ADDED
@@ -0,0 +1,254 @@
1
+ AllCops:
2
+ Exclude:
3
+ - db/schema.rb
4
+
5
+ AccessorMethodName:
6
+ Enabled: false
7
+
8
+ ActionFilter:
9
+ Enabled: false
10
+
11
+ Alias:
12
+ Enabled: false
13
+
14
+ ArrayJoin:
15
+ Enabled: false
16
+
17
+ AsciiComments:
18
+ Enabled: false
19
+
20
+ AsciiIdentifiers:
21
+ Enabled: false
22
+
23
+ Attr:
24
+ Enabled: false
25
+
26
+ BlockNesting:
27
+ Enabled: false
28
+
29
+ CaseEquality:
30
+ Enabled: false
31
+
32
+ CharacterLiteral:
33
+ Enabled: false
34
+
35
+ ClassAndModuleChildren:
36
+ Enabled: false
37
+
38
+ ClassLength:
39
+ Enabled: false
40
+
41
+ ClassVars:
42
+ Enabled: false
43
+
44
+ CollectionMethods:
45
+ PreferredMethods:
46
+ find: detect
47
+ reduce: inject
48
+ collect: map
49
+ find_all: select
50
+
51
+ ColonMethodCall:
52
+ Enabled: false
53
+
54
+ CommentAnnotation:
55
+ Enabled: false
56
+
57
+ CyclomaticComplexity:
58
+ Enabled: false
59
+
60
+ Delegate:
61
+ Enabled: false
62
+
63
+ DeprecatedHashMethods:
64
+ Enabled: false
65
+
66
+ Documentation:
67
+ Enabled: false
68
+
69
+ DotPosition:
70
+ EnforcedStyle: trailing
71
+
72
+ DoubleNegation:
73
+ Enabled: false
74
+
75
+ EachWithObject:
76
+ Enabled: false
77
+
78
+ EmptyLiteral:
79
+ Enabled: false
80
+
81
+ Encoding:
82
+ Enabled: false
83
+
84
+ EvenOdd:
85
+ Enabled: false
86
+
87
+ FileName:
88
+ Enabled: false
89
+
90
+ FlipFlop:
91
+ Enabled: false
92
+
93
+ FormatString:
94
+ Enabled: false
95
+
96
+ GlobalVars:
97
+ Enabled: false
98
+
99
+ GuardClause:
100
+ Enabled: false
101
+
102
+ IfUnlessModifier:
103
+ Enabled: false
104
+
105
+ IfWithSemicolon:
106
+ Enabled: false
107
+
108
+ Lambda:
109
+ Enabled: false
110
+
111
+ LambdaCall:
112
+ Enabled: false
113
+
114
+ LineEndConcatenation:
115
+ Enabled: false
116
+
117
+ LineLength:
118
+ Max: 80
119
+
120
+ MethodLength:
121
+ Enabled: false
122
+
123
+ ModuleFunction:
124
+ Enabled: false
125
+
126
+ NegatedIf:
127
+ Enabled: false
128
+
129
+ NegatedWhile:
130
+ Enabled: false
131
+
132
+ NilComparison:
133
+ Enabled: false
134
+
135
+ Not:
136
+ Enabled: false
137
+
138
+ NumericLiterals:
139
+ Enabled: false
140
+
141
+ OneLineConditional:
142
+ Enabled: false
143
+
144
+ OpMethod:
145
+ Enabled: false
146
+
147
+ ParameterLists:
148
+ Enabled: false
149
+
150
+ PercentLiteralDelimiters:
151
+ PreferredDelimiters:
152
+ '%': '{}'
153
+
154
+ PerlBackrefs:
155
+ Enabled: false
156
+
157
+ PredicateName:
158
+ NamePrefixBlacklist:
159
+ - is_
160
+
161
+ Proc:
162
+ Enabled: false
163
+
164
+ RaiseArgs:
165
+ Enabled: false
166
+
167
+ RegexpLiteral:
168
+ Enabled: false
169
+
170
+ SelfAssignment:
171
+ Enabled: false
172
+
173
+ SingleLineBlockParams:
174
+ Enabled: false
175
+
176
+ SingleLineMethods:
177
+ Enabled: false
178
+
179
+ SignalException:
180
+ Enabled: false
181
+
182
+ SpecialGlobalVars:
183
+ Enabled: false
184
+
185
+ StringLiterals:
186
+ EnforcedStyle: double_quotes
187
+
188
+ VariableInterpolation:
189
+ Enabled: false
190
+
191
+ TrailingComma:
192
+ Enabled: false
193
+
194
+ TrivialAccessors:
195
+ Enabled: false
196
+
197
+ VariableInterpolation:
198
+ Enabled: false
199
+
200
+ WhenThen:
201
+ Enabled: false
202
+
203
+ WhileUntilModifier:
204
+ Enabled: false
205
+
206
+ WordArray:
207
+ Enabled: false
208
+
209
+ # Lint
210
+
211
+ AmbiguousOperator:
212
+ Enabled: false
213
+
214
+ AmbiguousRegexpLiteral:
215
+ Enabled: false
216
+
217
+ AssignmentInCondition:
218
+ Enabled: false
219
+
220
+ ConditionPosition:
221
+ Enabled: false
222
+
223
+ DeprecatedClassMethods:
224
+ Enabled: false
225
+
226
+ ElseLayout:
227
+ Enabled: false
228
+
229
+ HandleExceptions:
230
+ Enabled: false
231
+
232
+ InvalidCharacterLiteral:
233
+ Enabled: false
234
+
235
+ LiteralInCondition:
236
+ Enabled: false
237
+
238
+ LiteralInInterpolation:
239
+ Enabled: false
240
+
241
+ Loop:
242
+ Enabled: false
243
+
244
+ ParenthesesAsGroupedExpression:
245
+ Enabled: false
246
+
247
+ RequireParentheses:
248
+ Enabled: false
249
+
250
+ UnderscorePrefixedVariableName:
251
+ Enabled: false
252
+
253
+ Void:
254
+ Enabled: false