Skip to content

Commit

Permalink
rubocop -A --only Style/MutableConstant
Browse files Browse the repository at this point in the history
  • Loading branch information
amatsuda committed Aug 30, 2024
1 parent c189cd5 commit 3661e67
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/simplecov/lines_classifier.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ class LinesClassifier
RELEVANT = 0
NOT_RELEVANT = nil

WHITESPACE_LINE = /^\s*$/
COMMENT_LINE = /^\s*#/
WHITESPACE_LINE = /^\s*$/.freeze
COMMENT_LINE = /^\s*#/.freeze
WHITESPACE_OR_COMMENT_LINE = Regexp.union(WHITESPACE_LINE, COMMENT_LINE)

def self.no_cov_line
Expand Down
4 changes: 2 additions & 2 deletions lib/simplecov/source_file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def load_source
end
end

SHEBANG_REGEX = /\A#!/
SHEBANG_REGEX = /\A#!/.freeze
def shebang?(line)
SHEBANG_REGEX.match?(line)
end
Expand All @@ -202,7 +202,7 @@ def read_lines(file, lines, current_line)
lines.concat([current_line], ensure_remove_undefs(file.readlines))
end

RUBY_FILE_ENCODING_MAGIC_COMMENT_REGEX = /\A#\s*(?:-\*-)?\s*(?:en)?coding:\s*(\S+)\s*(?:-\*-)?\s*\z/
RUBY_FILE_ENCODING_MAGIC_COMMENT_REGEX = /\A#\s*(?:-\*-)?\s*(?:en)?coding:\s*(\S+)\s*(?:-\*-)?\s*\z/.freeze
def set_encoding_based_on_magic_comment(file, line)
# Check for encoding magic comment
# Encoding magic comment must be placed at first line except for shebang
Expand Down

0 comments on commit 3661e67

Please sign in to comment.