24 Pull Requests
bbatsov

rubocop/rubocop

A Ruby static code analyzer and formatter, based on the community Ruby style guide.
Ruby
View on GitHub https://docs.rubocop.org
bug
feature
documentation
tests
help-wanted
refactoring
enhancement
beginner
good first issue
Contribulator score: 44 Last scored 2023-11-08 06:31:01 UTC
Contributors (12)
  • bfontaine
  • blainesch
  • eitoball
  • katieschilling
  • kevindew
  • koic
  • krainboltgreene
  • oliverklee
  • pocke
  • seanhussey
  • weh
  • yhirano55

Pull requests (46)

koic

Update an example to `Layout/IndentArray` to bbatsov/rubocop 2017-12-23 16:25:13 UTC

Follow up of #5003.

This commit is a small change of document.

Define the default of style provided by Layout/IndentArray cop in example name.


Before submitting the PR make sure the following are checked:
…

yhirano55

Display correction candidate if an incorrect cop name is given to bbatsov/rubocop 2017-12-22 19:46:43 UTC

Maybe we cannot memorize correctly cop names.

if an incorrect cop name is given with --only or --except options on CLI option,
it just only raises exception. I think it's not friendly.

So I've added its error message to correc…

koic

Workaround for broke Travis with RubyGems 2.7 to bbatsov/rubocop 2017-12-22 09:41:04 UTC

This is a workaround patch to Travis CI.
This change attempts to resolve the following error.

$ gem update --system
Updating rubygems-update
Fetching: rubygems-update-2.7.3.gem (100%)
Successfully installed rubygems-up...
koic

Restyle example formatting for `Rails/RequestReferer` to bbatsov/rubocop 2017-12-22 03:25:47 UTC

Follow up of
https://github.com/bbatsov/rubocop/pull/4880#issuecomment-338499947.

This commit is a change of document format for Rails/RequestReferer cop.


Before submitting the PR make sure the following are…

koic

