Skip to content
Snippets Groups Projects
Unverified Commit 2592e406 authored by Mike McQuaid's avatar Mike McQuaid Committed by GitHub
Browse files

Merge pull request #10237 from MikeMcQuaid/homepage-blank-corrector-fix

rubocops/homepage: don't attempt to auto-correct an empty string.
parents db0b69ac 051fba34
No related branches found
No related tags found
No related merge requests found
......@@ -90,6 +90,8 @@ module RuboCop
return if node.nil?
homepage = string_content(node).dup
return if homepage.nil? || homepage.empty?
homepage.sub!("readthedocs.org", "readthedocs.io")
homepage.delete_suffix!(".git") if homepage.start_with?("https://github.com")
corrector.replace(node.source_range, "\"#{homepage}\"")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment