Simplify the 'should not start with https?://' message wording
Co-authored-by: Markus Reiter <me@reitermark.us>
This commit is contained in:
parent
21da074346
commit
41c35986f8
@ -35,7 +35,7 @@ module RuboCop
|
||||
if value_node.source.start_with?(%r{^"https?://})
|
||||
add_offense(
|
||||
value_node.source_range,
|
||||
message: "Verified URL parameter value should not start with https:// or http://.",
|
||||
message: "Verified URL parameter value should not contain a URL scheme.",
|
||||
) do |corrector|
|
||||
corrector.replace(value_node.source_range, value_node.source.gsub(%r{^"https?://}, "\""))
|
||||
end
|
||||
|
||||
@ -34,7 +34,7 @@ describe RuboCop::Cop::Cask::Url do
|
||||
|
||||
let(:expected_offenses) do
|
||||
[{
|
||||
message: "Verified URL parameter value should not start with https:// or http://.",
|
||||
message: "Verified URL parameter value should not contain a URL scheme.",
|
||||
severity: :convention,
|
||||
line: 3,
|
||||
column: 16,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user