New
Unclaimed project
Are you a maintainer of rubocop? Claim this project to take control of your public changelog and roadmap.
Changelog
A Ruby static code analyzer and formatter, based on the community Ruby style guide.
Last updated about 20 hours ago
Style/EmptyClassDefinition cop to enforce consistent style for empty class definitions. The cop can enforce either a two-line class definition or Class.new for classes with no body. (@ydakuka)Style/NegativeArrayIndex cop to enforce using negative array indices instead of calculating array length minus a value. The cop handles both simple index patterns and range patterns, and recognizes preserving methods and their combinations. (@ydakuka)Categories for Layout/ClassStructure. (@fatkodima)Style/GuardClause when using heredoc as an argument of raise in else branch and if branch is empty. (@koic)Style/HashLookupMethod cop when there's no receiver. (@viralpraxis)ruby_extractor when using offset: 0 and different source buffers. (@ydakuka)Style/RedundantCondition when the branches contains constant assignment. (@koic)--force-default-config not preventing project config loading when used with options that access configuration. (@sakuro)Style/HashSyntax when shorthand syntax is used in condition of if/unless/while/until. (@ydakuka)Layout/IndentationWidth by adding a new EnforcedStyleAlignWith style parameter. (@MikeMcQuaid)Layout/LineLength when SplitStrings option is enabled and strings span multiple lines. (@HariprasanthMSH)Layout/IndentationWidth and Layout/IndentationConsistency when using EnforcedStyle: indented_internal_methods with method chain blocks. (@ydakuka)Layout/IndentationWidth when autocorrecting mixed tabs and spaces in blocks. Fix an infinite loop error for Layout/DefEndAlignment and Layout/IndentationStyle when autocorrecting mixed tabs and spaces. Autocorrection for tabs is disabled in AlignmentCorrector for indentation offenses, but enabled for align_end. (@ydakuka)Layout/FirstArgumentIndentation to correct entire method calls and chains for nested calls. (@ydakuka)Offense#highlighted_area to return a valid Parser::Source::Range. (@ydakuka)Security/JSONLoad when create_additions option is passed with other options in a hash. (@wktk)squish and squish! applied to heredoc to Layout/HeredocIndentation. (@lovro-bikic)Forwardable methods in Lint/DuplicateMethods. (@lovro-bikic)Lint/RedundantSplatExpansion aware of constant assignment. (@koic)Style/AccessModifierDeclarations aware of self class. (@koic)Module member existence methods to Style/ModuleMemberExistenceCheck. (@lovro-bikic)AllowedMethods configuration to Style/ModuleMemberExistenceCheck. (@lovro-bikic)