lcgstyle 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -39,6 +39,9 @@ AllCops:
39
39
  # behavior by overriding DisplayStyleGuide, or by giving the
40
40
  # -S/--display-style-guide option.
41
41
  DisplayStyleGuide: false
42
+ # When specifying style guide URLs, any paths and/or fragments will be
43
+ # evaluated relative to the base URL.
44
+ StyleGuideBaseURL: https://github.com/bbatsov/ruby-style-guide
42
45
  # Extra details are not displayed in offense messages by default. Change
43
46
  # behavior by overriding ExtraDetails, or by giving the
44
47
  # -E/--extra-details option.
@@ -77,7 +80,7 @@ AllCops:
77
80
  # run on? (If there is more than one, set this to the lowest version.)
78
81
  # If a value is specified for TargetRubyVersion then it is used.
79
82
  # Else if .ruby-version exists and it contains an MRI version it is used.
80
- # Otherwise we fallback to the oldest officially supported Ruby version (2.0).
83
+ # Otherwise we fallback to the oldest officially supported Ruby version (2.1).
81
84
  TargetRubyVersion: ~
82
85
 
83
86
  # Indent private/protected/public as deep as method definitions
@@ -395,6 +398,9 @@ Style/Copyright:
395
398
  Notice: '^Copyright (\(c\) )?2[0-9]{3} .+'
396
399
  AutocorrectNotice: ''
397
400
 
401
+ Style/DocumentationMethod:
402
+ RequireForNonPublicMethods: false
403
+
398
404
  # Multi-line method chaining should be done with leading dots.
399
405
  Style/DotPosition:
400
406
  EnforcedStyle: leading
@@ -429,12 +435,14 @@ Style/EmptyLinesAroundClassBody:
429
435
  EnforcedStyle: no_empty_lines
430
436
  SupportedStyles:
431
437
  - empty_lines
438
+ - empty_lines_except_namespace
432
439
  - no_empty_lines
433
440
 
434
441
  Style/EmptyLinesAroundModuleBody:
435
442
  EnforcedStyle: no_empty_lines
436
443
  SupportedStyles:
437
444
  - empty_lines
445
+ - empty_lines_except_namespace
438
446
  - no_empty_lines
439
447
 
440
448
  # Checks whether the source file has a utf-8 encoding comment or not
@@ -532,9 +540,14 @@ Style/GuardClause:
532
540
  Style/HashSyntax:
533
541
  EnforcedStyle: ruby19
534
542
  SupportedStyles:
543
+ # checks for 1.9 syntax (e.g. {a: 1}) for all symbol keys
535
544
  - ruby19
536
- - ruby19_no_mixed_keys
545
+ # checks for hash rocket syntax for all hashes
537
546
  - hash_rockets
547
+ # forbids mixed key syntaxes (e.g. {a: 1, :b => 2})
548
+ - no_mixed_keys
549
+ # enforces both ruby19 and no_mixed_keys styles
550
+ - ruby19_no_mixed_keys
538
551
  # Force hashes that have a symbol value to use hash rockets
539
552
  UseHashRocketsWithSymbolValues: false
540
553
  # Do not suggest { a?: 1 } over { :a? => 1 } in ruby19 style
@@ -616,6 +629,12 @@ Style/Lambda:
616
629
  - lambda
617
630
  - literal
618
631
 
632
+ Style/SpaceInLambdaLiteral:
633
+ EnforcedStyle: require_no_space
634
+ SupportedStyles:
635
+ - require_no_space
636
+ - require_space
637
+
619
638
  Style/LambdaCall:
620
639
  EnforcedStyle: call
621
640
  SupportedStyles:
@@ -648,6 +667,10 @@ Style/NumericPredicate:
648
667
  SupportedStyles:
649
668
  - predicate
650
669
  - comparison
670
+ # Exclude RSpec specs because assertions like `expect(1).to be > 0` cause
671
+ # false positives.
672
+ Exclude:
673
+ - 'spec/**/*'
651
674
 
652
675
  Style/MethodDefParentheses:
653
676
  EnforcedStyle: require_parentheses
@@ -771,6 +794,7 @@ Style/PercentLiteralDelimiters:
771
794
  PreferredDelimiters:
772
795
  '%': ()
773
796
  '%i': ()
797
+ '%I': ()
774
798
  '%q': ()
775
799
  '%Q': ()
776
800
  '%r': '{}'
@@ -805,6 +829,12 @@ Style/PredicateName:
805
829
  Exclude:
806
830
  - 'spec/**/*'
807
831
 
832
+ Style/PreferredHashMethods:
833
+ EnforcedStyle: short
834
+ SupportedStyles:
835
+ - short
836
+ - verbose
837
+
808
838
  Style/RaiseArgs:
809
839
  EnforcedStyle: exploded
810
840
  SupportedStyles:
@@ -829,6 +859,11 @@ Style/RegexpLiteral:
829
859
  # are found in the regexp string.
830
860
  AllowInnerSlashes: false
831
861
 
862
+ Style/SafeNavigation:
863
+ # Safe navigation may cause a statement to start returning `nil` in addition
864
+ # to whatever it used to return.
865
+ ConvertCodeThatCanStartToReturnNil: false
866
+
832
867
  Style/Semicolon:
