rubocop icon indicating copy to clipboard operation
rubocop copied to clipboard

A Ruby static code analyzer and formatter, based on the community Ruby style guide.

Results 432 rubocop issues
Sort by recently updated
recently updated
newest added

The Dir.mkdir method can take two arguments (path and mode) without using keywords. However, the FileUtils.mkdir_p method requires the keyword mode: before the argument. This PR fixes an issue where...

fixes https://github.com/rubocop/rubocop/issues/13351 **Replace this text with a summary of the changes in your PR. We have been discussing internally in my company that rescue error matching is antipattern and should...

We have been discussing internally in my company that rescue error matching is antipattern and should be discourage. I dont believe we can autocorrect but it would be useful to...

## Is your feature request related to a problem? Please describe. ``` ruby obj.method /^Regexp/ #

Allow `Style/WordArray` cop to match words that include non-whitespace characters. Before this change, words could only include letters, digits, underscores, and hyphens. After this change, words can include any non-whitespace...

## Expected behavior Describe here how you expected RuboCop to behave in this particular situation. _Nothing_ - string-splitting is "well defined" at the `\n`, or ```ruby eq( " 0: 1...

`Lint/LiteralInInterpolation` autocorrects literals inside string like nodes to remove the interpolation. However, this does not make sense for arrays inside a regexp, because the array is converted to a character...

enhancement

Consider ```ruby x = 1 x = 2 foo { x = 3 } ``` `Lint/UselessAssignment` doesn't register any offenses, even though the first assignment is useless. Assignment inside the...

bug

Reported in https://github.com/rubocop/rubocop/discussions/13294 ## Expected behavior ```yml AllCops: NewCops: enable Style/FormatString: Enabled: false Style/SymbolProc: Enabled: false Layout/LineLength: Max: 55 ``` ```rb # frozen_string_literal: true def foo(*, help:, **) pp help...