Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
toy committed Jul 12, 2024
1 parent e50a873 commit 6cff8b1
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,17 @@ jobs:
skip_install: 'true'
use_bundler: 'true'
- run: test "$(bundle exec rubocop --version)" == "1.18.1"
test-only-changed:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: |
cp test/only_checked/files/* .
git add *
git commit -m auto
- name: rubocop with only_checked
uses: ./
with:
only_checked: 'true'
env:
PATH: test/only_checked/mock_bins:${{ env.PATH }}
1 change: 1 addition & 0 deletions a.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
puts "Hello, " + "world!"

Check warning on line 1 in a.rb

View workflow job for this annotation

GitHub Actions / test-skip-install-and-use-bundler

[rubocop] reported by reviewdog 🐶 Missing frozen string literal comment. Raw Output: a.rb:1:1: C: Style/FrozenStringLiteralComment: Missing frozen string literal comment.

Check warning on line 1 in a.rb

View workflow job for this annotation

GitHub Actions / test-skip-install-and-use-bundler

[rubocop] reported by reviewdog 🐶 Prefer string interpolation to string concatenation. Raw Output: a.rb:1:6: C: Style/StringConcatenation: Prefer string interpolation to string concatenation.

Check warning on line 1 in a.rb

View workflow job for this annotation

GitHub Actions / test-skip-install-and-use-bundler

[rubocop] reported by reviewdog 🐶 Prefer single-quoted strings when you don't need string interpolation or special symbols. Raw Output: a.rb:1:6: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.

Check warning on line 1 in a.rb

View workflow job for this annotation

GitHub Actions / test-skip-install-and-use-bundler

[rubocop] reported by reviewdog 🐶 Prefer single-quoted strings when you don't need string interpolation or special symbols. Raw Output: a.rb:1:18: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
1 change: 1 addition & 0 deletions test/only_checked/files/a.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
puts "Hello, " + "world!"

Check warning on line 1 in test/only_checked/files/a.rb

View workflow job for this annotation

GitHub Actions / test-skip-install-and-use-bundler

[rubocop] reported by reviewdog 🐶 Missing frozen string literal comment. Raw Output: test/only_checked/files/a.rb:1:1: C: Style/FrozenStringLiteralComment: Missing frozen string literal comment.

Check warning on line 1 in test/only_checked/files/a.rb

View workflow job for this annotation

GitHub Actions / test-skip-install-and-use-bundler

[rubocop] reported by reviewdog 🐶 Prefer string interpolation to string concatenation. Raw Output: test/only_checked/files/a.rb:1:6: C: Style/StringConcatenation: Prefer string interpolation to string concatenation.

Check warning on line 1 in test/only_checked/files/a.rb

View workflow job for this annotation

GitHub Actions / test-skip-install-and-use-bundler

[rubocop] reported by reviewdog 🐶 Prefer single-quoted strings when you don't need string interpolation or special symbols. Raw Output: test/only_checked/files/a.rb:1:6: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.

Check warning on line 1 in test/only_checked/files/a.rb

View workflow job for this annotation

GitHub Actions / test-skip-install-and-use-bundler

[rubocop] reported by reviewdog 🐶 Prefer single-quoted strings when you don't need string interpolation or special symbols. Raw Output: test/only_checked/files/a.rb:1:18: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
9 changes: 9 additions & 0 deletions test/only_checked/mock_bins/rubocop
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env ruby

Check warning on line 1 in test/only_checked/mock_bins/rubocop

View workflow job for this annotation

GitHub Actions / test-skip-install-and-use-bundler

[rubocop] reported by reviewdog 🐶 Missing frozen string literal comment. Raw Output: test/only_checked/mock_bins/rubocop:1:1: C: Style/FrozenStringLiteralComment: Missing frozen string literal comment.

case ARGV
when %w[--list-target-files]
puts %w[a.rb b.rb c.rb]

else
abort "rubocop mock called with unexpected arguments:\n#{ARGV.join("\n")}"
end

0 comments on commit 6cff8b1

Please sign in to comment.