833
868
  # Allow ; to separate several expressions on the same line.
834
869
  AllowAsExpressionSeparator: false
@@ -843,11 +878,11 @@ Style/SignalException:
843
878
  Style/SingleLineBlockParams:
844
879
  Methods:
845
880
  - reduce:
846
- - a
847
- - e
881
+ - acc
882
+ - elem
848
883
  - inject:
849
- - a
850
- - e
884
+ - acc
885
+ - elem
851
886
 
852
887
  Style/SingleLineMethods:
853
888
  AllowIfMethodIsEmpty: true
@@ -1041,6 +1076,13 @@ Style/VariableName:
1041
1076
  - snake_case
1042
1077
  - camelCase
1043
1078
 
1079
+ Style/VariableNumber:
1080
+ EnforcedStyle: normalcase
1081
+ SupportedStyles:
1082
+ - snake_case
1083
+ - normalcase
1084
+ - non_integer
1085
+
1044
1086
  Style/WhileUntilModifier:
1045
1087
  MaxLineLength: 80
1046
1088
 
@@ -1062,7 +1104,7 @@ Style/WordArray:
1062
1104
  ##################### Metrics ##################################
1063
1105
 
1064
1106
  Metrics/AbcSize:
1065
- # The ABC size is a calculated magnitude, so this number can be a Fixnum or
1107
+ # The ABC size is a calculated magnitude, so this number can be an Integer or
1066
1108
  # a Float.
1067
1109
  Max: 15
1068
1110
 
@@ -1090,11 +1132,22 @@ Metrics/LineLength:
1090
1132
  URISchemes:
1091
1133
  - http
1092
1134
  - https
1135
+ # The IgnoreCopDirectives option causes the LineLength rule to ignore cop
1136
+ # directives like '# rubocop: enable ...' when calculating a line's length.
1137
+ IgnoreCopDirectives: false
1093
1138
 
1094
1139
  Metrics/MethodLength:
1095
1140
  CountComments: false # count full line comments?
1096
1141
  Max: 10
1097
1142
 
1143
+ Metrics/BlockLength:
1144
+ CountComments: false # count full line comments?
1145
+ Max: 25
1146
+ Exclude:
1147
+ - 'Rakefile'
1148
+ - '**/*.rake'
1149
+ - 'spec/**/*.rb'
1150
+
1098
1151
  Metrics/ParameterLists:
1099
1152
  Max: 5
1100
1153
  CountKeywordArgs: true
@@ -1192,6 +1245,10 @@ Rails/Date:
1192
1245
  - strict
1193
1246
  - flexible
1194
1247
 
1248
+ Rails/DynamicFindBy:
1249
+ Whitelist:
1250
+ - find_by_sql
1251
+
1195
1252
  Rails/Exit:
1196
1253
  Include:
1197
1254
  - app/**/*.rb
@@ -1212,6 +1269,10 @@ Rails/HasAndBelongsToMany:
1212
1269
  Include:
1213
1270
  - app/models/**/*.rb
1214
1271
 
1272
+ Rails/NotNullColumn:
1273
+ Include:
1274
+ - db/migrate/*.rb
1275
+
1215
1276
  Rails/Output:
1216
1277
  Include:
1217
1278
  - app/**/*.rb
@@ -1229,6 +1290,13 @@ Rails/RequestReferer:
1229
1290
  - referer
1230
1291
  - referrer
1231
1292
 
1293
+ Rails/SafeNavigation:
1294
+ # This will convert usages of `try` to use safe navigation as well as `try!`.
1295
+ # `try` and `try!` work slighly differently. `try!` and safe navigation will
1296
+ # both raise a `NoMethodError` if the receiver of the method call does not
1297
+ # implement the intended method. `try` will not raise an exception for this.
1298
+ ConvertTry: false
1299
+
1232
1300
  Rails/ScopeArgs:
1233
1301
  Include:
1234
1302
  - app/models/**/*.rb
@@ -1,4 +1,4 @@
1
1
  module Lcgstyle
2
- VERSION = "0.0.4".freeze
3
- RUBOCOP_VERSION = "0.42.0".freeze
2
+ VERSION = "0.0.5".freeze
3
+ RUBOCOP_VERSION = "0.45.0".freeze
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lcgstyle
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thom May
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-09 00:00:00.000000000 Z
11
+ date: 2016-11-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - '='
60
60
  - !ruby/object:Gem::Version
61
- version: 0.42.0
61
+ version: 0.45.0
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - '='
67
67
  - !ruby/object:Gem::Version
68
- version: 0.42.0
68
+ version: 0.45.0
69
69
  description:
70
70
  email:
71
71
  - thom@chef.io
@@ -111,7 +111,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
111
111
  version: '0'
112
112
  requirements: []
113
113
  rubyforge_project:
114
- rubygems_version: 2.5.1
114
+ rubygems_version: 2.6.8
115
115
  signing_key:
116
116
  specification_version: 4
117
117
  summary: Rubocop configuration for Chef's ruby projects