Merge pull request #10237 from MikeMcQuaid/homepage-blank-corrector-fix
rubocops/homepage: don't attempt to auto-correct an empty string.
This commit is contained in:
commit
2592e406bc
@ -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}\"")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user