Skip to content

Commit b83729b

Browse files
committed
fix: Address all Homebrew style violations
Fixed all 16 style violations detected by brew style: **Required Headers:** - Added: # typed: true (Sorbet type checking) - Added: # frozen_string_literal: true (Ruby optimization) - Added: Top-level documentation comment for Mfc class **Whitespace Issues:** - Removed all trailing whitespace (7 locations) - Removed trailing blank lines at end of file **Assertion Updates:** - Changed: assert_predicate -> assert_path_exists (5 locations) - More idiomatic for Homebrew formulas **CI Workflow:** - Removed brew audit with path (now disabled in Homebrew) - Keep brew style check which catches all these issues All offenses are now resolved. The formula passes brew style checks.
1 parent 90df696 commit b83729b

File tree

2 files changed

+15
-13
lines changed

2 files changed

+15
-13
lines changed

.github/workflows/homebrew.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ jobs:
4040
- name: Validate formula syntax
4141
run: |
4242
echo "Checking formula syntax..."
43-
brew audit --strict --online packaging/homebrew/mfc.rb || true
4443
brew style packaging/homebrew/mfc.rb
4544
4645
- name: Install MFC from formula

packaging/homebrew/mfc.rb

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# typed: true
2+
# frozen_string_literal: true
3+
4+
# Homebrew formula for MFC (Multiphase Flow Code)
15
class Mfc < Formula
26
desc "Exascale multiphase/multiphysics compressible flow solver"
37
homepage "https://mflowcode.github.io/"
@@ -38,10 +42,10 @@ def install
3842
# - bootstrap/ for build/lint/format scripts
3943
# - templates/ for HPC job submission
4044
prefix.install "toolchain"
41-
45+
4246
# Install examples
4347
pkgshare.install "examples"
44-
48+
4549
# Create a wrapper that sets up the environment and calls mfc.sh
4650
# The wrapper changes to the installation directory because mfc.sh
4751
# expects to be run from MFC's root (checks for toolchain/util.sh)
@@ -74,23 +78,22 @@ def caveats
7478

7579
test do
7680
# Test that the binaries exist
77-
assert_predicate bin/"pre_process", :exist?
78-
assert_predicate bin/"simulation", :exist?
79-
assert_predicate bin/"post_process", :exist?
80-
81+
assert_path_exists bin/"pre_process"
82+
assert_path_exists bin/"simulation"
83+
assert_path_exists bin/"post_process"
84+
8185
# Test mfc wrapper
8286
system bin/"mfc", "--help"
83-
87+
8488
# Test that binaries can execute
8589
system bin/"pre_process", "-h"
8690
system bin/"simulation", "-h"
87-
91+
8892
# Test that mfc.sh is accessible in libexec
89-
assert_predicate libexec/"mfc.sh", :exist?
90-
assert_predicate prefix/"toolchain", :exist?
91-
93+
assert_path_exists libexec/"mfc.sh"
94+
assert_path_exists prefix/"toolchain"
95+
9296
# Test that mfc can parse a case file (lighter than full simulation)
9397
system bin/"mfc", "count", "#{pkgshare}/examples/1D_sodshocktube/case.py"
9498
end
9599
end
96-

0 commit comments

Comments
 (0)