-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Configure rubocop #3446
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
Closed
Closed
Configure rubocop #3446
Changes from all commits
Commits
Show all changes
86 commits
Select commit
Hold shift + click to select a range
b11d3ce
Clean up RuboCop config
joshuay03 2ecca88
rubocop --only Layout/EmptyLineAfterGuardClause -a
joshuay03 d1a4688
be rubocop --only Style/StringLiterals -a
joshuay03 bff2a70
rubocop --only Layout/SpaceInsideHashLiteralBraces -a
joshuay03 f4a1202
rubocop --only Layout/EmptyLineBetweenDefs -a
joshuay03 e91ff47
rubocop --only Layout/EmptyLines -a
joshuay03 fc1d4a7
rubocop --only Layout/IndentationWidth -a
joshuay03 8ba21fb
rubocop --only Layout/SpaceInsideParens -a
joshuay03 c400246
rubocop --only Layout/IndentationConsistency -a
joshuay03 ed1da56
rubocop --only Layout/CommentIndentation -a
joshuay03 ffe7976
rubocop --only Style/HashSyntax -a
joshuay03 0021223
Disable Style/WordArray cop
joshuay03 70fbf60
rubocop --only Layout/EmptyLinesAroundBlockBody -a
joshuay03 62fef85
Disable Style/RescueStandardError cop
joshuay03 16eef0c
rubocop --only Style/RegexpLiteral -a
joshuay03 ba1b971
rubocop --only Layout/TrailingWhitespace -a
joshuay03 54b6216
rubocop --only Layout/EmptyLinesAroundAttributeAccessor -a
joshuay03 3288e92
rubocop --only Style/StringConcatenation -A
joshuay03 705b5c2
rubocop --only Layout/RescueEnsureAlignment -a
joshuay03 f4de42e
rubocop --only Layout/TrailingEmptyLines -a
joshuay03 765f4d4
rubocop --only Layout/EmptyLinesAroundExceptionHandlingKeywords -a
joshuay03 5e5dc3e
rubocop --only Style/RedundantReturn -a
joshuay03 ecc9664
rubocop --only Style/FetchEnvVar -a
joshuay03 791c430
rubocop --only Style/DefWithParentheses -a
joshuay03 c2166a9
Exclude spec/**/* from cops
joshuay03 e760829
rubocop --only Layout/LineEndStringConcatenationIndentation -a
joshuay03 c56cd50
Disable Style/GuardClause cop
joshuay03 26ad668
rubocop --only Layout/EmptyLinesAroundClassBody -a
joshuay03 e2849bd
rubocop --only Layout/EmptyLinesAroundModuleBody -a
joshuay03 b258d77
rubocop --only Lint/RedundantStringCoercion -a
joshuay03 b9e798e
Disable Bundler/OrderedGems cop
joshuay03 a3e15c6
Disable Style/IfInsideElse cop
joshuay03 6abd66f
rubocop --only Layout/MultilineOperationIndentation -a
joshuay03 702cd69
rubocop --only Style/SuperArguments -a
joshuay03 5832b8e
rubocop --only Layout/EmptyLinesAfterModuleInclusion -a
joshuay03 3ab7c25
rubocop --only Style/ConditionalAssignment -a
joshuay03 d1c36a4
rubocop --only Style/Not -a
joshuay03 3b7ea2d
rubocop --only Style/RedundantRegexpArgument -a
joshuay03 6f2659a
rubocop --only Layout/EmptyLinesAroundMethodBody -a
joshuay03 dedb90e
rubocop --only Layout/HeredocIndentation -a
joshuay03 876aa29
rubocop --only Style/ParenthesesAroundCondition -a
joshuay03 d97c9a4
rubocop --only Layout/SpaceAfterSemicolon -a
joshuay03 9755f84
rubocop --only Lint/UnusedMethodArgument -a
joshuay03 b81c736
rubocop --only Layout/SpaceInsideBlockBraces -a
joshuay03 d925777
rubocop --only Style/RedundantParentheses -a
joshuay03 cdc8621
Disable Style/CommentAnnotation cop
joshuay03 5358746
rubocop --only Style/MultilineIfModifier -a
joshuay03 b31d0d9
rubocop --only Style/Semicolon -a
joshuay03 d395e85
rubocop --only Style/ColonMethodCall -a
joshuay03 cf8fb23
rubocop --only Layout/FirstHashElementIndentation -a
joshuay03 cdb127c
rubocop --only Style/Dir -a
joshuay03 4562a19
rubocop --only Layout/EmptyLines -a
joshuay03 966725e
rubocop --only Lint/ParenthesesAsGroupedExpression -a
joshuay03 f00965f
rubocop --only Style/MultilineIfModifier -a
joshuay03 22cbe7c
Disable Style/IfUnlessModifier cop
joshuay03 3105e11
rubocop --only Lint/UselessAssignment -a
joshuay03 76fe850
Disable Layout/LineLength cop
joshuay03 a1ee494
rubocop --only Style/TrailingCommaInArrayLiteral -a
joshuay03 a6b9861
rubocop --only Style/MethodCallWithoutArgsParentheses -a
joshuay03 a94dfd5
rubocop --only Layout/LeadingCommentSpace -a
joshuay03 0c3574f
rubocop --only Layout/ExtraSpacing -a
joshuay03 843f610
be rubocop --only Style/RedundantStringEscape -a
joshuay03 c7ee2d0
Disable Style/BlockDelimiters cop
joshuay03 d320573
rubocop --only Layout/IndentationStyle -a
joshuay03 f6dabb3
rubocop --only Layout/MultilineMethodCallIndentation -a
joshuay03 e8ddc9f
rubocop --only Layout/IndentationConsistency -a
joshuay03 2cf4bb5
rubocop --only Layout/HashAlignment -a
joshuay03 863676a
rubocop --only Layout/EndAlignment -a
joshuay03 579614b
rubocop --only Layout/IndentationWidth -a
joshuay03 b020de9
rubocop --only Layout/SpaceAfterColon -a
joshuay03 0424d9c
rubocop --only Style/RedundantPercentQ -a
joshuay03 5ccc33c
rubocop --only Layout/SpaceInsideArrayLiteralBrackets -a
joshuay03 1ef8647
rubocop --only Layout/SpaceAfterComma -a
joshuay03 b6028c9
rubocop --only Lint/Void -a
joshuay03 cb6392d
rubocop --only Layout/LineContinuationLeadingSpace -a
joshuay03 23a78cb
rubocop --only Style/TrailingUnderscoreVariable -a
joshuay03 79fa58e
rubocop --only Layout/ElseAlignment -a
joshuay03 8bdc14e
rubocop --only Layout/IndentationWidth -a
joshuay03 915369f
rubocop --only Layout/IndentationConsistency -a
joshuay03 23bdc2a
rubocop --only Style/RedundantSelf -a
joshuay03 4586e94
rubocop --only Style/PerlBackrefs -a
joshuay03 48bef7b
rubocop --only Style/YAMLFileRead -a
joshuay03 9769be2
Address CodeQL feedback
joshuay03 6601d0c
Run RuboCop in CI
joshuay03 66531f0
Exclude vendor/**/* from RuboCop
joshuay03 c869540
Merge branch 'master' into configure-rubocop
zinduolis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| name: "RuboCop" | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: [master] | ||
|
|
||
| jobs: | ||
| rubocop: | ||
| name: "RuboCop Analysis" | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: "Checkout the repository" | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| ref: ${{ github.event.pull_request.head.sha }} | ||
| fetch-depth: 2 | ||
|
|
||
| - name: "Update and Install Dependencies" | ||
| run: | | ||
| sudo apt update | ||
| sudo apt install libcurl4 libcurl4-openssl-dev | ||
|
|
||
| - name: "Setting up Ruby" | ||
| uses: ruby/setup-ruby@v1 | ||
| with: | ||
| bundler-cache: true | ||
|
|
||
| - name: "Configure Bundle testing and install gems" | ||
| run: | | ||
| bundle config unset --local without | ||
| bundle config set --local with 'development' | ||
| bundle install | ||
|
|
||
| - name: "Run RuboCop" | ||
| run: | | ||
| bundle exec rubocop --display-only-safe-correctable | ||
46 changes: 24 additions & 22 deletions
46
.github/workflows/github_actions.yml → .github/workflows/test.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,55 +1,57 @@ | ||
| name: 'BrowserStack Test' | ||
| name: "BrowserStack Test" | ||
|
|
||
| on: | ||
| pull_request_target: | ||
| branches: [ master ] | ||
| jobs: | ||
| branches: [master] | ||
|
|
||
| jobs: | ||
| ubuntu-job: | ||
| name: 'BrowserStack Test on Ubuntu' | ||
| runs-on: ubuntu-latest # Can be self-hosted runner also | ||
| name: "BrowserStack Test on Ubuntu" | ||
| runs-on: ubuntu-latest # Can be self-hosted runner also | ||
| environment: | ||
| name: Integrate Pull Request | ||
| env: | ||
| env: | ||
| GITACTIONS: true | ||
| steps: | ||
|
|
||
| - name: 'BrowserStack Env Setup' # Invokes the setup-env action | ||
| - name: "BrowserStack Env Setup" # Invokes the setup-env action | ||
| uses: browserstack/github-actions/setup-env@master | ||
| with: | ||
| username: ${{ secrets.BROWSERSTACK_USERNAME }} | ||
| username: ${{ secrets.BROWSERSTACK_USERNAME }} | ||
| access-key: ${{ secrets.BROWSERSTACK_ACCESS_KEY }} | ||
|
|
||
| - name: 'BrowserStack Local Tunnel Setup' # Invokes the setup-local action | ||
| - name: "BrowserStack Local Tunnel Setup" # Invokes the setup-local action | ||
| uses: browserstack/github-actions/setup-local@master | ||
| with: | ||
| local-testing: start | ||
| local-identifier: random | ||
|
|
||
| - name: 'Checkout the repository' | ||
| - name: "Checkout the repository" | ||
| uses: actions/checkout@v4 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we please use version 5 if possible? |
||
| with: | ||
| ref: ${{ github.event.pull_request.head.sha }} | ||
| fetch-depth: 2 | ||
|
|
||
| - name: 'Setting up Ruby' | ||
| uses: ruby/setup-ruby@v1 | ||
| # Ruby version is defined in .ruby-version file | ||
|
|
||
| - name: 'Update and Install Dependencies' | ||
| - name: "Update and Install Dependencies" | ||
| run: | | ||
| sudo apt update | ||
| sudo apt install libcurl4 libcurl4-openssl-dev | ||
| - name: 'Configure Bundle testing and install gems' | ||
|
|
||
| - name: "Setting up Ruby" | ||
| uses: ruby/setup-ruby@v1 | ||
| with: | ||
| bundler-cache: true | ||
|
|
||
| - name: "Configure Bundle testing and install gems" | ||
| run: | | ||
| bundle config unset --local without | ||
| bundle config set --local with 'test' 'development' | ||
| bundle config set --local with 'test' | ||
| bundle install | ||
| - name: 'Run BrowserStack simple verification' | ||
|
|
||
| - name: "Run BrowserStack simple verification" | ||
| run: | | ||
| bundle exec rake browserstack --trace | ||
|
|
||
| - name: 'BrowserStackLocal Stop' # Terminating the BrowserStackLocal tunnel connection | ||
| - name: "BrowserStackLocal Stop" # Terminating the BrowserStackLocal tunnel connection | ||
| uses: browserstack/github-actions/setup-local@master | ||
| with: | ||
| local-testing: stop | ||
| local-testing: stop | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What's the purpose of loosening the conditions? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Version 5 has been recently released. Can we please use it instead of 4 is possible?
https://github.com/actions/checkout