Skip to content

Commit

Permalink
Mark some constants private
Browse files Browse the repository at this point in the history
  • Loading branch information
marcandre authored and mergify[bot] committed Aug 27, 2020
1 parent 90d5333 commit b74cc72
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/rubocop/cop/metrics/utils/abc_size_calculator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ def self.calculate(node)
# TODO: move to rubocop-ast
ARGUMENT_TYPES = %i[arg optarg restarg kwarg kwoptarg kwrestarg blockarg].freeze

private_constant :BRANCH_NODES, :CONDITION_NODES, :ARGUMENT_TYPES

def initialize(node)
@assignment = 0
@branch = 0
Expand Down
1 change: 1 addition & 0 deletions lib/rubocop/cop/metrics/utils/code_length_calculator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class CodeLengthCalculator

FOLDABLE_TYPES = %i[array hash heredoc].freeze
CLASSLIKE_TYPES = %i[class module].freeze
private_constant :FOLDABLE_TYPES, :CLASSLIKE_TYPES

def initialize(node, processed_source, count_comments: false, foldable_types: [])
@node = node
Expand Down

0 comments on commit b74cc72

Please sign in to comment.