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 80ccf50
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ jobs:
- name: Check RuboCop filepaths
working-directory: ${{ steps.set-up-homebrew.outputs.repository-path }}/Library/Homebrew
run: |

Check failure on line 63 in .github/workflows/tests.yml

View workflow job for this annotation

GitHub Actions / workflow_syntax

shellcheck reported issue in this script: SC2016:info:4:8: Expressions don't expand in single quotes, use double quotes for that

Check failure on line 63 in .github/workflows/tests.yml

View workflow job for this annotation

GitHub Actions / workflow_syntax

shellcheck reported issue in this script: SC2016:info:5:8: Expressions don't expand in single quotes, use double quotes for that
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 ]]
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."
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 'Add/remove the following paths from `Library/Homebrew/.rubocop.yml` as appropriate:'
echo "${public_apis} ${rubocop_docs}" | tr ' ' "\n" | sort | uniq -u
exit 1
fi
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/.rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ Style/Documentation:
- utils/shebang.rb
- utils/string_inreplace_extension.rb
- version.rb
- tap.rb

Style/DocumentationMethod:
Include:
Expand Down
6 changes: 3 additions & 3 deletions Library/Homebrew/cask/cask.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class Cask

# The token of this {Cask}.
#
# @api public
# @api internal
attr_reader :token

# The configuration of this {Cask}.
Expand Down Expand Up @@ -136,7 +136,7 @@ def timestamped_versions(caskroom_path: self.caskroom_path)

# The fully-qualified token of this {Cask}.
#
# @api public
# @api internal
def full_token
return token if tap.nil?
return token if tap.core_cask_tap?
Expand Down Expand Up @@ -327,7 +327,7 @@ def populate_from_api!(json_cask)

# Alias for {#token}.
#
# @api public
# @api internal
def to_s = token

def inspect
Expand Down

0 comments on commit 80ccf50

Please sign in to comment.