Skip to content

Commit

Permalink
[fix #11157] -- Update Registry Docs
Browse files Browse the repository at this point in the history
[fix #11157] -- Add explanation to warn param
  • Loading branch information
DiegoSPB committed Nov 28, 2022
1 parent c415c84 commit f771382
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions lib/rubocop/cop/registry.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,27 +72,27 @@ def contains_cop_matching?(names)
#
# @example gives back a correctly qualified cop name
#
# cops = RuboCop::Cop::Cop.all
# cops.
# qualified_cop_name('Layout/EndOfLine') # => 'Layout/EndOfLine'
# registry = RuboCop::Cop::Registry
# registry.qualified_cop_name('Layout/EndOfLine', '') # => 'Layout/EndOfLine'
#
# @example fixes incorrect namespaces
#
# cops = RuboCop::Cop::Cop.all
# cops.qualified_cop_name('Lint/EndOfLine') # => 'Layout/EndOfLine'
# registry = RuboCop::Cop::Registry
# registry.qualified_cop_name('Lint/EndOfLine', '') # => 'Layout/EndOfLine'
#
# @example namespaces bare cop identifiers
#
# cops = RuboCop::Cop::Cop.all
# cops.qualified_cop_name('EndOfLine') # => 'Layout/EndOfLine'
# registry = RuboCop::Cop::Registry
# registry.qualified_cop_name('EndOfLine', '') # => 'Layout/EndOfLine'
#
# @example passes back unrecognized cop names
#
# cops = RuboCop::Cop::Cop.all
# cops.qualified_cop_name('NotACop') # => 'NotACop'
# registry = RuboCop::Cop::Registry
# registry.qualified_cop_name('NotACop', '') # => 'NotACop'
#
# @param name [String] Cop name extracted from config
# @param path [String, nil] Path of file that `name` was extracted from
# @param warn [Boolean] Print a warning if no department given for `name`
#
# @raise [AmbiguousCopName]
# if a bare identifier with two possible namespaces is provided
Expand Down

0 comments on commit f771382

Please sign in to comment.