Skip to content

StyleGuideBaseURL is broken for rubocop cops #107

Closed
rubocop/rubocop
#7295
@pbstriker38

Description

The StyleGuideBaseURL was added here. This overwrites the one defined in rubocop.


Expected behavior

https://rubystyle.guide/#if-as-a-modifier

Actual behavior

https://rails.rubystyle.guide/#if-as-a-modifier

Steps to reproduce the problem

Run rubocop against the following code

def test
  if expected?
    return 'expected'
  end

  'not_expected'
end

rubocop (0.74.0)
rubocop-rails: (2.2.1)
Style/IfUnlessModifier: Favor modifier if usage when having a single-line body. Another good alternative is the usage of control flow &&/||. (https://rubystyle.guide#if-as-a-modifier)

rubocop (0.74.0)
rubocop-rails: (2.3.0)
Style/IfUnlessModifier: Favor modifier if usage when having a single-line body. Another good alternative is the usage of control flow &&/||. (https://rails.rubystyle.guide#if-as-a-modifier)

RuboCop version

0.74.0 (using Parser 2.6.3.0, running on ruby 2.5.5 x86_64-darwin17)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions