Skip to content

Commit

Permalink
Fix CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
reitermarkus committed Apr 22, 2024
1 parent 4b432c7 commit fcd5cb6
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,19 @@ jobs:
- name: Check RuboCop filepaths
working-directory: ${{ steps.set-up-homebrew.outputs.repository-path }}/Library/Homebrew
run: |
public_apis=$(git grep -l "@api public" -- :^sorbet/ :^vendor/ | wc -l | tr -d ' ')
rubocop_docs=$(yq '.Style/Documentation.Include' .rubocop.yml | wc -l | tr -d ' ')
if [[ public_apis -ne rubocop_docs ]]
public_apis=$(git grep -l "@api public" -- :^sorbet/ :^vendor/ | sort)
rubocop_docs=$(yq '.Style/Documentation.Include[]' .rubocop.yml | sort)
if [[ public_apis != rubocop_docs ]]
then
echo "All public Homebrew APIs should be included in the Style/Documentation RuboCop."
echo "There were ${public_apis} '@api public' lines but ${rubocop_docs} filepaths for the 'Style/Documentation' RuboCop."
echo "Add or remove the filepaths from Library/Homebrew/.rubocop.yml as appropriate."
{
echo "${public_apis[@]}"
echo "${rubocop_docs[@]}"
} | sort
exit 1
fi
Expand Down

0 comments on commit fcd5cb6

Please sign in to comment.