Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync with original repository #1

Open
wants to merge 64 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
8bb0abd
README: Add "permissions" field to example of usage
tk0miya May 2, 2022
371f344
Avoid nil pointer exception with correctable offense without corrector
bpaquet Jun 2, 2022
79267f0
Merge pull request #76 from bpaquet/patch-1
haya14busa Jun 3, 2022
f5cd066
Merge pull request #71 from tk0miya/permissions
mgrachev Jun 20, 2022
0264fa1
Fix an indentation for script.sh
ydah Jan 7, 2023
81ea539
Change `original_output` in `RdjsonFormatter`
Slike9 Jan 10, 2023
3467a2f
Merge pull request #79 from ydah/fix-indent
mgrachev Jan 11, 2023
02246e3
Fix test/rdjson_formatter/test.sh
Slike9 Jan 11, 2023
eb901a2
Merge pull request #80 from Slike9/fix-rdjson-formatter-original-output
mgrachev Jan 11, 2023
ee0ad9c
Fix rubocop -> reviewdog severity conversion
reidab May 30, 2023
41bd29b
Map RuboCop's extra 'convention' and 'refactor' severity levels to 'I…
reidab May 30, 2023
09fe5f9
Use RuboCop fail-level option to set overall severity in RDFormat JSON
reidab May 30, 2023
7a1968c
Update rdjson testdata with corrected severity values
reidab Jun 2, 2023
ecd2fc7
Disable Metrics/ClassLength for RdjsonFormatter
reidab Jun 2, 2023
ff0e80a
Update testdata with newer rubocop version
reidab Jun 6, 2023
c3efa96
Merge pull request #84 from thedyrt/fix-severity
mgrachev Jun 7, 2023
04001f0
Update actions/checkout
massongit Jun 9, 2023
050f69d
Specify major version
massongit Jun 9, 2023
d1c4f1b
Merge pull request #86 from reviewdog/update_checkout
shogo82148 Jun 10, 2023
cd735b9
Update peter-evans/create-pull-request
massongit Jun 11, 2023
33b75fb
Merge pull request #87 from reviewdog/update_create_pr
mgrachev Jun 13, 2023
45002ca
chore(deps): update reviewdog to 0.14.2
review-dog Jun 19, 2023
c714c75
Merge pull request #88 from reviewdog/depup/reviewdog
shogo82148 Jun 20, 2023
78b99fa
ci: replace 'create-release action' with gh cli
shogo82148 Jun 20, 2023
a40c91c
Merge pull request #89 from reviewdog/migrate-actions-release
shogo82148 Jun 20, 2023
266e85e
chore(deps): update reviewdog to 0.15.0
review-dog Sep 6, 2023
3886019
bump actions/checkout v4
shogo82148 Sep 7, 2023
790b1d1
Merge pull request #91 from reviewdog/bump-actions-checkout-v4
shogo82148 Sep 7, 2023
e70b014
Merge pull request #90 from reviewdog/depup/reviewdog
shogo82148 Sep 7, 2023
459ba5d
chore(deps): update reviewdog to 0.16.0
review-dog Dec 19, 2023
683cb29
Merge pull request #93 from reviewdog/depup/reviewdog
shogo82148 Dec 19, 2023
94882d9
chore(deps): update reviewdog to 0.17.0
review-dog Jan 22, 2024
3268654
Merge pull request #94 from reviewdog/depup/reviewdog
shmokmt Jan 23, 2024
e313ba8
chore(deps): update reviewdog to 0.17.1
review-dog Feb 8, 2024
2f726ae
Merge pull request #95 from reviewdog/depup/reviewdog
haya14busa Feb 8, 2024
5340172
Update example to use Bundler (#97)
javierjulio Feb 28, 2024
91c6172
chore(deps): update reviewdog to 0.17.2
review-dog Mar 11, 2024
2c8048e
Merge pull request #98 from reviewdog/depup/reviewdog
wafuwafu13 Mar 11, 2024
1406b2d
chore(deps): update reviewdog to 0.17.3
review-dog Apr 15, 2024
9c27ab8
Merge pull request #99 from reviewdog/depup/reviewdog
mgrachev Apr 17, 2024
8e3a35a
chore(deps): update reviewdog to 0.17.4
review-dog Apr 19, 2024
db2afaf
Merge pull request #100 from reviewdog/depup/reviewdog
mgrachev Apr 22, 2024
ca48152
Fix relative_path_from error
paulslaby Apr 24, 2024
708a61f
Merge pull request #101 from paulslaby/master
mgrachev Apr 25, 2024
8d644c0
Remove unused version function in script.sh (#104)
toy May 6, 2024
6c175bc
Order inputs alphabetically (#102)
toy May 15, 2024
801d4d7
chore(deps): update reviewdog to 0.17.5 (#105)
github-actions[bot] Jun 4, 2024
221ac55
Update peter-evans/create-pull-request (#106)
massongit Jun 8, 2024
ef5cc7a
Bump rexml from 3.2.5 to 3.2.8 in /test/using_bundler (#107)
dependabot[bot] Jun 9, 2024
34a84a7
chore(deps): update reviewdog to 0.18.0 (#108)
github-actions[bot] Jun 17, 2024
1346d2b
chore(deps): update reviewdog to 0.18.1 (#109)
github-actions[bot] Jun 22, 2024
2fe5a0f
chore(deps): update reviewdog to 0.19.0 (#112)
github-actions[bot] Jul 7, 2024
4e3af4b
chore(deps): update reviewdog to 0.20.0 (#113)
github-actions[bot] Jul 7, 2024
e44fb2c
add only_changed input to run rubocop only against changed files (#103)
toy Jul 14, 2024
7ef50b2
chore(deps): update reviewdog to 0.20.1 (#116)
github-actions[bot] Jul 14, 2024
044a6c9
Update ruby and rubocop (#117)
massongit Jul 20, 2024
5755da6
Bump rexml from 3.3.2 to 3.3.3 in /test/using_bundler (#118)
dependabot[bot] Aug 7, 2024
a162a8e
Put `${INPUT_RUBOCOP_FLAGS}` at the end of the other flags (#120)
moznion Aug 21, 2024
830b073
Bump rexml from 3.3.3 to 3.3.6 in /test/using_bundler (#121)
dependabot[bot] Aug 27, 2024
d89ceac
chore(deps): update reviewdog to 0.20.2 (#122)
github-actions[bot] Sep 16, 2024
5e23bb6
Support offenses with no location (#123)
pcallewaert Sep 19, 2024
4018bd7
Bump rexml from 3.3.6 to 3.3.9 in /test/using_bundler (#128)
dependabot[bot] Oct 29, 2024
ef7ea43
Added input for fail-level reviewdog flag to later replace deprecated…
Bilka2 Dec 2, 2024
cd8c294
chore(deps): update reviewdog to 0.20.3 (#131)
github-actions[bot] Dec 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 55 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,74 @@ name: CI
on: [pull_request]
jobs:
test-skip-install-and-use-bundler:
name: runner / rubocop
runs-on: ubuntu-latest
defaults:
run:
working-directory: test/using_bundler
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/test/using_bundler/Gemfile
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
ruby-version: 3.3
bundler-cache: true
- name: rubocop with skip install and using bundler
uses: ./
with:
github_token: ${{ secrets.github_token }}
skip_install: 'true'
use_bundler: 'true'
- run: test "$(bundle exec rubocop --version)" == "1.18.1"
- run: test "$(bundle exec rubocop --version)" == "1.65.0"
test-only_changed:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
env:
INPUT_ONLY_CHANGED: 'true'
steps:
- uses: actions/checkout@v4
- name: setup
run: |
git config user.email "[email protected]"
git config user.name "I am an automated workflow"
- name: Check when there are relevant files
run: |
git checkout ${{ github.sha }}
rm -f test/only_changed/reviewdog-was-called

cp test/only_changed/few_relevant/files/* .
git add *
git commit -m auto

export PATH=test/only_changed/few_relevant/mock_bins:test/only_changed/shared_mock_bins:$PATH
BASE_REF=$(git rev-parse HEAD~) HEAD_REF=$(git rev-parse HEAD) ./script.sh

[ -f test/only_changed/reviewdog-was-called ]
- name: Check when there are no relevant files
run: |
git checkout ${{ github.sha }}
rm -f test/only_changed/reviewdog-was-called

cp test/only_changed/nothing_relevant/files/* .
git add *
git commit -m auto

export PATH=test/only_changed/nothing_relevant/mock_bins:test/only_changed/shared_mock_bins:$PATH
BASE_REF=$(git rev-parse HEAD~) HEAD_REF=$(git rev-parse HEAD) ./script.sh

[ ! -f test/only_changed/reviewdog-was-called ]
- name: Check when there are too many relevant files
run: |
git checkout ${{ github.sha }}
rm -f test/only_changed/reviewdog-was-called

touch a{00..100}.rb
git add *
git commit -m auto

export PATH=test/only_changed/too_many_relevant/mock_bins:test/only_changed/shared_mock_bins:$PATH
BASE_REF=$(git rev-parse HEAD~) HEAD_REF=$(git rev-parse HEAD) ./script.sh

[ -f test/only_changed/reviewdog-was-called ]
4 changes: 2 additions & 2 deletions .github/workflows/depup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
reviewdog:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: haya14busa/action-depup@v1
id: depup
with:
Expand All @@ -18,7 +18,7 @@ jobs:
repo: reviewdog/reviewdog

- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
title: "chore(deps): update reviewdog to ${{ steps.depup.outputs.latest }}"
Expand Down
18 changes: 7 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
if: github.event.action != 'labeled'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

# Bump version on merging Pull Requests with specific labels.
# (bump:major,bump:minor,bump:patch)
Expand All @@ -38,22 +38,18 @@ jobs:
if_false: ${{ steps.bumpr.outputs.next_version }}

# Create release.
- uses: actions/create-release@v1
if: "steps.tag.outputs.value != ''"
- if: "steps.tag.outputs.value != ''"
env:
# This token is provided by Actions, you do not need to create your own token
TAG_NAME: ${{ steps.tag.outputs.value }}
BODY: ${{ steps.bumpr.outputs.message }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.tag.outputs.value }}
release_name: Release ${{ steps.tag.outputs.value }}
body: ${{ steps.bumpr.outputs.message }}
draft: false
prerelease: false
run: |
gh release create "${TAG_NAME}" -t "Release ${TAG_NAME/refs\/tags\//}" --notes "${BODY}"

release-check:
if: github.event.action == 'labeled'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Post bumpr status comment
uses: haya14busa/action-bumpr@v1
6 changes: 3 additions & 3 deletions .github/workflows/reviewdog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
name: check / misspell
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- name: misspell
uses: reviewdog/action-misspell@v1
with:
Expand All @@ -19,7 +19,7 @@ jobs:
name: runner / shellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- name: shellcheck
uses: reviewdog/action-shellcheck@v1
with:
Expand All @@ -33,7 +33,7 @@ jobs:
name: check / yamllint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- name: yamllint
uses: reviewdog/action-yamllint@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_rdjson_formatter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.0.2
Expand Down
208 changes: 208 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,211 @@ AllCops:
Exclude:
- 'test/rdjson_formatter/**/*'
- 'vendor/**/*'
Gemspec/AddRuntimeDependency: # new in 1.65
Enabled: true
Gemspec/DeprecatedAttributeAssignment: # new in 1.30
Enabled: true
Gemspec/DevelopmentDependencies: # new in 1.44
Enabled: true
Gemspec/RequireMFA: # new in 1.23
Enabled: true
Layout/LineContinuationLeadingSpace: # new in 1.31
Enabled: true
Layout/LineContinuationSpacing: # new in 1.31
Enabled: true
Layout/LineEndStringConcatenationIndentation: # new in 1.18
Enabled: true
Layout/SpaceBeforeBrackets: # new in 1.7
Enabled: true
Lint/AmbiguousAssignment: # new in 1.7
Enabled: true
Lint/AmbiguousOperatorPrecedence: # new in 1.21
Enabled: true
Lint/AmbiguousRange: # new in 1.19
Enabled: true
Lint/ConstantOverwrittenInRescue: # new in 1.31
Enabled: true
Lint/DeprecatedConstants: # new in 1.8
Enabled: true
Lint/DuplicateBranch: # new in 1.3
Enabled: true
Lint/DuplicateMagicComment: # new in 1.37
Enabled: true
Lint/DuplicateMatchPattern: # new in 1.50
Enabled: true
Lint/DuplicateRegexpCharacterClassElement: # new in 1.1
Enabled: true
Lint/EmptyBlock: # new in 1.1
Enabled: true
Lint/EmptyClass: # new in 1.3
Enabled: true
Lint/EmptyInPattern: # new in 1.16
Enabled: true
Lint/IncompatibleIoSelectWithFiberScheduler: # new in 1.21
Enabled: true
Lint/ItWithoutArgumentsInBlock: # new in 1.59
Enabled: true
Lint/LambdaWithoutLiteralBlock: # new in 1.8
Enabled: true
Lint/LiteralAssignmentInCondition: # new in 1.58
Enabled: true
Lint/MixedCaseRange: # new in 1.53
Enabled: true
Style/NumberedParameters: # new in 1.22
Enabled: true
Style/NumberedParametersLimit: # new in 1.22
Enabled: true
Style/ObjectThen: # new in 1.28
Enabled: true
Style/OpenStructUse: # new in 1.23
Enabled: true
Style/OperatorMethodCall: # new in 1.37
Enabled: true
Style/QuotedSymbols: # new in 1.16
Enabled: true
Style/RedundantArgument: # new in 1.4
Enabled: true
Style/RedundantArrayConstructor: # new in 1.52
Enabled: true
Style/RedundantConstantBase: # new in 1.40
Enabled: true
Style/RedundantCurrentDirectoryInPath: # new in 1.53
Enabled: true
Style/RedundantDoubleSplatHashBraces: # new in 1.41
Enabled: true
Style/RedundantEach: # new in 1.38
Enabled: true
Style/RedundantFilterChain: # new in 1.52
Enabled: true
Style/RedundantHeredocDelimiterQuotes: # new in 1.45
Enabled: true
Style/RedundantInitialize: # new in 1.27
Enabled: true
Style/RedundantLineContinuation: # new in 1.49
Enabled: true
Style/RedundantRegexpArgument: # new in 1.53
Enabled: true
Style/RedundantRegexpConstructor: # new in 1.52
Enabled: true
Style/RedundantSelfAssignmentBranch: # new in 1.19
Enabled: true
Style/RedundantStringEscape: # new in 1.37
Enabled: true
Style/ReturnNilInPredicateMethodDefinition: # new in 1.53
Enabled: true
Style/SelectByRegexp: # new in 1.22
Enabled: true
Style/SendWithLiteralMethodName: # new in 1.64
Enabled: true
Style/SingleLineDoEndBlock: # new in 1.57
Enabled: true
Style/StringChars: # new in 1.12
Enabled: true
Style/SuperArguments: # new in 1.64
Enabled: true
Style/SuperWithArgsParentheses: # new in 1.58
Enabled: true
Style/SwapValues: # new in 1.1
Enabled: true
Style/YAMLFileRead: # new in 1.53
Enabled: true
Lint/NoReturnInBeginEndBlocks: # new in 1.2
Enabled: true
Lint/NonAtomicFileOperation: # new in 1.31
Enabled: true
Lint/NumberedParameterAssignment: # new in 1.9
Enabled: true
Lint/OrAssignmentToConstant: # new in 1.9
Enabled: true
Lint/RedundantDirGlobSort: # new in 1.8
Enabled: true
Lint/RedundantRegexpQuantifiers: # new in 1.53
Enabled: true
Lint/RefinementImportMethods: # new in 1.27
Enabled: true
Lint/RequireRangeParentheses: # new in 1.32
Enabled: true
Lint/RequireRelativeSelfPath: # new in 1.22
Enabled: true
Lint/SymbolConversion: # new in 1.9
Enabled: true
Lint/ToEnumArguments: # new in 1.1
Enabled: true
Lint/TripleQuotes: # new in 1.9
Enabled: true
Lint/UnexpectedBlockArity: # new in 1.5
Enabled: true
Lint/UnmodifiedReduceAccumulator: # new in 1.1
Enabled: true
Lint/UselessRescue: # new in 1.43
Enabled: true
Lint/UselessRuby2Keywords: # new in 1.23
Enabled: true
Metrics/CollectionLiteralLength: # new in 1.47
Enabled: true
Naming/BlockForwarding: # new in 1.24
Enabled: true
Security/CompoundHash: # new in 1.28
Enabled: true
Security/IoMethods: # new in 1.22
Enabled: true
Style/ArgumentsForwarding: # new in 1.1
Enabled: true
Style/ArrayIntersect: # new in 1.40
Enabled: true
Style/CollectionCompact: # new in 1.2
Enabled: true
Style/ComparableClamp: # new in 1.44
Enabled: true
Style/ConcatArrayLiterals: # new in 1.41
Enabled: true
Style/DataInheritance: # new in 1.49
Enabled: true
Style/DirEmpty: # new in 1.48
Enabled: true
Style/DocumentDynamicEvalDefinition: # new in 1.1
Enabled: true
Style/EmptyHeredoc: # new in 1.32
Enabled: true
Style/EndlessMethod: # new in 1.8
Enabled: true
Style/EnvHome: # new in 1.29
Enabled: true
Style/ExactRegexpMatch: # new in 1.51
Enabled: true
Style/FetchEnvVar: # new in 1.28
Enabled: true
Style/FileEmpty: # new in 1.48
Enabled: true
Style/FileRead: # new in 1.24
Enabled: true
Style/FileWrite: # new in 1.24
Enabled: true
Style/HashConversion: # new in 1.10
Enabled: true
Style/HashExcept: # new in 1.7
Enabled: true
Style/IfWithBooleanLiteralBranches: # new in 1.9
Enabled: true
Style/InPatternThen: # new in 1.16
Enabled: true
Style/MagicCommentFormat: # new in 1.35
Enabled: true
Style/MapCompactWithConditionalBlock: # new in 1.30
Enabled: true
Style/MapIntoArray: # new in 1.63
Enabled: true
Style/MapToHash: # new in 1.24
Enabled: true
Style/MapToSet: # new in 1.42
Enabled: true
Style/MinMaxComparison: # new in 1.42
Enabled: true
Style/MultilineInPatternThen: # new in 1.16
Enabled: true
Style/NegatedIfElseCondition: # new in 1.2
Enabled: true
Style/NestedFileDirname: # new in 1.26
Enabled: true
Style/NilLambda: # new in 1.3
Enabled: true
Loading