Zfilipin has uploaded a new change for review. https://gerrit.wikimedia.org/r/225324
Change subject: Updated RuboCop to the latest version ...................................................................... Updated RuboCop to the latest version Also updated RuboCop configuration files. Bug: T105002 Bug: T91485 Change-Id: I8dddc0ab039dff8e6b53e46e3c8f8a9f1fe0cdea --- M .rubocop.yml M .rubocop_todo.yml M Gemfile M Gemfile.lock 4 files changed, 147 insertions(+), 224 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant refs/changes/24/225324/1 diff --git a/.rubocop.yml b/.rubocop.yml index cc32da4..306f626 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1 +1,27 @@ inherit_from: .rubocop_todo.yml + +AllCops: + # Only enforce rules that have an entry in the style guide + StyleGuideCopsOnly: true + Exclude: + - 'mediawiki/**/*' + +# Please enable this when this offense is fixed +#Metrics/LineLength: +# Max: 100 + +Metrics/MethodLength: + Enabled: false + +Style/Alias: + Enabled: false + +Style/SignalException: + Enabled: false + +# Pick one and stay consistent +Style/StringLiterals: + EnforcedStyle: single_quotes + +Style/TrivialAccessors: + ExactNameMatch: true diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index cded2f4..902fc65 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,195 +1,110 @@ # This configuration was generated by `rubocop --auto-gen-config` -# on 2014-10-23 12:04:54 +0200 using RuboCop version 0.26.1. +# on 2015-07-16 17:39:35 -0500 using RuboCop version 0.32.1. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new # versions of RuboCop, may require this file to be generated again. -# Offense count: 96 -Lint/AmbiguousRegexpLiteral: - Enabled: false - -# Offense count: 2 +# Offense count: 11 # Configuration parameters: AllowSafeAssignment. Lint/AssignmentInCondition: Enabled: false -# Offense count: 5 -# Cop supports --auto-correct. -Lint/BlockAlignment: - Enabled: false - -# Offense count: 2 -# Configuration parameters: AlignWith, SupportedStyles. -Lint/DefEndAlignment: - Enabled: false - -# Offense count: 6 -# Cop supports --auto-correct. -Lint/DeprecatedClassMethods: - Enabled: false - -# Offense count: 4 +# Offense count: 3 Lint/HandleExceptions: Enabled: false -# Offense count: 2 -Lint/ParenthesesAsGroupedExpression: +# Offense count: 1 +Lint/NestedMethodDefinition: Enabled: false -# Offense count: 4 -Lint/ShadowingOuterLocalVariable: +# Offense count: 5 +Lint/RescueException: Enabled: false -# Offense count: 13 +# Offense count: 19 # Cop supports --auto-correct. Lint/UnusedBlockArgument: Enabled: false -# Offense count: 5 +# Offense count: 4 # Cop supports --auto-correct. Lint/UnusedMethodArgument: Enabled: false -# Offense count: 1 -Lint/Void: +# Offense count: 6 +Lint/UselessAssignment: Enabled: false -# Offense count: 2 -Metrics/BlockNesting: - Max: 4 - -# Offense count: 2 -# Configuration parameters: CountComments. -Metrics/ClassLength: - Max: 113 - -# Offense count: 6 -Metrics/CyclomaticComplexity: - Max: 10 - -# Offense count: 297 +# Offense count: 70 # Configuration parameters: AllowURI, URISchemes. Metrics/LineLength: - Max: 226 + Max: 470 -# Offense count: 30 -# Configuration parameters: CountComments. -Metrics/MethodLength: - Max: 45 - -# Offense count: 5 -Metrics/PerceivedComplexity: - Max: 15 - -# Offense count: 1 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. -Style/AccessModifierIndentation: - Enabled: false - -# Offense count: 2 -# Cop supports --auto-correct. -Style/Alias: - Enabled: false - -# Offense count: 12 +# Offense count: 16 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles. Style/AlignParameters: Enabled: false -# Offense count: 12 +# Offense count: 34 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles. Style/AndOr: Enabled: false -# Offense count: 28 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. -Style/BarePercentLiterals: +# Offense count: 1 +Style/AsciiComments: Enabled: false -# Offense count: 5 +# Offense count: 26 # Cop supports --auto-correct. -Style/Blocks: - Enabled: false - -# Offense count: 3 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. -Style/BracesAroundHashParameters: +# Configuration parameters: EnforcedStyle, SupportedStyles, ProceduralMethods, FunctionalMethods, IgnoredMethods. +Style/BlockDelimiters: Enabled: false # Offense count: 1 Style/CaseEquality: Enabled: false -# Offense count: 6 +# Offense count: 25 +# Cop supports --auto-correct. # Configuration parameters: IndentWhenRelativeTo, SupportedStyles, IndentOneStep. Style/CaseIndentation: Enabled: false # Offense count: 2 -# Configuration parameters: EnforcedStyle, SupportedStyles. -Style/ClassAndModuleChildren: +Style/ClassAndModuleCamelCase: Enabled: false -# Offense count: 3 +# Offense count: 1 # Cop supports --auto-correct. -# Configuration parameters: PreferredMethods. -Style/CollectionMethods: - Enabled: false - -# Offense count: 4 -# Configuration parameters: Keywords. -Style/CommentAnnotation: - Enabled: false - -# Offense count: 7 -# Cop supports --auto-correct. -Style/CommentIndentation: +Style/ColonMethodCall: Enabled: false # Offense count: 5 # Cop supports --auto-correct. +# Configuration parameters: Keywords. +Style/CommentAnnotation: + Enabled: false + +# Offense count: 6 +# Cop supports --auto-correct. Style/DefWithParentheses: Enabled: false -# Offense count: 73 -Style/Documentation: - Enabled: false - -# Offense count: 8 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. -Style/DotPosition: - Enabled: false - # Offense count: 2 +# Cop supports --auto-correct. +Style/DeprecatedHashMethods: + Enabled: false + +# Offense count: 6 Style/DoubleNegation: Enabled: false -# Offense count: 8 +# Offense count: 4 # Cop supports --auto-correct. -# Configuration parameters: AllowAdjacentOneLineDefs. -Style/EmptyLineBetweenDefs: - Enabled: false - -# Offense count: 10 -# Cop supports --auto-correct. -Style/EmptyLines: - Enabled: false - -# Offense count: 2 -# Cop supports --auto-correct. -Style/EmptyLinesAroundAccessModifier: - Enabled: false - -# Offense count: 9 -# Cop supports --auto-correct. -Style/EmptyLinesAroundBody: +Style/EmptyLiteral: Enabled: false # Offense count: 8 @@ -197,7 +112,12 @@ Style/FileName: Enabled: false -# Offense count: 124 +# Offense count: 2 +# Configuration parameters: EnforcedStyle, SupportedStyles. +Style/FormatString: + Enabled: false + +# Offense count: 56 # Configuration parameters: AllowedVariables. Style/GlobalVars: Enabled: false @@ -207,223 +127,200 @@ Style/GuardClause: Enabled: false -# Offense count: 87 +# Offense count: 239 # Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. +# Configuration parameters: EnforcedStyle, SupportedStyles, UseHashRocketsWithSymbolValues. Style/HashSyntax: Enabled: false # Offense count: 9 +# Cop supports --auto-correct. # Configuration parameters: MaxLineLength. Style/IfUnlessModifier: Enabled: false -# Offense count: 1 +# Offense count: 97 # Cop supports --auto-correct. -Style/IndentArray: - Enabled: false - -# Offense count: 1 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. -Style/IndentHash: - Enabled: false - -# Offense count: 17 -# Cop supports --auto-correct. -Style/IndentationConsistency: - Enabled: false - -# Offense count: 153 -# Cop supports --auto-correct. +# Configuration parameters: Width. Style/IndentationWidth: Enabled: false -# Offense count: 39 +# Offense count: 65 +# Cop supports --auto-correct. +Style/Lambda: + Enabled: false + +# Offense count: 3 # Cop supports --auto-correct. Style/LeadingCommentSpace: Enabled: false -# Offense count: 1 +# Offense count: 6 # Cop supports --auto-correct. Style/MethodCallParentheses: Enabled: false -# Offense count: 30 +# Offense count: 38 # Cop supports --auto-correct. Style/MultilineIfThen: Enabled: false -# Offense count: 48 +# Offense count: 18 # Cop supports --auto-correct. Style/NegatedIf: Enabled: false -# Offense count: 1 +# Offense count: 5 # Configuration parameters: EnforcedStyle, MinBodyLength, SupportedStyles. Style/Next: Enabled: false -# Offense count: 6 +# Offense count: 12 # Cop supports --auto-correct. Style/Not: Enabled: false -# Offense count: 1 +# Offense count: 7 # Cop supports --auto-correct. Style/NumericLiterals: - MinDigits: 7 + MinDigits: 11 -# Offense count: 4 +# Offense count: 2 +# Cop supports --auto-correct. +Style/ParallelAssignment: + Enabled: false + +# Offense count: 5 # Cop supports --auto-correct. # Configuration parameters: AllowSafeAssignment. Style/ParenthesesAroundCondition: Enabled: false -# Offense count: 27 +# Offense count: 13 # Cop supports --auto-correct. # Configuration parameters: PreferredDelimiters. Style/PercentLiteralDelimiters: Enabled: false -# Offense count: 5 +# Offense count: 11 # Cop supports --auto-correct. Style/PerlBackrefs: Enabled: false -# Offense count: 1 +# Offense count: 2 # Cop supports --auto-correct. Style/RedundantBegin: Enabled: false -# Offense count: 4 +# Offense count: 6 +# Cop supports --auto-correct. +# Configuration parameters: AllowMultipleReturnValues. +Style/RedundantReturn: + Enabled: false + +# Offense count: 5 # Cop supports --auto-correct. Style/RedundantSelf: Enabled: false -# Offense count: 2 +# Offense count: 7 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, SupportedStyles, AllowInnerSlashes. Style/RegexpLiteral: - MaxSlashes: 5 + Enabled: false -# Offense count: 4 +# Offense count: 5 Style/RescueModifier: Enabled: false -# Offense count: 2 +# Offense count: 4 # Cop supports --auto-correct. # Configuration parameters: AllowAsExpressionSeparator. Style/Semicolon: Enabled: false -# Offense count: 7 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. -Style/SignalException: +# Offense count: 1 +# Configuration parameters: Methods. +Style/SingleLineBlockParams: Enabled: false -# Offense count: 31 -# Cop supports --auto-correct. -Style/SpaceAfterColon: - Enabled: false - -# Offense count: 10 +# Offense count: 176 # Cop supports --auto-correct. Style/SpaceAfterComma: Enabled: false -# Offense count: 2 +# Offense count: 1 # Cop supports --auto-correct. -Style/SpaceAfterMethodName: +Style/SpaceAfterNot: Enabled: false -# Offense count: 1 +# Offense count: 4 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles. Style/SpaceAroundEqualsInParameterDefault: Enabled: false -# Offense count: 12 +# Offense count: 56 # Cop supports --auto-correct. +# Configuration parameters: MultiSpaceAllowedForOperators. Style/SpaceAroundOperators: Enabled: false -# Offense count: 18 +# Offense count: 39 # Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. -Style/SpaceBeforeBlockBraces: +Style/SpaceInsideBrackets: Enabled: false -# Offense count: 1 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters. -Style/SpaceInsideBlockBraces: - Enabled: true - -# Offense count: 56 +# Offense count: 66 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SupportedStyles. Style/SpaceInsideHashLiteralBraces: Enabled: false -# Offense count: 26 +# Offense count: 72 # Cop supports --auto-correct. Style/SpaceInsideParens: Enabled: false # Offense count: 4 # Cop supports --auto-correct. +Style/SpaceInsideRangeLiteral: + Enabled: false + +# Offense count: 5 +# Cop supports --auto-correct. Style/SpecialGlobalVars: Enabled: false -# Offense count: 886 +# Offense count: 978 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles. Style/StringLiterals: Enabled: false -# Offense count: 220 -# Cop supports --auto-correct. -Style/Tab: - Enabled: false - -# Offense count: 38 +# Offense count: 7 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles. Style/TrailingBlankLines: Enabled: false -# Offense count: 4 +# Offense count: 11 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyleForMultiline, SupportedStyles. Style/TrailingComma: Enabled: false -# Offense count: 3 +# Offense count: 11 # Cop supports --auto-correct. Style/TrailingWhitespace: Enabled: false -# Offense count: 28 -# Cop supports --auto-correct. -Style/UnneededPercentQ: - Enabled: false - -# Offense count: 2 -# Configuration parameters: EnforcedStyle, SupportedStyles. -Style/VariableName: - Enabled: false - # Offense count: 1 -# Cop supports --auto-correct. -Style/WhileUntilDo: +Style/UnlessElse: Enabled: false -# Offense count: 2 -# Configuration parameters: MaxLineLength. -Style/WhileUntilModifier: - Enabled: false - -# Offense count: 2 +# Offense count: 79 # Cop supports --auto-correct. +# Configuration parameters: WordRegex. Style/WordArray: - MinSize: 3 + MinSize: 7 diff --git a/Gemfile b/Gemfile index 35ea164..7ebd66f 100644 --- a/Gemfile +++ b/Gemfile @@ -5,7 +5,7 @@ # https://github.com/mitchellh/vagrant/issues/5546 gem 'vagrant', git: 'https://github.com/mitchellh/vagrant.git', tag: 'v1.7.2' - gem 'rubocop', require: false + gem 'rubocop', '~> 0.32.1', require: false end group :development, :test do diff --git a/Gemfile.lock b/Gemfile.lock index eee541c..5fc27be 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -23,7 +23,7 @@ PATH remote: . specs: - mediawiki-vagrant (0.6.0) + mediawiki-vagrant (0.7.1) GEM remote: https://rubygems.org/ @@ -32,8 +32,8 @@ gyoku (>= 0.4.0) nokogiri ast (2.0.0) - astrolabe (1.3.0) - parser (>= 2.2.0.pre.3, < 3.0) + astrolabe (1.3.1) + parser (~> 2.2) builder (3.2.2) byebug (3.5.1) columnize (~> 0.8) @@ -94,9 +94,9 @@ nokogiri (1.6.3.1) mini_portile (= 0.6.0) nori (1.1.5) - parser (2.2.0.2) + parser (2.2.2.6) ast (>= 1.1, < 3.0) - powerpack (0.0.9) + powerpack (0.1.1) pry (0.10.1) coderay (~> 1.1.0) method_source (~> 0.8.1) @@ -127,13 +127,13 @@ diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.2.0) rspec-support (3.2.0) - rubocop (0.28.0) + rubocop (0.32.1) astrolabe (~> 1.3) - parser (>= 2.2.0.pre.7, < 3.0) - powerpack (~> 0.0.6) + parser (>= 2.2.2.5, < 3.0) + powerpack (~> 0.1) rainbow (>= 1.99.1, < 3.0) ruby-progressbar (~> 1.4) - ruby-progressbar (1.7.1) + ruby-progressbar (1.7.5) rubyntlm (0.1.1) savon (0.9.5) akami (~> 1.0) @@ -169,6 +169,6 @@ mediawiki-vagrant! pry-byebug rspec (~> 3.1, >= 3.1.0) - rubocop + rubocop (~> 0.32.1) vagrant! yard (~> 0.8, >= 0.8.7.6) -- To view, visit https://gerrit.wikimedia.org/r/225324 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8dddc0ab039dff8e6b53e46e3c8f8a9f1fe0cdea Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: Zfilipin <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
