From 6d12ffea1567ab6f5c03092cf2dc59f3fbda4074 Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Tue, 3 Dec 2024 00:16:35 -0500 Subject: [PATCH 01/26] packetbeat: use language-specific heredoc delimiters --- Formula/p/packetbeat.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Formula/p/packetbeat.rb b/Formula/p/packetbeat.rb index cc92918be0e7d..3323ce238c8b6 100644 --- a/Formula/p/packetbeat.rb +++ b/Formula/p/packetbeat.rb @@ -40,7 +40,7 @@ def install prefix.install "_meta/kibana" end - (bin/"packetbeat").write <<~EOS + (bin/"packetbeat").write <<~SH #!/bin/sh exec #{libexec}/bin/packetbeat \ --path.config #{etc}/packetbeat \ @@ -48,7 +48,7 @@ def install --path.home #{prefix} \ --path.logs #{var}/log/packetbeat \ "$@" - EOS + SH chmod 0555, bin/"packetbeat" # generate_completions_from_executable fails otherwise generate_completions_from_executable(bin/"packetbeat", "completion", shells: [:bash, :zsh]) From 9eb19fd886d48475ffb711f565705f8c9347c160 Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Mon, 2 Dec 2024 22:32:07 -0500 Subject: [PATCH 02/26] pandoc-plot: use language-specific heredoc delimiters --- Formula/p/pandoc-plot.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Formula/p/pandoc-plot.rb b/Formula/p/pandoc-plot.rb index f8f6477507d50..4098a331f619a 100644 --- a/Formula/p/pandoc-plot.rb +++ b/Formula/p/pandoc-plot.rb @@ -28,7 +28,7 @@ def install end test do - input_markdown_1 = <<~EOS + input_markdown_1 = <<~MARKDOWN # pandoc-plot demo ```{.graphviz} @@ -36,9 +36,9 @@ def install pandoc -> plot } ``` - EOS + MARKDOWN - input_markdown_2 = <<~EOS + input_markdown_2 = <<~MARKDOWN # repeat the same thing ```{.graphviz} @@ -46,18 +46,18 @@ def install pandoc -> plot } ``` - EOS + MARKDOWN output_html_1 = pipe_output("pandoc --filter #{bin}/pandoc-plot -f markdown -t html5", input_markdown_1) output_html_2 = pipe_output("pandoc --filter #{bin}/pandoc-plot -f markdown -t html5", input_markdown_2) filename = output_html_1.match(%r{(plots/[\da-z]+\.png)}i) - expected_html_2 = <<~EOS + expected_html_2 = <<~HTML

repeat the same thing

- EOS + HTML assert_equal expected_html_2, output_html_2 end From a098b89883af0944b5f4dc7b67b98192dc29832a Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Mon, 2 Dec 2024 22:32:42 -0500 Subject: [PATCH 03/26] pandoc: use language-specific heredoc delimiters --- Formula/p/pandoc.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Formula/p/pandoc.rb b/Formula/p/pandoc.rb index 8c177ec614e0d..1f052a956e4f3 100644 --- a/Formula/p/pandoc.rb +++ b/Formula/p/pandoc.rb @@ -30,16 +30,16 @@ def install end test do - input_markdown = <<~EOS + input_markdown = <<~MARKDOWN # Homebrew A package manager for humans. Cats should take a look at Tigerbrew. - EOS - expected_html = <<~EOS + MARKDOWN + expected_html = <<~HTML

Homebrew

A package manager for humans. Cats should take a look at Tigerbrew.

- EOS + HTML assert_equal expected_html, pipe_output("#{bin}/pandoc -f markdown -t html5", input_markdown) end end From 62e561614cd31993c3c402fdfbe53254a1ecd726 Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Mon, 2 Dec 2024 22:40:11 -0500 Subject: [PATCH 04/26] pandocomatic: use language-specific heredoc delimiters --- Formula/p/pandocomatic.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Formula/p/pandocomatic.rb b/Formula/p/pandocomatic.rb index 1b1fcefd03957..d492664855d1d 100644 --- a/Formula/p/pandocomatic.rb +++ b/Formula/p/pandocomatic.rb @@ -50,11 +50,11 @@ def install A package manager for humans. Cats should take a look at Tigerbrew. MARKDOWN - expected_html = <<~EOS + expected_html = <<~HTML

