You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
we could also add another namespace (might be too much nesting idk) and define a cop_name method which just defines name.split('::').last(3).join('/'). This might be a mess though since, as I've noted before, we can't just do class RuboCop::RSpec::Cop < RuboCop::Cop::Cop because RuboCop::Cop::Cop mutates some class level state on the inherited hook which I don't know how to avoid.
The point of this name spacing would be to start creating an end-user visible differentiation between stylistic and opinionated cops which should be treated differently from linting and best practice cops
The text was updated successfully, but these errors were encountered:
@bquorning interested what you think here. I know there are a few parts of the rubocop codebase which assume a cop name has a single namespace but, as far as I can tell, deviating from this contract doesn't break anything
FactoryBot and Rails namespaces were added in #1019
Speaking of separating cops by their importance or purpose seems to be a task nobody is willing to take.
After @JonRowe's feedback in #228 I'd like to start by at least adding an additional namespace for our cops. This change can be pretty simple:
we could also add another namespace (might be too much nesting idk) and define a
cop_name
method which just definesname.split('::').last(3).join('/')
. This might be a mess though since, as I've noted before, we can't just doclass RuboCop::RSpec::Cop < RuboCop::Cop::Cop
becauseRuboCop::Cop::Cop
mutates some class level state on theinherited
hook which I don't know how to avoid.The point of this name spacing would be to start creating an end-user visible differentiation between stylistic and opinionated cops which should be treated differently from linting and best practice cops
The text was updated successfully, but these errors were encountered: