Skip to content

Commit

Permalink
style: skip actionlint checks if an actionlint workflow is present
Browse files Browse the repository at this point in the history
Fixes #18382.
  • Loading branch information
carlocab committed Sep 27, 2024
1 parent b38cbbc commit 53f6e46
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Library/Homebrew/style.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,11 @@ def self.check_style_impl(files, output_type,
run_shfmt(shell_files, fix:)
end

actionlint_result = if files.present? && actionlint_files.empty?
has_actionlint_workflow = actionlint_files.any? do |path|
path.to_s.end_with?("/.github/workflows/actionlint.yml")

Check warning on line 95 in Library/Homebrew/style.rb

View check run for this annotation

Codecov / codecov/patch

Library/Homebrew/style.rb#L95

Added line #L95 was not covered by tests
end
odebug "actionlint workflow detected. Skipping actionlint checks." if has_actionlint_workflow
actionlint_result = if files.present? && (has_actionlint_workflow || actionlint_files.empty?)
true
else
run_actionlint(actionlint_files)
Expand Down

0 comments on commit 53f6e46

Please sign in to comment.