Skip to content

Conversation

@reitermarkus
Copy link
Member

@reitermarkus reitermarkus commented Oct 15, 2017

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew tests with your changes locally?

@ilovezfs
Copy link
Contributor

This feels like we're replacing something self-explanatory with an emoji.

@MikeMcQuaid
Copy link
Member

There's some CI failures but I'm broadly 👍 to this. I'm not in love with the syntax but it's standard Ruby at this point so we may as well use it rather than our own custom stuff.

Also, please create a Homebrew/homebrew-core PR for the corresponding change there before this gets merged.

@commitay
Copy link
Contributor

commitay commented Oct 18, 2017

@reitermarkus Do casks need to be changed to "squiggy"?

@reitermarkus
Copy link
Member Author

@commitay, yes, ideally.

@MikeMcQuaid MikeMcQuaid merged commit 76cd7c7 into Homebrew:master Oct 20, 2017
@MikeMcQuaid
Copy link
Member

Thanks @reitermarkus!

@reitermarkus reitermarkus deleted the squiggly-heredocs branch October 20, 2017 13:36
@ilovezfs
Copy link
Contributor

ilovezfs commented Oct 20, 2017

@reitermarkus hmm I'm having trouble getting anything to trigger a you-must-use-squiggly-heredocs error from brew style or brew audit --strict.

iMac-TMP:Homebrew joe$ brew config
HOMEBREW_VERSION: 1.3.6-26-g6fe7c5f-dirty
ORIGIN: https://github.com/Homebrew/brew
HEAD: 6fe7c5fc9576b1368a17c1c7f426d4511ac736cd
Last commit: 26 minutes ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 792c96ee94ec44cd6c8e832193978924f53d7592
Core tap last commit: 2 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_REPOSITORY: /usr/local/Homebrew
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_BOTTLE_DOMAIN: https://homebrew.bintray.com
CPU: octa-core 64-bit skylake
Homebrew Ruby: 2.3.3 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/bin/ruby
Clang: 8.0 build 800
Git: 2.10.1 => /Applications/Xcode.app/Contents/Developer/usr/bin/git
Perl: /usr/bin/perl
Python: /usr/local/opt/python/libexec/bin/python => /usr/local/Cellar/python/2.7.14/Frameworks/Python.framework/Versions/2.7/bin/python2.7
Ruby: /usr/local/bin/ruby => /usr/local/Cellar/ruby/2.4.2/bin/ruby
Java: 9.0.1, 1.8.0_151, 1.7.0_154-zulu-7.20.0.3
macOS: 10.11.6-x86_64
Xcode: 8.2.1
CLT: 8.2.0.0.1.1480973914
X11: 2.7.11 => /opt/X11
iMac-TMP:Homebrew joe$ git diff
diff --git a/Library/Homebrew/cmd/link.rb b/Library/Homebrew/cmd/link.rb
index 5afb19e..effcab7 100644
--- a/Library/Homebrew/cmd/link.rb
+++ b/Library/Homebrew/cmd/link.rb
@@ -29,12 +29,12 @@ module Homebrew
       keg_only = keg_only?(keg.rack)
       if HOMEBREW_PREFIX.to_s == "/usr/local" && keg_only &&
          keg.name.start_with?("openssl", "libressl")
-        opoo <<~EOS
-          Refusing to link: #{keg.name}
-          Linking keg-only #{keg.name} means you may end up linking against the insecure,
-          deprecated system OpenSSL while using the headers from Homebrew's #{keg.name}.
-          Instead, pass the full include/library paths to your compiler e.g.:
-            -I#{HOMEBREW_PREFIX}/opt/#{keg.name}/include -L#{HOMEBREW_PREFIX}/opt/#{keg.name}/lib
+        opoo <<-EOS
+        Refusing to link: #{keg.name}
+        Linking keg-only #{keg.name} means you may end up linking against the insecure,
+        deprecated system OpenSSL while using the headers from Homebrew's #{keg.name}.
+        Instead, pass the full include/library paths to your compiler e.g.:
+          -I#{HOMEBREW_PREFIX}/opt/#{keg.name}/include -L#{HOMEBREW_PREFIX}/opt/#{keg.name}/lib
         EOS
         next
       elsif keg.linked?
iMac-TMP:Homebrew joe$ brew style
Inspecting 661 files
.....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

661 files inspected, no offenses detected
iMac-TMP:Homebrew joe$ 

Ditto with formulae.

@reitermarkus
Copy link
Member Author

It won't trigger because <<-EOS is not the same as <<~EOS. I think it will trigger on <<-EOS.unindent or <<-EOS.strip_indent, both of which we weren't using before.

@ilovezfs
Copy link
Contributor

Neither of those triggers it either.

@reitermarkus
Copy link
Member Author

Weird.

@ilovezfs
Copy link
Contributor

@reitermarkus http://www.rubydoc.info/github/bbatsov/RuboCop/RuboCop/Cop/Layout/IndentHeredoc seems to imply that it should be triggering on <<-EOS

@reitermarkus
Copy link
Member Author

I think it only triggers on

<<-EOS
not indented
EOS

@ilovezfs
Copy link
Contributor

@reitermarkus see the opoo above which is exactly that. #3319 (comment)

@reitermarkus
Copy link
Member Author

Above it is indented 8 spaces.

ochaochaocha3 added a commit to ochaochaocha3/homebrew-mroonga that referenced this pull request Apr 30, 2018
Homebrew doesn't use String#undent since Homebrew/brew#3319.
@Homebrew Homebrew locked and limited conversation to collaborators May 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants