Skip to content

Commit

Permalink
Use permitted in line_length.rb
Browse files Browse the repository at this point in the history
this is easier to understand and better terminology
  • Loading branch information
Juanito Fatas authored and bbatsov committed Nov 12, 2018
1 parent 70bf1be commit a035465
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/rubocop/cop/metrics/line_length.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def check_line(line, index, heredocs)

def ignored_line?(line, index, heredocs)
matches_ignored_pattern?(line) ||
heredocs && line_in_whitelisted_heredoc?(heredocs, index.succ)
heredocs && line_in_permitted_heredoc?(heredocs, index.succ)
end

def register_offense(loc, line)
Expand Down Expand Up @@ -107,7 +107,7 @@ def extract_heredocs(ast)
end
end

def line_in_whitelisted_heredoc?(heredocs, line_number)
def line_in_permitted_heredoc?(heredocs, line_number)
heredocs.any? do |range, delimiter|
range.cover?(line_number) &&
(allowed_heredoc == true || allowed_heredoc.include?(delimiter))
Expand Down

0 comments on commit a035465

Please sign in to comment.