Skip to content
#

rubocop

Here are 326 public repositories matching this topic...

kassi
kassi commented Dec 14, 2020

The example in the documentation for Style/GuardClause is misleading because mentioned bad and good version don#t match execution.

It says

# bad
if something
  foo || raise('exception')
else
  ok
end

# good
foo || raise('exception') if something
ok

However both versions behave differently and bad can't be replaced by good.

Imagine something being true and `f

documentation good first issue
bquorning
bquorning commented Mar 23, 2021

I'm seeing double/instance_double/class_double/object_double/spy etc. being called with sometimes a string, sometimes a symbol (perhaps because the rspec-mocks documentation explicitly allows both), and of course sometimes a constant referring to a class or module.

I think mixing string and symbol arguments is a bit of a mess, so I would propose making a new cop that enforces either one or the

nnhimes
nnhimes commented Sep 5, 2021

Found bug on beta while testing unrelated changes. Line 509 in assignment_controller.rb was causing a crash when validate_assignment_questionnaires_weights() in assignment_form.rb found that weights did not add to 0 or 100.

In #2034 I made a patch for it to prevent the crash but the flash message is not as descriptive as it should be. Assignment_form.rb wants the error message to be '"Failed t

ab320012
ab320012 commented Oct 4, 2021

Hey guys not sure if this is still maintained, for some reason running rubocop -a is throwing several
GraphQL/ExtractInputType errors inside of an input type object

example of the error:

app/graphql/types/public/program_application_attributes.rb:11:7: C: GraphQL/ExtractInputType: Consider moving arguments to a new input type
      argument :company_size, String, required: false, descri
bug good first issue

Improve this page

Add a description, image, and links to the rubocop topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the rubocop topic, visit your repo's landing page and select "manage topics."

Learn more