[Fix #5293] Fix regression for `Rails/HasManyOrHasOneDependent` cop to bbatsov/rubocop 2017-12-21 13:21:30 UTC

Fixes #5293.
This commit changed the existing test codes and fixed the regression by #5235.


Before submitting the PR make sure the following are checked:

  • Wrote [good commit messages][1].
  • Commit me…
koic

Restyle example formatting for `Rails/Date` cop to bbatsov/rubocop 2017-12-18 09:44:09 UTC

Follow up of https://github.com/bbatsov/rubocop/pull/4880#issuecomment-338499947.

This commit is a change of document format for Rails/Date cop.


Before submitting the PR make sure the following are checked:
…

pocke

[Fix #5273] Fix `Style/EvalWithLocation` reporting bad line offset to bbatsov/rubocop 2017-12-18 09:18:10 UTC

See https://github.com/bbatsov/rubocop/issues/5273

Cause

I forgot an abs. 🙇


Before submitting the PR make sure the following are checked:

  • Wrote [good commit messages][1].
  • Commit mes…
koic

[Fix #5261] Fix false positive for `Style/MixinUsage` when using inside module to bbatsov/rubocop 2017-12-18 04:22:11 UTC

Fixes #5261.

Correspondence to use case for include belonging to module was insufficient. This PR added a reproduction test and fixed it.


Before submitting the PR make sure the following are checked:

  • [x]…
pocke

Make the cop generator to work on rubocop-rspec to bbatsov/rubocop 2017-12-17 05:30:10 UTC

I would like to use the cop generator in rubocop-rspec. However, the task does not work well on the project now.
This change will make the generator to work on rubocop-rspec.

It changes the following things.

  • Make `inject_requi…
koic

Use latest Rubies on Travis CI to bbatsov/rubocop 2017-12-16 08:46:24 UTC

These Rubies has been released and available on Travis CI.

  • https://www.ruby-lang.org/en/news/2017/12/14/ruby-2-2-9-released/
  • https://www.ruby-lang.org/en/news/2017/12/14/ruby-2-3-6-released/
  • https://www.ruby-lang.org/en/news/2…
pocke

[Fix #5245] Make `Style/FormatStringToken` to allow regexp token to bbatsov/rubocop 2017-12-14 08:13:08 UTC

See #5245

regexp node has str node. So the cop should ignore regexp node also.

$ ruby-parse -e /%u/
(regexp
  (str "%u")
  (regopt))

Before submitting the PR make sure the following…

koic

Add new `Lint/BigDecimalNew` cop to bbatsov/rubocop 2017-12-14 07:07:12 UTC

Feature

BigDecimal.new() is deprecated since BigDecimal 1.3.3 for Ruby 2.5.
This cop identifies places where BigDecimal.new() can be replaced by BigDecimal().

% cat /tmp/example.rb
# frozen_string_literal: tr...
pocke

Make `Style/StringHashKeys` to accepts environment variables to bbatsov/rubocop 2017-12-13 14:44:26 UTC

Command execution methods, such as system, capture3, receive environments variables as a Hash.
And the hash keys should be strings.

Open3.capture3({'FOO' => 'a'}, 'ls') # ok
Open3.capture3({:FOO => 'a'}, 'ls') # TypeErr...
eitoball

Fix Rails/Presence cop when #present? or #blank? is used in if or unless modifier to bbatsov/rubocop 2017-12-13 09:19:01 UTC

This PR should fix Rails/Presence cop when #present? on #blank? is used in if or unless modifier.


Before submitting the PR make sure the following are checked:

  • Wrote [good commit messages][1].
    …
koic

[Fix #5234] Fix a false positive for `Rails/HasManyOrHasOneDependent` to bbatsov/rubocop 2017-12-13 07:48:57 UTC

Fixes #5234.

Since there was no test case using class_name option in with_options
block, this PR added it as a reproduction test and fixed it.


Before submitting the PR make sure the following are checked:
…

pocke

Remove `Style/ExtendSelf` cop to bbatsov/rubocop 2017-12-13 01:45:08 UTC

Style/ExtendSelf was introduced by #5108, but the cop duplicates with Style/ModuleFunction.
So this change reverts the commit (da69b88).


Before submitting the PR make sure the following are checked:

  • …
koic

Restyle example formatting for `Rails/ActionFilter` cop to bbatsov/rubocop 2017-12-12 10:55:09 UTC

Follow up of https://github.com/bbatsov/rubocop/pull/4880#issuecomment-338499947.

This commit is a change of document format for Rails/ActionFilter cop.


Before submitting the PR make sure the following are ch…

koic

Remove redundant example for `Lint/EndAlignment` cop to bbatsov/rubocop 2017-12-11 08:56:49 UTC

Follow up for https://github.com/bbatsov/rubocop/commit/818104f73e1a987eb3acf8306da90de4ca8f1b57#diff-2fd929361da19daeec655fc29166b32b.

This commit is a change of document for Lint/EndAlignment cop.
I forgot to remove redundant bad e…

koic

Restyle example formatting for `Style/RescueStandardError` cop to bbatsov/rubocop 2017-12-11 07:12:56 UTC

Follow up of https://github.com/bbatsov/rubocop/pull/4880#issuecomment-338499947.

This commit is a change of document format for Style/RescueStandardError cop.


Before submitting the PR make sure the following…

koic

CI against JRuby 9.1.15.0 to bbatsov/rubocop 2017-12-09 01:11:34 UTC

JRuby 9.1.15.0 has been released.
http://jruby.org/2017/12/07/jruby-9-1-15-0.html

pocke

Prevent failing syntax check for the documentation with UTF-8 invalid string to bbatsov/rubocop 2017-12-08 09:10:19 UTC

See #5198

We can fix the problem by using RuboCop::AST::Builder.


Before submitting the PR make sure the following are checked:

  • Wrote [good commit messages][1].
  • Commit message starts with `[F…
pocke

Prevent to generate rubocop-rspec's documentation to bbatsov/rubocop 2017-12-07 15:28:41 UTC

Currently, rake parallel and rake default generate rubocop-rspec's documentation. Because the generation task runs after internal investigation, and internal investigation task load rubocop-rspec.
This change fixes the problem. I …

pocke

Prevent `SendNode#stabby_lambda?` from breaking with `a.() {}` to bbatsov/rubocop 2017-12-07 15:14:31 UTC

Problem

Style/StabbyLambdaParentheses, Style/EmptyBlockParameter and Style/EmptyLambdaParameter raise an error with a.() {}.

a.() {}
$ rubocop -d --cache false
For /tmp/tmp.AYL3jCqcQ7: configur...
koic

Restyle example formatting for `Style/EmptyElse` cop to bbatsov/rubocop 2017-12-07 06:38:13 UTC

Follow up of https://github.com/bbatsov/rubocop/pull/4880#issuecomment-338499947.

This commit is a change of document format for Style/EmptyElse cop.


Before submitting the PR make sure the following are check…

koic

Restyle example formatting for `Style/ClassAndModuleChildren` cop to bbatsov/rubocop 2017-12-06 04:19:15 UTC

Follow up of https://github.com/bbatsov/rubocop/pull/4880#issuecomment-338499947.

This commit is a change of document format for Style/ClassAndModuleChildren cop


Before submitting the PR make sure the followi…

1 2 Next › Last »
  • Sponsored by  DNSimple,  Octobox &  Bugsnag
  • About
  • How to contribute?
  • API
  • Unsubscribe
    •  English
    •  Español
    •  Ελληνικά
    •  Português do Brasil
    •  Suomi
    •  Français
    •  Deutsch
    •  Русский
    •  Українська
    •  ไทย
    •  Italiano
    •  Norsk bokmål
    •  தமிழ்
    •  Tr
    •  简体中文
    •  正體中文
    •  日本語
    •  Čeština
    •  हिंदी
    •  Polski
    • Translate into your language!