config/default.yml in rubocop-0.42.0 vs config/default.yml in rubocop-0.43.0

- old
+ new

@@ -393,10 +393,13 @@ # Style/Copyright: Notice: '^Copyright (\(c\) )?2[0-9]{3} .+' AutocorrectNotice: '' +Style/DocumentationMethod: + RequireForNonPublicMethods: false + # Multi-line method chaining should be done with leading dots. Style/DotPosition: EnforcedStyle: leading SupportedStyles: - leading @@ -530,13 +533,18 @@ MinBodyLength: 1 Style/HashSyntax: EnforcedStyle: ruby19 SupportedStyles: + # checks for 1.9 syntax (e.g. {a: 1}) for all symbol keys - ruby19 - - ruby19_no_mixed_keys + # checks for hash rocket syntax for all hashes - hash_rockets + # forbids mixed key syntaxes (e.g. {a: 1, :b => 2}) + - no_mixed_keys + # enforces both ruby19 and no_mixed_keys styles + - ruby19_no_mixed_keys # Force hashes that have a symbol value to use hash rockets UseHashRocketsWithSymbolValues: false # Do not suggest { a?: 1 } over { :a? => 1 } in ruby19 style PreferHashRocketsForNonAlnumEndingSymbols: false @@ -646,10 +654,14 @@ Style/NumericPredicate: EnforcedStyle: predicate SupportedStyles: - predicate - comparison + # Exclude RSpec specs because assertions like `expect(1).to be > 0` cause + # false positives. + Exclude: + - 'spec/**/*' Style/MethodDefParentheses: EnforcedStyle: require_parentheses SupportedStyles: - require_parentheses @@ -1039,10 +1051,17 @@ EnforcedStyle: snake_case SupportedStyles: - snake_case - camelCase +Style/VariableNumber: + EnforcedStyle: normalcase + SupportedStyles: + - snake_case + - normalcase + - non_integer + Style/WhileUntilModifier: MaxLineLength: 80 # WordArray enforces how array literals of word-like strings should be expressed. Style/WordArray: @@ -1060,11 +1079,11 @@ WordRegex: !ruby/regexp '/\A[\p{Word}\n\t]+\z/' ##################### Metrics ################################## Metrics/AbcSize: - # The ABC size is a calculated magnitude, so this number can be a Fixnum or + # The ABC size is a calculated magnitude, so this number can be an Integer or # a Float. Max: 15 Metrics/BlockNesting: Max: 3 @@ -1210,10 +1229,14 @@ Rails/HasAndBelongsToMany: Include: - app/models/**/*.rb +Rails/NotNullColumn: + Include: + - db/migrate/*.rb + Rails/Output: Include: - app/**/*.rb - config/**/*.rb - db/**/*.rb @@ -1226,9 +1249,16 @@ Rails/RequestReferer: EnforcedStyle: referer SupportedStyles: - referer - referrer + +Rails/SafeNavigation: + # This will convert usages of `try` to use safe navigation as well as `try!`. + # `try` and `try!` work slighly differently. `try!` and safe navigation will + # both raise a `NoMethodError` if the receiver of the method call does not + # implement the intended method. `try` will not raise an exception for this. + ConvertTry: false Rails/ScopeArgs: Include: - app/models/**/*.rb