Skip to content

Commit

Permalink
Move commit msg explanation into docs
Browse files Browse the repository at this point in the history
  • Loading branch information
robotdana committed Jun 20, 2020
1 parent 96da2c4 commit 3db3ddd
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
13 changes: 12 additions & 1 deletion docs/modules/ROOT/pages/cops_lint.adoc
Expand Up @@ -322,7 +322,18 @@ end
| -
|===

Check that constants are fully qualified.
Check that certain constants are fully qualified.

This is not enabled by default because it would mark a lot of offenses
unnecessarily.

Generally, gems should fully qualify all constants to avoid conflicts with
the code that uses the gem. Enable this cop without using `Only`/`Ignore`

Large projects will over time end up with one or two constant names that
are problematic because of a conflict with a library or just internally
using the same name a namespace and a class. To avoid too many unnecessary
offenses, Enable this cop with `Only: [The, Constant, Names, Causing, Issues]`

=== Examples

Expand Down
13 changes: 12 additions & 1 deletion lib/rubocop/cop/lint/constant_resolution.rb
Expand Up @@ -3,7 +3,18 @@
module RuboCop
module Cop
module Lint
# Check that constants are fully qualified.
# Check that certain constants are fully qualified.
#
# This is not enabled by default because it would mark a lot of offenses
# unnecessarily.
#
# Generally, gems should fully qualify all constants to avoid conflicts with
# the code that uses the gem. Enable this cop without using `Only`/`Ignore`
#
# Large projects will over time end up with one or two constant names that
# are problematic because of a conflict with a library or just internally
# using the same name a namespace and a class. To avoid too many unnecessary
# offenses, Enable this cop with `Only: [The, Constant, Names, Causing, Issues]`
#
# @example
# # By default checks every constant
Expand Down

0 comments on commit 3db3ddd

Please sign in to comment.