Homebrew

A package manager for humans. Cats should take a look at Tigerbrew.

- EOS + HTML system bin/"pandocomatic", "-i", "test.md", "-o", "test.html" assert_equal expected_html, (testpath/"test.html").read end From 831a36592a21b5c2146b2ce972b2b9886aabbb90 Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Mon, 2 Dec 2024 23:34:22 -0500 Subject: [PATCH 05/26] php-cs-fixer: use language-specific heredoc delimiters --- Formula/p/php-cs-fixer.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Formula/p/php-cs-fixer.rb b/Formula/p/php-cs-fixer.rb index 10e0dfdff1fc3..804a0c04f059b 100644 --- a/Formula/p/php-cs-fixer.rb +++ b/Formula/p/php-cs-fixer.rb @@ -15,10 +15,10 @@ class PhpCsFixer < Formula def install libexec.install "php-cs-fixer.phar" - (bin/"php-cs-fixer").write <<~EOS + (bin/"php-cs-fixer").write <<~PHP #!#{Formula["php@8.3"].opt_bin}/php Date: Mon, 2 Dec 2024 22:41:49 -0500 Subject: [PATCH 06/26] pip-tools: use language-specific heredoc delimiters --- Formula/p/pip-tools.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Formula/p/pip-tools.rb b/Formula/p/pip-tools.rb index 5678eb2519c98..069bc03ec19a4 100644 --- a/Formula/p/pip-tools.rb +++ b/Formula/p/pip-tools.rb @@ -62,10 +62,10 @@ def install end test do - (testpath/"requirements.in").write <<~EOS + (testpath/"requirements.in").write <<~REQUIREMENTS pip-tools typing-extensions - EOS + REQUIREMENTS compiled = shell_output("#{bin}/pip-compile requirements.in -q -o -") assert_match "This file is autogenerated by pip-compile", compiled From 35c67ba5da169c0b42475905e845eaca5c67f8e8 Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Mon, 2 Dec 2024 23:33:13 -0500 Subject: [PATCH 07/26] procyon-decompiler: use language-specific heredoc delimiters --- Formula/p/procyon-decompiler.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Formula/p/procyon-decompiler.rb b/Formula/p/procyon-decompiler.rb index f91a5afeb793d..3b1063b61d5aa 100644 --- a/Formula/p/procyon-decompiler.rb +++ b/Formula/p/procyon-decompiler.rb @@ -18,14 +18,14 @@ def install end test do - fixture = <<~EOS + fixture = <<~JAVA class T { public static void main(final String[] array) { System.out.println("Hello World!"); } } - EOS + JAVA (testpath/"T.java").write fixture system Formula["openjdk@21"].bin/"javac", "T.java" From 419c8e4d034063ca15189f31bd07ec91a8a7ce29 Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Mon, 2 Dec 2024 22:30:07 -0500 Subject: [PATCH 08/26] protobuf-c: use language-specific heredoc delimiters --- Formula/p/protobuf-c.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Formula/p/protobuf-c.rb b/Formula/p/protobuf-c.rb index 98346d59c7b5a..5c79b0254070d 100644 --- a/Formula/p/protobuf-c.rb +++ b/Formula/p/protobuf-c.rb @@ -46,7 +46,7 @@ def install end test do - testdata = <<~EOS + testdata = <<~PROTO syntax = "proto3"; package test; message TestCase { @@ -55,7 +55,7 @@ def install message Test { repeated TestCase case = 1; } - EOS + PROTO (testpath/"test.proto").write testdata system Formula["protobuf"].opt_bin/"protoc", "test.proto", "--c_out=." From 10866581cf808b2211d5150b33856d0e56cf5ede Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Mon, 2 Dec 2024 23:32:04 -0500 Subject: [PATCH 09/26] protobuf: use language-specific heredoc delimiters --- Formula/p/protobuf.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Formula/p/protobuf.rb b/Formula/p/protobuf.rb index b8ac908f9b385..9f8dbfa813035 100644 --- a/Formula/p/protobuf.rb +++ b/Formula/p/protobuf.rb @@ -60,7 +60,7 @@ def install end test do - (testpath/"test.proto").write <<~EOS + (testpath/"test.proto").write <<~PROTO syntax = "proto3"; package test; message TestCase { @@ -69,7 +69,7 @@ def install message Test { repeated TestCase case = 1; } - EOS + PROTO system bin/"protoc", "test.proto", "--cpp_out=." end end From 7cb7cdcd083bfe516c93f021034a0a1d0dd703b4 Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Mon, 2 Dec 2024 22:29:45 -0500 Subject: [PATCH 10/26] protobuf@3: use language-specific heredoc delimiters --- Formula/p/protobuf@3.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Formula/p/protobuf@3.rb b/Formula/p/protobuf@3.rb index 140d377112eea..97a3abe1ecc75 100644 --- a/Formula/p/protobuf@3.rb +++ b/Formula/p/protobuf@3.rb @@ -65,7 +65,7 @@ def install end test do - testdata = <<~EOS + testdata = <<~PROTO syntax = "proto3"; package test; message TestCase { @@ -74,7 +74,7 @@ def install message Test { repeated TestCase case = 1; } - EOS + PROTO (testpath/"test.proto").write testdata system bin/"protoc", "test.proto", "--cpp_out=." From 7c42b3da983afbadadc3b2e6a13611487c80b9af Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Mon, 2 Dec 2024 22:42:22 -0500 Subject: [PATCH 11/26] protoc-gen-gogo: use language-specific heredoc delimiters --- Formula/p/protoc-gen-gogo.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Formula/p/protoc-gen-gogo.rb b/Formula/p/protoc-gen-gogo.rb index 3bc621bbf0180..73c136bbe4f3c 100644 --- a/Formula/p/protoc-gen-gogo.rb +++ b/Formula/p/protoc-gen-gogo.rb @@ -34,14 +34,14 @@ def install test do protofile = testpath/"proto3.proto" - protofile.write <<~EOS + protofile.write <<~PROTO syntax = "proto3"; package proto3; message Request { string name = 1; repeated int64 key = 2; } - EOS + PROTO system "protoc", "--gogo_out=.", "proto3.proto" assert_predicate testpath/"proto3.pb.go", :exist? refute_predicate (testpath/"proto3.pb.go").size, :zero? From ced386cdba1ecf3c6e5b2ce282cb0039f75b46f2 Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Mon, 2 Dec 2024 22:30:45 -0500 Subject: [PATCH 12/26] protoc-gen-gogofaster: use language-specific heredoc delimiters --- Formula/p/protoc-gen-gogofaster.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Formula/p/protoc-gen-gogofaster.rb b/Formula/p/protoc-gen-gogofaster.rb index 9b5a3993cf51d..d6c194002388e 100644 --- a/Formula/p/protoc-gen-gogofaster.rb +++ b/Formula/p/protoc-gen-gogofaster.rb @@ -34,14 +34,14 @@ def install test do protofile = testpath/"proto3.proto" - protofile.write <<~EOS + protofile.write <<~PROTO syntax = "proto3"; package proto3; message Request { string name = 1; repeated int64 key = 2; } - EOS + PROTO system "protoc", "--gogofaster_out=.", "proto3.proto" assert_predicate testpath/"proto3.pb.go", :exist? refute_predicate (testpath/"proto3.pb.go").size, :zero? From ca15810c26c287cb260f47440ac9b80dbe4b1771 Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Mon, 2 Dec 2024 22:39:16 -0500 Subject: [PATCH 13/26] pyqt: use language-specific heredoc delimiters --- Formula/p/pyqt.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Formula/p/pyqt.rb b/Formula/p/pyqt.rb index d256b9b5c174d..fae81a6c9eb78 100644 --- a/Formula/p/pyqt.rb +++ b/Formula/p/pyqt.rb @@ -76,10 +76,10 @@ def install next if r.name == "pyqt6-webengine" && OS.mac? && DevelopmentTools.clang_build_version <= 1200 r.stage do - inreplace "pyproject.toml", "[tool.sip.project]", <<~EOS + inreplace "pyproject.toml", "[tool.sip.project]", <<~TOML [tool.sip.project] sip-include-dirs = ["#{site_packages}/PyQt#{version.major}/bindings"] - EOS + TOML system sip_install, "--target-dir", site_packages end end From 892155e59134e61c5f7e33906ef813ed12b50d7d Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Mon, 2 Dec 2024 22:31:22 -0500 Subject: [PATCH 14/26] pyqt@5: use language-specific heredoc delimiters --- Formula/p/pyqt@5.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Formula/p/pyqt@5.rb b/Formula/p/pyqt@5.rb index 11b7213bcd1ff..905615dd9a2f3 100644 --- a/Formula/p/pyqt@5.rb +++ b/Formula/p/pyqt@5.rb @@ -79,10 +79,10 @@ def install next if r.name == "pyqt5-sip" r.stage do - inreplace "pyproject.toml", "[tool.sip.project]", <<~EOS + inreplace "pyproject.toml", "[tool.sip.project]", <<~TOML [tool.sip.project] sip-include-dirs = ["#{site_packages}/PyQt#{version.major}/bindings"] - EOS + TOML system sip_install, "--target-dir", site_packages end end From 2e5cc1c8fd2e843d83f45d4f920c62d9c01266f5 Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Mon, 2 Dec 2024 22:40:47 -0500 Subject: [PATCH 15/26] python-yq: use language-specific heredoc delimiters --- Formula/p/python-yq.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Formula/p/python-yq.rb b/Formula/p/python-yq.rb index abd5072da81a0..b724771e330d2 100644 --- a/Formula/p/python-yq.rb +++ b/Formula/p/python-yq.rb @@ -53,11 +53,11 @@ def install end test do - input = <<~EOS + input = <<~YAML foo: bar: 1 baz: {bat: 3} - EOS + YAML expected = <<~EOS 3 ... From d7ec91702670b9417b6fd675d56bdd08b81e854c Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Mon, 2 Dec 2024 22:16:15 -0500 Subject: [PATCH 16/26] remarshal: use language-specific heredoc delimiters --- Formula/r/remarshal.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Formula/r/remarshal.rb b/Formula/r/remarshal.rb index 861f9959ac1a0..1c0df9ca9c5ce 100644 --- a/Formula/r/remarshal.rb +++ b/Formula/r/remarshal.rb @@ -79,16 +79,16 @@ def install test do json = "{\"foo.bar\":\"baz\",\"qux\":1}" - yaml = <<~EOS.chomp + yaml = <<~YAML.chomp foo.bar: baz qux: 1 - EOS - toml = <<~EOS.chomp + YAML + toml = <<~TOML.chomp "foo.bar" = "baz" qux = 1 - EOS + TOML assert_equal yaml, pipe_output("#{bin}/remarshal -if=json -of=yaml", json) assert_equal yaml, pipe_output("#{bin}/json2yaml", json) assert_equal toml, pipe_output("#{bin}/remarshal -if=yaml -of=toml", yaml) From e6948aac342bcaa7a4224a3f65ae57cf8bebfe9d Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Mon, 2 Dec 2024 22:15:36 -0500 Subject: [PATCH 17/26] rgbds: use language-specific heredoc delimiters --- Formula/r/rgbds.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Formula/r/rgbds.rb b/Formula/r/rgbds.rb index 9b1eceb6640ce..ff512f5328167 100644 --- a/Formula/r/rgbds.rb +++ b/Formula/r/rgbds.rb @@ -47,12 +47,12 @@ def install test do # Based on https://github.com/rednex/rgbds/blob/HEAD/test/asm/assert-const.asm - (testpath/"source.asm").write <<~EOS + (testpath/"source.asm").write <<~ASM SECTION "rgbasm passing asserts", ROM0[0] Label: db 0 assert @ - EOS + ASM system bin/"rgbasm", "-o", "output.o", "source.asm" system bin/"rgbobj", "-A", "-s", "data", "-p", "data", "output.o" system bin/"rgbgfx", test_fixtures("test.png"), "-o", testpath/"test.2bpp" From 14b0bbfc1693f13cae7ad97ded84cf87f3afea42 Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Mon, 2 Dec 2024 22:20:15 -0500 Subject: [PATCH 18/26] rqlite: use language-specific heredoc delimiters --- Formula/r/rqlite.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Formula/r/rqlite.rb b/Formula/r/rqlite.rb index 68cded879c56f..f04bed0f3573c 100644 --- a/Formula/r/rqlite.rb +++ b/Formula/r/rqlite.rb @@ -32,11 +32,11 @@ def install end sleep 5 - (testpath/"test.sql").write <<~EOS + (testpath/"test.sql").write <<~SQL CREATE TABLE foo (id INTEGER NOT NULL PRIMARY KEY, name TEXT) .schema quit - EOS + SQL output = shell_output("#{bin}/rqlite -p #{port} < test.sql") assert_match "foo", output From 2106db234c878803163d96d0600eae34b17a9314 Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Mon, 2 Dec 2024 22:18:50 -0500 Subject: [PATCH 19/26] runme: use language-specific heredoc delimiters --- Formula/r/runme.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Formula/r/runme.rb b/Formula/r/runme.rb index e352ebfbbbd52..86f6390af5072 100644 --- a/Formula/r/runme.rb +++ b/Formula/r/runme.rb @@ -32,7 +32,7 @@ def install test do system bin/"runme", "--version" markdown = (testpath/"README.md") - markdown.write <<~EOS + markdown.write <<~MARKDOWN # Some Markdown Has some text. @@ -40,7 +40,7 @@ def install ```sh { name=foobar } echo "Hello World" ``` - EOS + MARKDOWN assert_match "Hello World", shell_output("#{bin}/runme run --git-ignore=false foobar") assert_match "foobar", shell_output("#{bin}/runme list --git-ignore=false") end From 229d90d4db89df371f7cec3a5803bac14afe8418 Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Mon, 2 Dec 2024 22:06:33 -0500 Subject: [PATCH 20/26] salt-lint: use language-specific heredoc delimiters --- Formula/s/salt-lint.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Formula/s/salt-lint.rb b/Formula/s/salt-lint.rb index 47fb8aece7ac8..39d4696e75a28 100644 --- a/Formula/s/salt-lint.rb +++ b/Formula/s/salt-lint.rb @@ -35,11 +35,11 @@ def install end test do - (testpath/"test.sls").write <<~EOS + (testpath/"test.sls").write <<~YAML /tmp/testfile: file.managed: - source: salt://{{unspaced_var}}/example - EOS + YAML out = shell_output("#{bin}/salt-lint #{testpath}/test.sls", 2) assert_match "[206] Jinja variables should have spaces before and after: '{{ var_name }}'", out end From 0640b4ce736f589a6638b31d0ff64c1a87cb488c Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Mon, 2 Dec 2024 22:07:40 -0500 Subject: [PATCH 21/26] scheme48: use language-specific heredoc delimiters --- Formula/s/scheme48.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Formula/s/scheme48.rb b/Formula/s/scheme48.rb index 98b5a00ac1ba5..dad45cedce492 100644 --- a/Formula/s/scheme48.rb +++ b/Formula/s/scheme48.rb @@ -34,9 +34,9 @@ def install end test do - (testpath/"hello.scm").write <<~EOS + (testpath/"hello.scm").write <<~SCHEME (display "Hello, World!") (newline) - EOS + SCHEME expected = <<~EOS Hello, World!\#{Unspecific} From 6da1f3c2621bbddc088ee7dde7a9910d928106ca Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Mon, 2 Dec 2024 22:00:40 -0500 Subject: [PATCH 22/26] solhint: use language-specific heredoc delimiters --- Formula/s/solhint.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Formula/s/solhint.rb b/Formula/s/solhint.rb index a317e13338461..46513716dbc9f 100644 --- a/Formula/s/solhint.rb +++ b/Formula/s/solhint.rb @@ -33,13 +33,13 @@ def install } EOS - (testpath/"test.sol").write <<~EOS + (testpath/"test.sol").write <<~SOLIDITY pragma solidity ^0.4.0; contract Test { function test() { } } - EOS + SOLIDITY assert_match "error Code contains empty blocks no-empty-blocks", shell_output("#{bin}/solhint --config #{test_config} test.sol 2>&1", 1) end From 80fed9c32c111858d00681ecc5280d26f9d96ebc Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Mon, 2 Dec 2024 21:59:15 -0500 Subject: [PATCH 23/26] solidity: use language-specific heredoc delimiters --- Formula/s/solidity.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Formula/s/solidity.rb b/Formula/s/solidity.rb index 3b31e2d9941b8..c200295176f63 100644 --- a/Formula/s/solidity.rb +++ b/Formula/s/solidity.rb @@ -48,7 +48,7 @@ def install end test do - (testpath/"hello.sol").write <<~EOS + (testpath/"hello.sol").write <<~SOLIDITY // SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.0; contract HelloWorld { @@ -56,7 +56,7 @@ def install return "Hello, World!"; } } - EOS + SOLIDITY output = shell_output("#{bin}/solc --bin hello.sol") assert_match "hello.sol:HelloWorld", output From 1c347dfc83f015712e8eb07915028ebd4d5101fc Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Mon, 2 Dec 2024 22:08:25 -0500 Subject: [PATCH 24/26] statix: use language-specific heredoc delimiters --- Formula/s/statix.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Formula/s/statix.rb b/Formula/s/statix.rb index 30e692a43704c..1918e2715e354 100644 --- a/Formula/s/statix.rb +++ b/Formula/s/statix.rb @@ -26,9 +26,9 @@ def install end test do - (testpath/"test.nix").write <<~EOS + (testpath/"test.nix").write <<~NIX github:oppiliappan/statix - EOS + NIX assert_match "Found unquoted URI expression", shell_output("#{bin}/statix check test.nix", 1) system bin/"statix", "fix", "test.nix" From 0354ffd42198141ef2d71cb6efe18fbc01a9eb00 Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Mon, 2 Dec 2024 22:13:41 -0500 Subject: [PATCH 25/26] stylelint: use language-specific heredoc delimiters --- Formula/s/stylelint.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Formula/s/stylelint.rb b/Formula/s/stylelint.rb index a8abdb7bb25e4..d2ac94cbd562e 100644 --- a/Formula/s/stylelint.rb +++ b/Formula/s/stylelint.rb @@ -22,18 +22,18 @@ def install end test do - (testpath/".stylelintrc").write <<~EOS + (testpath/".stylelintrc").write <<~JSON { "rules": { "block-no-empty": true } } - EOS + JSON - (testpath/"test.css").write <<~EOS + (testpath/"test.css").write <<~CSS a { } - EOS + CSS output = shell_output("#{bin}/stylelint test.css 2>&1", 2) assert_match "Unexpected empty block", output From e4d62a5700d46a986b392c0af0d7ceefd1c0749b Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Mon, 2 Dec 2024 22:09:48 -0500 Subject: [PATCH 26/26] stylish-haskell: use language-specific heredoc delimiters --- Formula/s/stylish-haskell.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Formula/s/stylish-haskell.rb b/Formula/s/stylish-haskell.rb index 1a7358c626c2b..6fda404961797 100644 --- a/Formula/s/stylish-haskell.rb +++ b/Formula/s/stylish-haskell.rb @@ -26,7 +26,7 @@ def install end test do - (testpath/"test.hs").write <<~EOS + (testpath/"test.hs").write <<~HASKELL {-# LANGUAGE ViewPatterns, TemplateHaskell #-} {-# LANGUAGE GeneralizedNewtypeDeriving, ViewPatterns, @@ -39,8 +39,8 @@ module Bad where import qualified Data.Map as M import Data.Map ((!), keys, Map) - EOS - expected = <<~EOS + HASKELL + expected = <<~HASKELL {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TemplateHaskell #-} @@ -52,7 +52,7 @@ module Bad where import Data.Map (Map, keys, (!)) import qualified Data.Map as M - EOS + HASKELL assert_equal expected, shell_output("#{bin}/stylish-haskell test.hs") end end