Merge pull request #12822 from rickmark/master

Fix for GitHub url ends with ‘.git’ check
This commit is contained in:
Mike McQuaid 2022-02-01 08:37:57 +00:00 committed by GitHub
commit 1486a1ed2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -57,7 +57,7 @@ module RuboCop
corrector.replace(homepage_parameter_node.source_range, "\"#{fixed}\"")
end
when %r{^https://github.com.*\.git}
when %r{^https://github.com.*\.git$}
problem "GitHub homepages should not end with .git" do |corrector|
corrector.replace(homepage_parameter_node.source_range, "\"#{homepage.delete_suffix(".git")}\"")
end