Module: RuboCop::Cop::DevDoc::Auth::AdjacentJustification
- Included in:
- LoginOnlyPolicyJustification, UnscopedFindJustification
- Defined in:
- lib/rubocop/cop/dev_doc/auth/adjacent_justification.rb
Overview
The adjacent-justification contract shared by the auth "flag and make
the developer state the mechanism" cops: an offense is silenced by a
comment containing the cop's marker phrase either on the flagged
node's own line (trailing) or in the contiguous comment block ending
on the line directly above it. Adjacency is the point — a marker
elsewhere in the file justifies nothing. Host cops must provide
justification_marker.
With standalone_only: true the upward walk only crosses comment-ONLY
lines. Use this when the checked node is a class/module declaration:
there the "trailing comment on a preceding code line" rule would let a
marker trailing the PREVIOUS class's end silence the next class.