bang-style 0.1.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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 3148cd3b0c16dd480e234ace32e9128f6ec03b01
4
+ data.tar.gz: 6ef56f4492c630086df3bd8f1cfbb84192b1bae9
5
+ SHA512:
6
+ metadata.gz: 426983c5f44b63de5894ed357587b78c1ec2fd95d813987559e268fa6869605b374cb5dd26116c8a44725ed0dc35c814437ac38851fd273a9986f09b4a532099
7
+ data.tar.gz: e9614baccc80a7afd97c60109cda0a915c3c42a4f96c6ec6477d56f60bc97aa6ab8c312e6f843463520d5b5fba9441d2d3a3e1fb7ccee0d4f22bb6d59cfea386
data/.gitignore ADDED
@@ -0,0 +1,12 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+
11
+ # rspec failure tracking
12
+ .rspec_status
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
data/.rubocop.yml ADDED
@@ -0,0 +1,2 @@
1
+
2
+ inherit_from: default.yml
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source "https://rubygems.org"
2
+
3
+ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
+
5
+ # Specify your gem's dependencies in bang-style.gemspec
6
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2017 bangn
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,37 @@
1
+ # bang-style
2
+
3
+ My favorite ruby styles
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'bang-style'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install bang-style
20
+
21
+ ## Usage
22
+
23
+ Create a `.rubocop.yml` with the following directives:
24
+
25
+ ```yaml
26
+ inherit_gem:
27
+ bang-style:
28
+ - default.yml
29
+ ```
30
+
31
+ ## License
32
+
33
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
34
+
35
+ ## Credits
36
+
37
+ Inspired by [thoughtbot-guides](https://github.com/thoughtbot/guides/blob/master/style/ruby/.rubocop.yml)
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
@@ -0,0 +1,36 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path("../lib", __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require "bang/style/version"
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "bang-style"
8
+ spec.version = Bang::Style::VERSION
9
+ spec.authors = ["bangn"]
10
+ spec.email = ["thebangnguyen@gmail.com"]
11
+
12
+ spec.summary = "bangn favorite rubocop configuration"
13
+ spec.homepage = "https://github.com/bangn/bang-style"
14
+ spec.license = "MIT"
15
+
16
+ # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
17
+ # to allow pushing to a single host or delete this section to allow pushing to any host.
18
+ if spec.respond_to?(:metadata)
19
+ spec.metadata["allowed_push_host"] = "https://rubygems.org"
20
+ else
21
+ raise "RubyGems 2.0 or newer is required to protect against " \
22
+ "public gem pushes."
23
+ end
24
+
25
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
26
+ f.match(%r{^(test|spec|features)/})
27
+ end
28
+ spec.bindir = "exe"
29
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
30
+ spec.require_paths = ["lib"]
31
+
32
+ spec.add_dependency "rubocop", "~> 0.49.1"
33
+
34
+ spec.add_development_dependency "bundler", "~> 1.15"
35
+ spec.add_development_dependency "rake", "~> 10.0"
36
+ end
data/default.yml ADDED
@@ -0,0 +1,649 @@
1
+ AllCops:
2
+ Exclude:
3
+ - db/schema.rb
4
+
5
+ Style/AccessorMethodName:
6
+ Description: Check the naming of accessor methods for get_/set_.
7
+ Enabled: false
8
+
9
+ Style/Alias:
10
+ Description: 'Use alias_method instead of alias.'
11
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#alias-method'
12
+ Enabled: false
13
+
14
+ Style/ArrayJoin:
15
+ Description: 'Use Array#join instead of Array#*.'
16
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#array-join'
17
+ Enabled: false
18
+
19
+ Style/AsciiComments:
20
+ Description: 'Use only ascii symbols in comments.'
21
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-comments'
22
+ Enabled: false
23
+
24
+ Style/AsciiIdentifiers:
25
+ Description: 'Use only ascii symbols in identifiers.'
26
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-identifiers'
27
+ Enabled: false
28
+
29
+ Style/Attr:
30
+ Description: 'Checks for uses of Module#attr.'
31
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr'
32
+ Enabled: false
33
+
34
+ Metrics/BlockNesting:
35
+ Description: 'Avoid excessive block nesting'
36
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count'
37
+ Enabled: false
38
+
39
+ Style/CaseEquality:
40
+ Description: 'Avoid explicit use of the case equality operator(===).'
41
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-case-equality'
42
+ Enabled: false
43
+
44
+ Style/CharacterLiteral:
45
+ Description: 'Checks for uses of character literals.'
46
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-character-literals'
47
+ Enabled: false
48
+
49
+ Style/ClassAndModuleChildren:
50
+ Description: 'Checks style of children classes and modules.'
51
+ Enabled: true
52
+ EnforcedStyle: nested
53
+
54
+ Metrics/ClassLength:
55
+ Description: 'Avoid classes longer than 100 lines of code.'
56
+ Enabled: false
57
+
58
+ Metrics/ModuleLength:
59
+ Description: 'Avoid modules longer than 100 lines of code.'
60
+ Enabled: false
61
+
62
+ Style/ClassVars:
63
+ Description: 'Avoid the use of class variables.'
64
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-class-vars'
65
+ Enabled: false
66
+
67
+ Style/CollectionMethods:
68
+ Enabled: true
69
+ PreferredMethods:
70
+ find: detect
71
+ inject: reduce
72
+ collect: map
73
+ find_all: select
74
+
75
+ Style/ColonMethodCall:
76
+ Description: 'Do not use :: for method call.'
77
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#double-colons'
78
+ Enabled: false
79
+
80
+ Style/CommentAnnotation:
81
+ Description: >-
82
+ Checks formatting of special comments
83
+ (TODO, FIXME, OPTIMIZE, HACK, REVIEW).
84
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#annotate-keywords'
85
+ Enabled: false
86
+
87
+ Metrics/AbcSize:
88
+ Description: >-
89
+ A calculated magnitude based on number of assignments,
90
+ branches, and conditions.
91
+ Enabled: false
92
+
93
+ Metrics/BlockLength:
94
+ CountComments: true # count full line comments?
95
+ Max: 25
96
+ ExcludedMethods: []
97
+ Exclude:
98
+ - "spec/**/*"
99
+
100
+ Metrics/CyclomaticComplexity:
101
+ Description: >-
102
+ A complexity metric that is strongly correlated to the number
103
+ of test cases needed to validate a method.
104
+ Enabled: false
105
+
106
+ Rails/Delegate:
107
+ Description: 'Prefer delegate method for delegations.'
108
+ Enabled: false
109
+
110
+ Style/PreferredHashMethods:
111
+ Description: 'Checks use of `has_key?` and `has_value?` Hash methods.'
112
+ StyleGuide: '#hash-key'
113
+ Enabled: false
114
+
115
+ Style/Documentation:
116
+ Description: 'Document classes and non-namespace modules.'
117
+ Enabled: false
118
+
119
+ Style/DoubleNegation:
120
+ Description: 'Checks for uses of double negation (!!).'
121
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-bang-bang'
122
+ Enabled: false
123
+
124
+ Style/EachWithObject:
125
+ Description: 'Prefer `each_with_object` over `inject` or `reduce`.'
126
+ Enabled: false
127
+
128
+ Style/EmptyLiteral:
129
+ Description: 'Prefer literals to Array.new/Hash.new/String.new.'
130
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#literal-array-hash'
131
+ Enabled: false
132
+
133
+ # Checks whether the source file has a utf-8 encoding comment or not
134
+ # AutoCorrectEncodingComment must match the regex
135
+ # /#.*coding\s?[:=]\s?(?:UTF|utf)-8/
136
+ Style/Encoding:
137
+ Enabled: false
138
+
139
+ Style/EvenOdd:
140
+ Description: 'Favor the use of Fixnum#even? && Fixnum#odd?'
141
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
142
+ Enabled: false
143
+
144
+ Style/FileName:
145
+ Description: 'Use snake_case for source file names.'
146
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-files'
147
+ Enabled: false
148
+
149
+ Style/FrozenStringLiteralComment:
150
+ Description: >-
151
+ Add the frozen_string_literal comment to the top of files
152
+ to help transition from Ruby 2.3.0 to Ruby 3.0.
153
+ Enabled: false
154
+
155
+ Style/FlipFlop:
156
+ Description: 'Checks for flip flops'
157
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-flip-flops'
158
+ Enabled: false
159
+
160
+ Style/FormatString:
161
+ Description: 'Enforce the use of Kernel#sprintf, Kernel#format or String#%.'
162
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#sprintf'
163
+ Enabled: false
164
+
165
+ Style/GlobalVars:
166
+ Description: 'Do not introduce global variables.'
167
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#instance-vars'
168
+ Reference: 'http://www.zenspider.com/Languages/Ruby/QuickRef.html'
169
+ Enabled: false
170
+
171
+ Style/GuardClause:
172
+ Description: 'Check for conditionals that can be replaced with guard clauses'
173
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals'
174
+ Enabled: false
175
+
176
+ Style/IfUnlessModifier:
177
+ Description: >-
178
+ Favor modifier if/unless usage when you have a
179
+ single-line body.
180
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier'
181
+ Enabled: false
182
+
183
+ Style/IfWithSemicolon:
184
+ Description: 'Do not use if x; .... Use the ternary operator instead.'
185
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs'
186
+ Enabled: false
187
+
188
+ Style/InlineComment:
189
+ Description: 'Avoid inline comments.'
190
+ Enabled: false
191
+
192
+ Style/Lambda:
193
+ Description: 'Use the new lambda literal syntax for single-line blocks.'
194
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#lambda-multi-line'
195
+ Enabled: false
196
+
197
+ Style/LambdaCall:
198
+ Description: 'Use lambda.call(...) instead of lambda.(...).'
199
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc-call'
200
+ Enabled: false
201
+
202
+ Style/LineEndConcatenation:
203
+ Description: >-
204
+ Use \ instead of + or << to concatenate two string literals at
205
+ line end.
206
+ Enabled: false
207
+
208
+ Metrics/LineLength:
209
+ Description: 'Limit lines to 80 characters.'
210
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#80-character-limits'
211
+ Max: 80
212
+
213
+ Metrics/MethodLength:
214
+ Description: 'Avoid methods longer than 10 lines of code.'
215
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#short-methods'
216
+ Enabled: false
217
+
218
+ Style/ModuleFunction:
219
+ Description: 'Checks for usage of `extend self` in modules.'
220
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#module-function'
221
+ Enabled: false
222
+
223
+ Style/MutableConstant:
224
+ Enabled: false
225
+
226
+ Style/MultilineBlockChain:
227
+ Description: 'Avoid multi-line chains of blocks.'
228
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
229
+ Enabled: false
230
+
231
+ Style/NegatedIf:
232
+ Description: >-
233
+ Favor unless over if for negative conditions
234
+ (or control flow or).
235
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#unless-for-negatives'
236
+ Enabled: false
237
+
238
+ Style/NegatedWhile:
239
+ Description: 'Favor until over while for negative conditions.'
240
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#until-for-negatives'
241
+ Enabled: false
242
+
243
+ Style/Next:
244
+ Description: 'Use `next` to skip iteration instead of a condition at the end.'
245
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals'
246
+ Enabled: false
247
+
248
+ Style/NilComparison:
249
+ Description: 'Prefer x.nil? to x == nil.'
250
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
251
+ Enabled: false
252
+
253
+ Style/Not:
254
+ Description: 'Use ! instead of not.'
255
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bang-not-not'
256
+ Enabled: false
257
+
258
+ Style/NumericLiterals:
259
+ Description: >-
260
+ Add underscores to large numeric literals to improve their
261
+ readability.
262
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics'
263
+ Enabled: false
264
+
265
+ Style/OneLineConditional:
266
+ Description: >-
267
+ Favor the ternary operator(?:) over
268
+ if/then/else/end constructs.
269
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#ternary-operator'
270
+ Enabled: false
271
+
272
+ Style/OpMethod:
273
+ Description: 'When defining binary operators, name the argument other.'
274
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#other-arg'
275
+ Enabled: false
276
+
277
+ Metrics/ParameterLists:
278
+ Description: 'Avoid parameter lists longer than three or four parameters.'
279
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#too-many-params'
280
+ Enabled: false
281
+
282
+ Style/PercentLiteralDelimiters:
283
+ Description: 'Use `%`-literal delimiters consistently'
284
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-literal-braces'
285
+ Enabled: false
286
+
287
+ Style/PerlBackrefs:
288
+ Description: 'Avoid Perl-style regex back references.'
289
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers'
290
+ Enabled: false
291
+
292
+ Style/PredicateName:
293
+ Description: 'Check the names of predicate methods.'
294
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark'
295
+ NamePrefixBlacklist:
296
+ - is_
297
+ Exclude:
298
+ - spec/**/*
299
+
300
+ Style/Proc:
301
+ Description: 'Use proc instead of Proc.new.'
302
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc'
303
+ Enabled: false
304
+
305
+ Style/RaiseArgs:
306
+ Description: 'Checks the arguments passed to raise/fail.'
307
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#exception-class-messages'
308
+ Enabled: false
309
+
310
+ Style/RegexpLiteral:
311
+ Description: 'Use / or %r around regular expressions.'
312
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-r'
313
+ Enabled: false
314
+
315
+ Style/SelfAssignment:
316
+ Description: >-
317
+ Checks for places where self-assignment shorthand should have
318
+ been used.
319
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#self-assignment'
320
+ Enabled: false
321
+
322
+ Style/SingleLineBlockParams:
323
+ Description: 'Enforces the names of some block params.'
324
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#reduce-blocks'
325
+ Enabled: false
326
+
327
+ Style/SingleLineMethods:
328
+ Description: 'Avoid single-line methods.'
329
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-single-line-methods'
330
+ Enabled: false
331
+
332
+ Style/SignalException:
333
+ Description: 'Checks for proper usage of fail and raise.'
334
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#fail-method'
335
+ Enabled: false
336
+
337
+ Style/SpecialGlobalVars:
338
+ Description: 'Avoid Perl-style global variables.'
339
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms'
340
+ Enabled: false
341
+
342
+ Style/StringLiterals:
343
+ Description: 'Checks if uses of quotes match the configured preference.'
344
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-string-literals'
345
+ EnforcedStyle: single_quotes
346
+ Enabled: true
347
+
348
+ Style/TrailingCommaInArguments:
349
+ Description: 'Checks for trailing comma in argument lists.'
350
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
351
+ EnforcedStyleForMultiline: comma
352
+ SupportedStylesForMultiline:
353
+ - comma
354
+ - consistent_comma
355
+ - no_comma
356
+ Enabled: true
357
+
358
+ Style/TrailingCommaInLiteral:
359
+ Description: 'Checks for trailing comma in array and hash literals.'
360
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
361
+ EnforcedStyleForMultiline: comma
362
+ SupportedStylesForMultiline:
363
+ - comma
364
+ - consistent_comma
365
+ - no_comma
366
+ Enabled: true
367
+
368
+ Style/TrivialAccessors:
369
+ Description: 'Prefer attr_* methods to trivial readers/writers.'
370
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr_family'
371
+ Enabled: false
372
+
373
+ Style/VariableInterpolation:
374
+ Description: >-
375
+ Don't interpolate global, instance and class variables
376
+ directly in strings.
377
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#curlies-interpolate'
378
+ Enabled: false
379
+
380
+ Style/WhenThen:
381
+ Description: 'Use when x then ... for one-line cases.'
382
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#one-line-cases'
383
+ Enabled: false
384
+
385
+ Style/WhileUntilModifier:
386
+ Description: >-
387
+ Favor modifier while/until usage when you have a
388
+ single-line body.
389
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#while-as-a-modifier'
390
+ Enabled: false
391
+
392
+ Style/WordArray:
393
+ Description: 'Use %w or %W for arrays of words.'
394
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-w'
395
+ Enabled: false
396
+
397
+ # Layout
398
+
399
+ Layout/AlignParameters:
400
+ Description: 'Here we check if the parameters on a multi-line method call or definition are aligned.'
401
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-double-indent'
402
+ Enabled: false
403
+
404
+ Layout/DotPosition:
405
+ Description: 'Checks the position of the dot in multi-line method calls.'
406
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains'
407
+ EnforcedStyle: trailing
408
+
409
+ Layout/ExtraSpacing:
410
+ Description: 'Do not use unnecessary spacing.'
411
+ Enabled: true
412
+
413
+ Layout/MultilineOperationIndentation:
414
+ Description: >-
415
+ Checks indentation of binary operations that span more than
416
+ one line.
417
+ Enabled: true
418
+ EnforcedStyle: indented
419
+
420
+ Layout/MultilineMethodCallIndentation:
421
+ Description: >-
422
+ Checks indentation of method calls with the dot operator
423
+ that span more than one line.
424
+ Enabled: true
425
+ EnforcedStyle: indented
426
+
427
+ Layout/InitialIndentation:
428
+ Description: >-
429
+ Checks the indentation of the first non-blank non-comment line in a file.
430
+ Enabled: false
431
+
432
+ # Lint
433
+
434
+ Lint/AmbiguousOperator:
435
+ Description: >-
436
+ Checks for ambiguous operators in the first argument of a
437
+ method invocation without parentheses.
438
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-as-args'
439
+ Enabled: false
440
+
441
+ Lint/AmbiguousRegexpLiteral:
442
+ Description: >-
443
+ Checks for ambiguous regexp literals in the first argument of
444
+ a method invocation without parenthesis.
445
+ Enabled: false
446
+
447
+ Lint/AssignmentInCondition:
448
+ Description: "Don't use assignment in conditions."
449
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition'
450
+ Enabled: false
451
+
452
+ Lint/CircularArgumentReference:
453
+ Description: "Don't refer to the keyword argument in the default value."
454
+ Enabled: false
455
+
456
+ Lint/ConditionPosition:
457
+ Description: >-
458
+ Checks for condition placed in a confusing position relative to
459
+ the keyword.
460
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#same-line-condition'
461
+ Enabled: false
462
+
463
+ Lint/DeprecatedClassMethods:
464
+ Description: 'Check for deprecated class method calls.'
465
+ Enabled: false
466
+
467
+ Lint/DuplicatedKey:
468
+ Description: 'Check for duplicate keys in hash literals.'
469
+ Enabled: false
470
+
471
+ Lint/EachWithObjectArgument:
472
+ Description: 'Check for immutable argument given to each_with_object.'
473
+ Enabled: false
474
+
475
+ Lint/ElseLayout:
476
+ Description: 'Check for odd code arrangement in an else block.'
477
+ Enabled: false
478
+
479
+ Lint/FormatParameterMismatch:
480
+ Description: 'The number of parameters to format/sprint must match the fields.'
481
+ Enabled: false
482
+
483
+ Lint/HandleExceptions:
484
+ Description: "Don't suppress exception."
485
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions'
486
+ Enabled: false
487
+
488
+ Lint/InvalidCharacterLiteral:
489
+ Description: >-
490
+ Checks for invalid character literals with a non-escaped
491
+ whitespace character.
492
+ Enabled: false
493
+
494
+ Lint/LiteralInCondition:
495
+ Description: 'Checks of literals used in conditions.'
496
+ Enabled: false
497
+
498
+ Lint/LiteralInInterpolation:
499
+ Description: 'Checks for literals used in interpolation.'
500
+ Enabled: false
501
+
502
+ Lint/Loop:
503
+ Description: >-
504
+ Use Kernel#loop with break rather than begin/end/until or
505
+ begin/end/while for post-loop tests.
506
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#loop-with-break'
507
+ Enabled: false
508
+
509
+ Lint/NestedMethodDefinition:
510
+ Description: 'Do not use nested method definitions.'
511
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-methods'
512
+ Enabled: false
513
+
514
+ Lint/NonLocalExitFromIterator:
515
+ Description: 'Do not use return in iterator to cause non-local exit.'
516
+ Enabled: false
517
+
518
+ Lint/ParenthesesAsGroupedExpression:
519
+ Description: >-
520
+ Checks for method calls with a space before the opening
521
+ parenthesis.
522
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-no-spaces'
523
+ Enabled: false
524
+
525
+ Lint/RequireParentheses:
526
+ Description: >-
527
+ Use parentheses in the method call to avoid confusion
528
+ about precedence.
529
+ Enabled: false
530
+
531
+ Lint/UnderscorePrefixedVariableName:
532
+ Description: 'Do not use prefix `_` for a variable that is used.'
533
+ Enabled: false
534
+
535
+ Lint/UnneededDisable:
536
+ Description: >-
537
+ Checks for rubocop:disable comments that can be removed.
538
+ Note: this cop is not disabled when disabling all cops.
539
+ It must be explicitly disabled.
540
+ Enabled: false
541
+
542
+ Lint/Void:
543
+ Description: 'Possible use of operator/literal/variable in void context.'
544
+ Enabled: false
545
+
546
+ # Performance
547
+
548
+ Performance/CaseWhenSplat:
549
+ Description: >-
550
+ Place `when` conditions that use splat at the end
551
+ of the list of `when` branches.
552
+ Enabled: false
553
+
554
+ Performance/Count:
555
+ Description: >-
556
+ Use `count` instead of `select...size`, `reject...size`,
557
+ `select...count`, `reject...count`, `select...length`,
558
+ and `reject...length`.
559
+ Enabled: false
560
+
561
+ Performance/Detect:
562
+ Description: >-
563
+ Use `detect` instead of `select.first`, `find_all.first`,
564
+ `select.last`, and `find_all.last`.
565
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerabledetect-vs-enumerableselectfirst-code'
566
+ Enabled: false
567
+
568
+ Performance/FlatMap:
569
+ Description: >-
570
+ Use `Enumerable#flat_map`
571
+ instead of `Enumerable#map...Array#flatten(1)`
572
+ or `Enumberable#collect..Array#flatten(1)`
573
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablemaparrayflatten-vs-enumerableflat_map-code'
574
+ Enabled: false
575
+
576
+ Performance/ReverseEach:
577
+ Description: 'Use `reverse_each` instead of `reverse.each`.'
578
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablereverseeach-vs-enumerablereverse_each-code'
579
+ Enabled: false
580
+
581
+ Performance/Sample:
582
+ Description: >-
583
+ Use `sample` instead of `shuffle.first`,
584
+ `shuffle.last`, and `shuffle[Fixnum]`.
585
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#arrayshufflefirst-vs-arraysample-code'
586
+ Enabled: false
587
+
588
+ Performance/Size:
589
+ Description: >-
590
+ Use `size` instead of `count` for counting
591
+ the number of elements in `Array` and `Hash`.
592
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#arraycount-vs-arraysize-code'
593
+ Enabled: false
594
+
595
+ Performance/StringReplacement:
596
+ Description: >-
597
+ Use `tr` instead of `gsub` when you are replacing the same
598
+ number of characters. Use `delete` instead of `gsub` when
599
+ you are deleting characters.
600
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#stringgsub-vs-stringtr-code'
601
+ Enabled: false
602
+
603
+ # Rails
604
+
605
+ Rails/ActionFilter:
606
+ Description: 'Enforces consistent use of action filter methods.'
607
+ Enabled: false
608
+
609
+ Rails/Date:
610
+ Description: >-
611
+ Checks the correct usage of date aware methods,
612
+ such as Date.today, Date.current etc.
613
+ Enabled: false
614
+
615
+ Rails/FindBy:
616
+ Description: 'Prefer find_by over where.first.'
617
+ Enabled: false
618
+
619
+ Rails/FindEach:
620
+ Description: 'Prefer all.find_each over all.find.'
621
+ Enabled: false
622
+
623
+ Rails/HasAndBelongsToMany:
624
+ Description: 'Prefer has_many :through to has_and_belongs_to_many.'
625
+ Enabled: false
626
+
627
+ Rails/Output:
628
+ Description: 'Checks for calls to puts, print, etc.'
629
+ Enabled: false
630
+
631
+ Rails/ReadWriteAttribute:
632
+ Description: >-
633
+ Checks for read_attribute(:attr) and
634
+ write_attribute(:attr, val).
635
+ Enabled: false
636
+
637
+ Rails/ScopeArgs:
638
+ Description: 'Checks the arguments of ActiveRecord scopes.'
639
+ Enabled: false
640
+
641
+ Rails/TimeZone:
642
+ Description: 'Checks the correct usage of time zone aware methods.'
643
+ StyleGuide: 'https://github.com/bbatsov/rails-style-guide#time'
644
+ Reference: 'http://danilenko.org/2012/7/6/rails_timezones'
645
+ Enabled: false
646
+
647
+ Rails/Validation:
648
+ Description: 'Use validates :attribute, hash of validations.'
649
+ Enabled: false
data/lib/bang/style.rb ADDED
@@ -0,0 +1,7 @@
1
+ require "bang/style/version"
2
+
3
+ module Bang
4
+ module Style
5
+ # Your code goes here...
6
+ end
7
+ end
@@ -0,0 +1,5 @@
1
+ module Bang
2
+ module Style
3
+ VERSION = "0.1.0"
4
+ end
5
+ end
metadata ADDED
@@ -0,0 +1,98 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: bang-style
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - bangn
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2017-09-14 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rubocop
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 0.49.1
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 0.49.1
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.15'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.15'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '10.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '10.0'
55
+ description:
56
+ email:
57
+ - thebangnguyen@gmail.com
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - ".gitignore"
63
+ - ".rspec"
64
+ - ".rubocop.yml"
65
+ - Gemfile
66
+ - LICENSE.txt
67
+ - README.md
68
+ - Rakefile
69
+ - bang-style.gemspec
70
+ - default.yml
71
+ - lib/bang/style.rb
72
+ - lib/bang/style/version.rb
73
+ homepage: https://github.com/bangn/bang-style
74
+ licenses:
75
+ - MIT
76
+ metadata:
77
+ allowed_push_host: https://rubygems.org
78
+ post_install_message:
79
+ rdoc_options: []
80
+ require_paths:
81
+ - lib
82
+ required_ruby_version: !ruby/object:Gem::Requirement
83
+ requirements:
84
+ - - ">="
85
+ - !ruby/object:Gem::Version
86
+ version: '0'
87
+ required_rubygems_version: !ruby/object:Gem::Requirement
88
+ requirements:
89
+ - - ">="
90
+ - !ruby/object:Gem::Version
91
+ version: '0'
92
+ requirements: []
93
+ rubyforge_project:
94
+ rubygems_version: 2.6.11
95
+ signing_key:
96
+ specification_version: 4
97
+ summary: bangn favorite rubocop configuration
98
+ test_files: []