diff options
Diffstat (limited to 'Library/Homebrew/rubocops')
| -rw-r--r-- | Library/Homebrew/rubocops/conflicts_cop.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/rubocops/extend/formula_cop.rb | 8 | ||||
| -rw-r--r-- | Library/Homebrew/rubocops/formula_desc_cop.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/rubocops/lines_cop.rb | 4 | ||||
| -rw-r--r-- | Library/Homebrew/rubocops/patches_cop.rb | 12 | ||||
| -rw-r--r-- | Library/Homebrew/rubocops/urls_cop.rb | 6 |
6 files changed, 17 insertions, 17 deletions
diff --git a/Library/Homebrew/rubocops/conflicts_cop.rb b/Library/Homebrew/rubocops/conflicts_cop.rb index 6f05d0567..1cca3f8ae 100644 --- a/Library/Homebrew/rubocops/conflicts_cop.rb +++ b/Library/Homebrew/rubocops/conflicts_cop.rb @@ -6,7 +6,7 @@ module RuboCop module FormulaAudit # This cop audits versioned Formulae for `conflicts_with` class Conflicts < FormulaCop - MSG = <<-EOS.undent + MSG = <<~EOS.freeze Versioned formulae should not use `conflicts_with`. Use `keg_only :versioned_formula` instead. EOS diff --git a/Library/Homebrew/rubocops/extend/formula_cop.rb b/Library/Homebrew/rubocops/extend/formula_cop.rb index fccce0ded..7531e62b7 100644 --- a/Library/Homebrew/rubocops/extend/formula_cop.rb +++ b/Library/Homebrew/rubocops/extend/formula_cop.rb @@ -167,19 +167,19 @@ module RuboCop type_match && name_match end - def_node_search :required_dependency?, <<-EOS.undent + def_node_search :required_dependency?, <<~EOS (send nil :depends_on ({str sym} _)) EOS - def_node_search :required_dependency_name?, <<-EOS.undent + def_node_search :required_dependency_name?, <<~EOS (send nil :depends_on ({str sym} %1)) EOS - def_node_search :dependency_type_hash_match?, <<-EOS.undent + def_node_search :dependency_type_hash_match?, <<~EOS (hash (pair ({str sym} _) ({str sym} %1))) EOS - def_node_search :dependency_name_hash_match?, <<-EOS.undent + def_node_search :dependency_name_hash_match?, <<~EOS (hash (pair ({str sym} %1) ({str sym} _))) EOS diff --git a/Library/Homebrew/rubocops/formula_desc_cop.rb b/Library/Homebrew/rubocops/formula_desc_cop.rb index 2ef60303d..05f60c9d5 100644 --- a/Library/Homebrew/rubocops/formula_desc_cop.rb +++ b/Library/Homebrew/rubocops/formula_desc_cop.rb @@ -29,7 +29,7 @@ module RuboCop desc_length = "#{@formula_name}: #{string_content(desc)}".length max_desc_length = 80 return if desc_length <= max_desc_length - problem <<-EOS.undent + problem <<~EOS Description is too long. "name: desc" should be less than #{max_desc_length} characters. Length is calculated as #{@formula_name} + desc. (currently #{desc_length}) EOS diff --git a/Library/Homebrew/rubocops/lines_cop.rb b/Library/Homebrew/rubocops/lines_cop.rb index a45f673c6..4172aad96 100644 --- a/Library/Homebrew/rubocops/lines_cop.rb +++ b/Library/Homebrew/rubocops/lines_cop.rb @@ -109,7 +109,7 @@ module RuboCop end find_method_with_args(body_node, :skip_clean, :all) do - problem <<-EOS.undent.chomp + problem <<~EOS.chomp `skip_clean :all` is deprecated; brew no longer strips symbols Pass explicit paths to prevent Homebrew from removing empty folders. EOS @@ -131,7 +131,7 @@ module RuboCop end # Node Pattern search for Language::Node - def_node_search :languageNodeModule?, <<-EOS.undent + def_node_search :languageNodeModule?, <<~EOS (const (const nil :Language) :Node) EOS end diff --git a/Library/Homebrew/rubocops/patches_cop.rb b/Library/Homebrew/rubocops/patches_cop.rb index 7ee1a127a..a752f1019 100644 --- a/Library/Homebrew/rubocops/patches_cop.rb +++ b/Library/Homebrew/rubocops/patches_cop.rb @@ -28,7 +28,7 @@ module RuboCop gh_patch_param_pattern = %r{https?://github\.com/.+/.+/(?:commit|pull)/[a-fA-F0-9]*.(?:patch|diff)} if regex_match_group(patch, gh_patch_param_pattern) if patch_url !~ /\?full_index=\w+$/ - problem <<-EOS.undent + problem <<~EOS GitHub patches should use the full_index parameter: #{patch_url}?full_index=1 EOS @@ -41,7 +41,7 @@ module RuboCop %r{gist\.githubusercontent\.com/.+/raw}]) if regex_match_group(patch, gh_patch_patterns) if patch_url !~ /[a-fA-F0-9]{40}/ - problem <<-EOS.undent.chomp + problem <<~EOS.chomp GitHub/Gist patches should specify a revision: #{patch_url} EOS @@ -50,7 +50,7 @@ module RuboCop gh_patch_diff_pattern = %r{https?://patch-diff\.githubusercontent\.com/raw/(.+)/(.+)/pull/(.+)\.(?:diff|patch)} if match_obj = regex_match_group(patch, gh_patch_diff_pattern) - problem <<-EOS.undent + problem <<~EOS use GitHub pull request URLs: https://github.com/#{match_obj[1]}/#{match_obj[2]}/pull/#{match_obj[3]}.patch Rather than patch-diff: @@ -59,21 +59,21 @@ module RuboCop end if regex_match_group(patch, %r{macports/trunk}) - problem <<-EOS.undent.chomp + problem <<~EOS.chomp MacPorts patches should specify a revision instead of trunk: #{patch_url} EOS end if regex_match_group(patch, %r{^http://trac\.macports\.org}) - problem <<-EOS.undent.chomp + problem <<~EOS.chomp Patches from MacPorts Trac should be https://, not http: #{patch_url} EOS end return unless regex_match_group(patch, %r{^http://bugs\.debian\.org}) - problem <<-EOS.undent.chomp + problem <<~EOS.chomp Patches from Debian should be https://, not http: #{patch_url} EOS diff --git a/Library/Homebrew/rubocops/urls_cop.rb b/Library/Homebrew/rubocops/urls_cop.rb index 071a4c42d..414f633c9 100644 --- a/Library/Homebrew/rubocops/urls_cop.rb +++ b/Library/Homebrew/rubocops/urls_cop.rb @@ -104,7 +104,7 @@ module RuboCop end if url =~ %r{^https?://prdownloads\.} - problem <<-EOS.undent.chomp + problem <<~EOS.chomp Don't use prdownloads in SourceForge urls (url is #{url}). See: http://librelist.com/browser/homebrew/2011/1/12/prdownloads-is-bad/ EOS @@ -121,7 +121,7 @@ module RuboCop # one out of the grab bag. unsecure_deb_pattern = %r{^http://http\.debian\.net/debian/(.*)}i audit_urls(urls, unsecure_deb_pattern) do |match, _| - problem <<-EOS.undent + problem <<~EOS Please use a secure mirror for Debian URLs. We recommend: https://mirrors.ocf.berkeley.edu/debian/#{match[1]} @@ -176,7 +176,7 @@ module RuboCop # Don't use GitHub codeload URLs codeload_gh_pattern = %r{https?://codeload\.github\.com/(.+)/(.+)/(?:tar\.gz|zip)/(.+)} audit_urls(urls, codeload_gh_pattern) do |match, url| - problem <<-EOS.undent + problem <<~EOS Use GitHub archive URLs: https://github.com/#{match[1]}/#{match[2]}/archive/#{match[3]}.tar.gz Rather than codeload: |
