From 2252dc1a3146d38abbc821978860ec8cc101d297 Mon Sep 17 00:00:00 2001 From: ydah <13041216+ydah@users.noreply.github.com> Date: Thu, 18 Aug 2022 21:09:44 +0900 Subject: [PATCH 001/180] Format .github/workflows/ci.yml This PR is indentation adjusted. --- .github/workflows/ci.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9a950db5..c694d568 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,12 +10,12 @@ jobs: ruby_version: ["2.7", "3.0", "3.1"] runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ matrix.ruby_version }} - - name: Install dependencies - run: bundle install --jobs 4 --retry 3 - - name: Run tests - run: bundle exec rake + - uses: actions/checkout@v2 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby_version }} + - name: Install dependencies + run: bundle install --jobs 4 --retry 3 + - name: Run tests + run: bundle exec rake From af77d72f2ee4aac1b610ee2a551b7e98c7b4c329 Mon Sep 17 00:00:00 2001 From: Mike Griffin Date: Thu, 22 Sep 2022 15:21:53 +0100 Subject: [PATCH 002/180] Add autocorrect to RailsViewRenderShorthand The text is already provided in the error message, this reuses it to allow the problem to be auto corrected --- lib/rubocop/cop/github/rails_view_render_shorthand.rb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/rubocop/cop/github/rails_view_render_shorthand.rb b/lib/rubocop/cop/github/rails_view_render_shorthand.rb index e465d8d3..05952425 100644 --- a/lib/rubocop/cop/github/rails_view_render_shorthand.rb +++ b/lib/rubocop/cop/github/rails_view_render_shorthand.rb @@ -6,6 +6,8 @@ module RuboCop module Cop module GitHub class RailsViewRenderShorthand < Base + extend AutoCorrector + MSG = "Prefer `render` partial shorthand" def_node_matcher :render_with_options?, <<-PATTERN @@ -26,9 +28,13 @@ def on_send(node) locals_key = option_pairs.map { |pair| locals_key?(pair) }.compact.first if option_pairs.length == 1 && partial_key - add_offense(node, message: "Use `render #{partial_key.source}` instead") + add_offense(node, message: "Use `render #{partial_key.source}` instead") do |corrector| + corrector.replace(node.source_range, "render #{partial_key.source}") + end elsif option_pairs.length == 2 && partial_key && locals_key - add_offense(node, message: "Use `render #{partial_key.source}, #{locals_key.source}` instead") + add_offense(node, message: "Use `render #{partial_key.source}, #{locals_key.source}` instead") do |corrector| + corrector.replace(node.source_range, "render #{partial_key.source}, #{locals_key.source}") + end end end end From d97b12c16427c2e2e3be173fd51e608a352cd578 Mon Sep 17 00:00:00 2001 From: "Ben Sheldon [he/him]" Date: Thu, 13 Oct 2022 08:44:48 -0700 Subject: [PATCH 003/180] Create CONTRIBUTING.md --- CONTRIBUTING.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..d1804811 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,13 @@ +# Contributing + +## Releasing a new version + +1. Update `rubocop-github.gemspec` with the next version number +2. Update the `CHANGELOG` with changes and contributor +3. Run `bundle` to update gem version contained in the lockfile +4. Make a commit: `Release v{VERSION}` +5. Tag the commit : `git tag v{VERSION}` +6. Create the package: `gem build rubocop-github.gemspec` +7. Push to GitHub: `git push origin && git push origin --tags` +8. Push to Rubygems: `gem push rubocop-github-{VERSION}.gem` +9. Publish a new release on GitHub: https://github.com/github/rubocop-github/releases/new From ce23317087c8e93ed628deebab828722eb9f9446 Mon Sep 17 00:00:00 2001 From: Ben Sheldon Date: Thu, 13 Oct 2022 13:41:13 -0700 Subject: [PATCH 004/180] Replace custom `RailsApplicationRecord` and `RailsRenderInline` cops with their upstream equivalent --- config/rails.yml | 10 +-- config/rails_cops.yml | 12 ---- guides/rails-render-inline.md | 27 -------- .../cop/github/rails_application_record.rb | 29 --------- lib/rubocop/cop/github/rails_render_inline.rb | 29 --------- test/test_rails_application_record.rb | 39 ------------ test/test_rails_render_inline.rb | 62 ------------------- 7 files changed, 2 insertions(+), 206 deletions(-) delete mode 100644 guides/rails-render-inline.md delete mode 100644 lib/rubocop/cop/github/rails_application_record.rb delete mode 100644 lib/rubocop/cop/github/rails_render_inline.rb delete mode 100644 test/test_rails_application_record.rb delete mode 100644 test/test_rails_render_inline.rb diff --git a/config/rails.yml b/config/rails.yml index e414a00a..afe402cc 100644 --- a/config/rails.yml +++ b/config/rails.yml @@ -2,9 +2,6 @@ require: - rubocop-github-rails - rubocop-rails -GitHub/RailsApplicationRecord: - Enabled: true - GitHub/RailsControllerRenderActionSymbol: Enabled: true @@ -17,9 +14,6 @@ GitHub/RailsControllerRenderPathsExist: GitHub/RailsControllerRenderShorthand: Enabled: true -GitHub/RailsRenderInline: - Enabled: true - GitHub/RailsRenderObjectCollection: Enabled: false @@ -94,7 +88,7 @@ Rails/ApplicationMailer: Enabled: false Rails/ApplicationRecord: - Enabled: false + Enabled: true Rails/ArelStar: Enabled: false @@ -307,7 +301,7 @@ Rails/RelativeDateConstant: Enabled: false Rails/RenderInline: - Enabled: false + Enabled: true Rails/RenderPlainText: Enabled: false diff --git a/config/rails_cops.yml b/config/rails_cops.yml index ef3d9a4f..87363fbc 100644 --- a/config/rails_cops.yml +++ b/config/rails_cops.yml @@ -1,6 +1,3 @@ -GitHub/RailsApplicationRecord: - Enabled: pending - GitHub/RailsControllerRenderActionSymbol: Enabled: pending Include: @@ -25,15 +22,6 @@ GitHub/RailsControllerRenderShorthand: Include: - 'app/controllers/**/*.rb' -GitHub/RailsRenderInline: - Enabled: pending - StyleGuide: https://github.com/github/rubocop-github/blob/master/guides/rails-controller-render-inline.md - Include: - - 'app/controllers/**/*.rb' - - 'app/helpers/**/*.rb' - - 'app/view_models/**/*.rb' - - 'app/views/**/*.erb' - GitHub/RailsRenderObjectCollection: Enabled: pending diff --git a/guides/rails-render-inline.md b/guides/rails-render-inline.md deleted file mode 100644 index 8b5fa9b9..00000000 --- a/guides/rails-render-inline.md +++ /dev/null @@ -1,27 +0,0 @@ -# GitHub/RailsRenderInline - -tldr; Do not use `render inline:`. - -## Rendering plain text - -``` ruby -render inline: "Just plain text" # bad -``` - -The `inline:` option is often misused when plain text is being returned. Instead use `render plain: "Just plain text"`. - -## Rendering a dynamic ERB string - -String `#{}` interpolation is often misused with `render inline:` instead of using `<%= %>` interpolation. This will lead to a memory leak where an ERB method will be compiled and cached for each invocation of `render inline:`. - -``` ruby -render inline: "Hello #{@name}" # bad -``` - -## Rendering static ERB strings - -``` ruby -render inline: "Hello <%= @name %>" # bad -``` - -If you are passing a static ERB string to `render inline:`, this string is best moved to a `.erb` template under `app/views`. Template files are able to be precompiled at boot time. diff --git a/lib/rubocop/cop/github/rails_application_record.rb b/lib/rubocop/cop/github/rails_application_record.rb deleted file mode 100644 index 1ec30cf9..00000000 --- a/lib/rubocop/cop/github/rails_application_record.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true - -require "rubocop" - -module RuboCop - module Cop - module GitHub - class RailsApplicationRecord < Base - MSG = "Models should subclass from ApplicationRecord" - - def_node_matcher :active_record_base_const?, <<-PATTERN - (const (const nil? :ActiveRecord) :Base) - PATTERN - - def_node_matcher :application_record_const?, <<-PATTERN - (const nil? :ApplicationRecord) - PATTERN - - def on_class(node) - klass, superclass, _ = *node - - if active_record_base_const?(superclass) && !(application_record_const?(klass)) - add_offense(superclass) - end - end - end - end - end -end diff --git a/lib/rubocop/cop/github/rails_render_inline.rb b/lib/rubocop/cop/github/rails_render_inline.rb deleted file mode 100644 index 8f76fb2f..00000000 --- a/lib/rubocop/cop/github/rails_render_inline.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true - -require "rubocop" - -module RuboCop - module Cop - module GitHub - class RailsRenderInline < Base - MSG = "Avoid `render inline:`" - - def_node_matcher :render_with_options?, <<-PATTERN - (send nil? {:render :render_to_string} (hash $...)) - PATTERN - - def_node_matcher :inline_key?, <<-PATTERN - (pair (sym :inline) $_) - PATTERN - - def on_send(node) - if option_pairs = render_with_options?(node) - if option_pairs.detect { |pair| inline_key?(pair) } - add_offense(node) - end - end - end - end - end - end -end diff --git a/test/test_rails_application_record.rb b/test/test_rails_application_record.rb deleted file mode 100644 index 7ac77945..00000000 --- a/test/test_rails_application_record.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true - -require_relative "./cop_test" -require "minitest/autorun" -require "rubocop/cop/github/rails_application_record" - -class TestRailsApplicationRecord < CopTest - def cop_class - RuboCop::Cop::GitHub::RailsApplicationRecord - end - - def test_good_model - offenses = investigate(cop, <<-RUBY) - class Repository < ApplicationRecord - end - RUBY - - assert_empty offenses.map(&:message) - end - - def test_application_record_model - offenses = investigate(cop, <<-RUBY) - class ApplicationRecord < ActiveRecord::Base - end - RUBY - - assert_empty offenses.map(&:message) - end - - def test_bad_model - offenses = investigate(cop, <<-RUBY) - class Repository < ActiveRecord::Base - end - RUBY - - assert_equal 1, offenses.count - assert_equal "Models should subclass from ApplicationRecord", offenses.first.message - end -end diff --git a/test/test_rails_render_inline.rb b/test/test_rails_render_inline.rb deleted file mode 100644 index 53d5cadd..00000000 --- a/test/test_rails_render_inline.rb +++ /dev/null @@ -1,62 +0,0 @@ -# frozen_string_literal: true - -require_relative "./cop_test" -require "minitest/autorun" -require "rubocop/cop/github/rails_render_inline" - -class TestRailsRenderInline < CopTest - def cop_class - RuboCop::Cop::GitHub::RailsRenderInline - end - - def test_render_string_no_offense - offenses = investigate cop, <<-RUBY, "app/controllers/foo_controller.rb" - class FooController < ActionController::Base - def index - render template: "index" - end - - def show - render template: "show.html.erb", locals: { foo: @foo } - end - end - RUBY - - assert_equal 0, offenses.count - end - - def test_render_inline_offense - offenses = investigate cop, <<-RUBY, "app/controllers/products_controller.rb" - class ProductsController < ActionController::Base - def index - render inline: "<% products.each do |p| %>

<%= p.name %>

<% end %>" - end - end - RUBY - - assert_equal 1, offenses.count - assert_equal "Avoid `render inline:`", offenses[0].message - end - - def test_render_status_with_inline_offense - offenses = investigate cop, <<-RUBY, "app/controllers/products_controller.rb" - class ProductsController < ActionController::Base - def index - render status: 200, inline: "<% products.each do |p| %>

<%= p.name %>

<% end %>" - end - end - RUBY - - assert_equal 1, offenses.count - assert_equal "Avoid `render inline:`", offenses[0].message - end - - def test_erb_render_inline_offense - offenses = erb_investigate cop, <<-ERB, "app/views/products/index.html.erb" - <%= render inline: template %> - ERB - - assert_equal 1, offenses.count - assert_equal "Avoid `render inline:`", offenses[0].message - end -end From 15a6e783a40980e48da73468c95ab240b7ca48d5 Mon Sep 17 00:00:00 2001 From: Ben Sheldon Date: Thu, 13 Oct 2022 14:03:21 -0700 Subject: [PATCH 005/180] Add Contribution instructions, code of conduct, and codeowners --- CODEOWNERS | 1 + CODE_OF_CONDUCT.md | 73 ++++++++++++++++++++++++++++++++++++++++++++++ CONTRIBUTING.md | 47 +++++++++++++++++++++++------ README.md | 2 +- 4 files changed, 113 insertions(+), 10 deletions(-) create mode 100644 CODEOWNERS create mode 100644 CODE_OF_CONDUCT.md diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 00000000..6e12c3bc --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1 @@ +* @github/ruby-archiecture-reviewers diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 00000000..2ef4f602 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,73 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to make participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, sex characteristics, gender identity and expression, +level of experience, education, socio-economic status, nationality, personal +appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies within all project spaces, and it also applies when +an individual is representing the project or its community in public spaces. +Examples of representing a project or community include using an official +project e-mail address, posting via an official social media account, or acting +as an appointed representative at an online or offline event. Representation of +a project may be further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team at opensource+rubocop@github.com. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html + +[homepage]: https://www.contributor-covenant.org diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d1804811..4f1f09da 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,13 +1,42 @@ # Contributing -## Releasing a new version +We welcome your contributions to the project. Thank you! + +Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms. + + +## What to contribute + +This repository, `rubocop-github` is part of a broader RuboCop ecosystem. + +If the Cop you would like to propose is **generally applicable outside of GitHub**: + +1. Propose the change upstream in the core open source project (e.g. [`rubocop`](https://github.com/rubocop/rubocop), or [`rubocop-rails`](https://github.com/rubocop/rubocop-rails)), where it will have maximal visibility and discussion/feedback. +1. Patch the change provisionally into GitHub's project(s), for immediate benefit; that can include this repository. +1. ...if the proposal is accepted, remove the patch and pull the updated upstream. +1. ...if the proposal is not accepted, we usually learn something about our proposal, and we then choose whether to maintain the patch ourselves, discard it, or identify a better open-source home for it. + +If the Cop is **only applicable for GitHub**, then this is the right place to propose it. + +## How to contribute a Pull Request + +1. Fork and clone the repository +1. [Build it and make sure the tests pass](README.md#Testing) on your machine +1. Create a new branch: `git checkout -b my-branch-name` +1. Make your change, add tests, and make sure the tests still pass +1. Push to your fork and submit a Pull Request +1. Pat yourself on the back and wait for your pull request to be reviewed and merged. + +## For Maintainers + +### Releasing a new version 1. Update `rubocop-github.gemspec` with the next version number -2. Update the `CHANGELOG` with changes and contributor -3. Run `bundle` to update gem version contained in the lockfile -4. Make a commit: `Release v{VERSION}` -5. Tag the commit : `git tag v{VERSION}` -6. Create the package: `gem build rubocop-github.gemspec` -7. Push to GitHub: `git push origin && git push origin --tags` -8. Push to Rubygems: `gem push rubocop-github-{VERSION}.gem` -9. Publish a new release on GitHub: https://github.com/github/rubocop-github/releases/new +1. Update the `CHANGELOG` with changes and contributor +1. Run `bundle` to update gem version contained in the lockfile +1. Make a commit: `Release v{VERSION}` +1. Tag the commit : `git tag v{VERSION}` +1. Create the package: `gem build rubocop-github.gemspec` +1. Push to GitHub: `git push origin && git push origin --tags` +1. Push to Rubygems: `gem push rubocop-github-{VERSION}.gem` +1. Publish a new release on GitHub: https://github.com/github/rubocop-github/releases/new diff --git a/README.md b/README.md index 8796a67d..16b7a152 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # RuboCop GitHub ![CI](https://github.com/github/rubocop-github/workflows/CI/badge.svg?event=push) -This repository provides recommended RuboCop configuration and additional Cops for use on GitHub open source and internal Ruby projects. +This repository provides recommended RuboCop configuration and additional Cops for use on GitHub's open source and internal Ruby projects. ## Usage From 27c926dab95dc989da9e234f169a92142b33e270 Mon Sep 17 00:00:00 2001 From: "Ben Sheldon [he/him]" Date: Thu, 13 Oct 2022 14:04:25 -0700 Subject: [PATCH 006/180] Update CODEOWNERS --- CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CODEOWNERS b/CODEOWNERS index 6e12c3bc..fb48a77e 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1 +1 @@ -* @github/ruby-archiecture-reviewers +* @github/ruby-architecture-reviewers From 60688936c81bc73440059e2934ba93560d54e58a Mon Sep 17 00:00:00 2001 From: Issy Long Date: Tue, 18 Oct 2022 17:39:44 +0000 Subject: [PATCH 007/180] config/rails_cops: Update styleguide links now `master` => `main` - GitHub will do the redirection for a bit (not sure exactly how long), but it's nice to make these a direct link rather than an onward hop. --- config/rails_cops.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/config/rails_cops.yml b/config/rails_cops.yml index ef3d9a4f..f8f817e1 100644 --- a/config/rails_cops.yml +++ b/config/rails_cops.yml @@ -8,7 +8,7 @@ GitHub/RailsControllerRenderActionSymbol: GitHub/RailsControllerRenderLiteral: Enabled: pending - StyleGuide: https://github.com/github/rubocop-github/blob/master/guides/rails-render-literal.md + StyleGuide: https://github.com/github/rubocop-github/blob/main/guides/rails-render-literal.md Include: - 'app/controllers/**/*.rb' @@ -21,13 +21,13 @@ GitHub/RailsControllerRenderPathsExist: GitHub/RailsControllerRenderShorthand: Enabled: pending - StyleGuide: https://github.com/github/rubocop-github/blob/master/guides/rails-controller-render-shorthand.md + StyleGuide: https://github.com/github/rubocop-github/blob/main/guides/rails-controller-render-shorthand.md Include: - 'app/controllers/**/*.rb' GitHub/RailsRenderInline: Enabled: pending - StyleGuide: https://github.com/github/rubocop-github/blob/master/guides/rails-controller-render-inline.md + StyleGuide: https://github.com/github/rubocop-github/blob/main/guides/rails-controller-render-inline.md Include: - 'app/controllers/**/*.rb' - 'app/helpers/**/*.rb' @@ -39,7 +39,7 @@ GitHub/RailsRenderObjectCollection: GitHub/RailsViewRenderLiteral: Enabled: pending - StyleGuide: https://github.com/github/rubocop-github/blob/master/guides/rails-render-literal.md + StyleGuide: https://github.com/github/rubocop-github/blob/main/guides/rails-render-literal.md Include: - 'app/helpers/**/*.rb' - 'app/view_models/**/*.rb' From 596f143a2bbd103b1914069671680502bb11efe5 Mon Sep 17 00:00:00 2001 From: Issy Long Date: Tue, 18 Oct 2022 16:06:25 +0000 Subject: [PATCH 008/180] config/default: Link some rules to their styleguide justifications - "Some of", yes, since there are a lot. But I thought I'd get started since this is an important step towards being able to a) enable more RuboCop rules based on the evidence of our styleguide, b) realising how far adrift our RuboCop configs have potentially become from what's written in the Styleguide, c) encouraging honest adoption of these rules across GitHub because they're actually justified in text. --- config/default.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/config/default.yml b/config/default.yml index 52a0655e..d7883cef 100644 --- a/config/default.yml +++ b/config/default.yml @@ -65,8 +65,10 @@ Layout/BlockAlignment: Layout/BlockEndNewline: Enabled: true +# TODO: Enable this since it's in the styleguide. Layout/CaseIndentation: Enabled: false + StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#indent-when-as-start-of-case Layout/ClassStructure: Enabled: false @@ -186,10 +188,12 @@ Layout/IndentationStyle: Enabled: true EnforcedStyle: spaces IndentationWidth: 2 + StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#default-indentation Layout/IndentationWidth: Enabled: true Width: 2 + StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#default-indentation Layout/InitialIndentation: Enabled: true @@ -259,9 +263,11 @@ Layout/SingleLineBlockChain: Layout/SpaceAfterColon: Enabled: true + StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#spaces-operators Layout/SpaceAfterComma: Enabled: true + StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#spaces-operators Layout/SpaceAfterMethodName: Enabled: true @@ -271,12 +277,14 @@ Layout/SpaceAfterNot: Layout/SpaceAfterSemicolon: Enabled: true + StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#spaces-operators Layout/SpaceAroundBlockParameters: Enabled: true Layout/SpaceAroundEqualsInParameterDefault: Enabled: true + StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#spaces-around-equals Layout/SpaceAroundKeyword: Enabled: false @@ -311,6 +319,7 @@ Layout/SpaceInLambdaLiteral: Layout/SpaceInsideArrayLiteralBrackets: Enabled: true EnforcedStyle: no_space + StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#no-spaces-braces Layout/SpaceInsideArrayPercentLiteral: Enabled: true @@ -341,6 +350,7 @@ Layout/TrailingEmptyLines: Layout/TrailingWhitespace: Enabled: true + StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#trailing-whitespace Lint/AmbiguousAssignment: Enabled: false @@ -678,8 +688,10 @@ Lint/UnreachableCode: Lint/UnreachableLoop: Enabled: false +# TODO: Enable this since it's in the styleguide. Lint/UnusedBlockArgument: Enabled: false + StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#spaces-around-equals Lint/UnusedMethodArgument: Enabled: false @@ -976,8 +988,10 @@ Style/AccessorGrouping: Style/Alias: Enabled: false +# TODO: Enable this since it's in the styleguide. Style/AndOr: Enabled: false + StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#no-and-or-or Style/ArgumentsForwarding: Enabled: false @@ -1077,6 +1091,7 @@ Style/DateTime: Style/DefWithParentheses: Enabled: true + StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#method-parens-when-arguments Style/Dir: Enabled: false @@ -1164,6 +1179,7 @@ Style/FloatDivision: Style/For: Enabled: true + StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#avoid-for Style/FormatString: Enabled: false @@ -1201,6 +1217,7 @@ Style/HashLikeCase: Style/HashSyntax: Enabled: true EnforcedStyle: ruby19_no_mixed_keys + StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#symbols-as-keys Style/HashTransformKeys: Enabled: false @@ -1300,6 +1317,7 @@ Style/MultilineIfModifier: Style/MultilineIfThen: Enabled: true + StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#no-then-for-multi-line-if-unless Style/MultilineInPatternThen: Enabled: false @@ -1475,8 +1493,10 @@ Style/RedundantRegexpCharacterClass: Style/RedundantRegexpEscape: Enabled: false +# TODO: Enable this since it's in the styleguide. Style/RedundantReturn: Enabled: false + StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#avoid-return Style/RedundantSelf: Enabled: false @@ -1626,8 +1646,10 @@ Style/TrailingUnderscoreVariable: Style/TrivialAccessors: Enabled: false +# TODO: Enable this since it's in the styleguide. Style/UnlessElse: Enabled: false + StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#no-else-with-unless Style/UnlessLogicalOperators: Enabled: false From 5631e22dd165a9be2d77a6566a7ae1e7c3a2fb94 Mon Sep 17 00:00:00 2001 From: Issy Long Date: Tue, 18 Oct 2022 17:47:06 +0000 Subject: [PATCH 009/180] config/rails: Broader ERB exclude paths - Yes, by default Rails has `app/views/**/*.erb`, but ERB can also be elsewhere in the codebase. - This avoids users (of the Rails configs of this gem) from having to manually add other ERB exclusions, since these cops don't reliably play nicely with any ERB regardless of where it lives. --- config/rails.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/config/rails.yml b/config/rails.yml index e414a00a..3114c3cf 100644 --- a/config/rails.yml +++ b/config/rails.yml @@ -34,27 +34,27 @@ GitHub/RailsViewRenderShorthand: Layout/BlockAlignment: Exclude: - - app/views/**/*.erb + - "**/*.erb" Layout/IndentationWidth: Exclude: - - app/views/**/*.erb + - "**/*.erb" Layout/InitialIndentation: Exclude: - - app/views/**/*.erb + - "**/*.erb" Layout/SpaceInsideParens: Exclude: - - app/views/**/*.erb + - "**/*.erb" Layout/TrailingEmptyLines: Exclude: - - app/views/**/*.erb + - "**/*.erb" Layout/TrailingWhitespace: Exclude: - - app/views/**/*.erb + - "**/*.erb" Lint/UselessAccessModifier: ContextCreatingMethods: @@ -399,16 +399,16 @@ Rails/WhereNot: Style/For: Exclude: - - app/views/**/*.erb + - "**/*.erb" Style/OneLineConditional: Exclude: - - app/views/**/*.erb + - "**/*.erb" Style/Semicolon: Exclude: - - app/views/**/*.erb + - "**/*.erb" Style/StringLiterals: Exclude: - - app/views/**/*.erb + - "**/*.erb" From 5428bd25892707bab2f3cb1c1a3ed6da7acc1219 Mon Sep 17 00:00:00 2001 From: Issy Long Date: Fri, 21 Oct 2022 12:03:13 +0000 Subject: [PATCH 010/180] config/default: Upstream cop disables since this is the central place - In `github/github` when we bumped this gem and bumped the version of RuboCop and turned off `DisabledByDefault`, there were some cops that RuboCop had detected offenses for that weren't declared in here as explicitly disabled. - Let's set `Enabled: false` for the new cops, so that this gem's config is the source of truth and downstream consumers don't diverge too much. --- config/default.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/config/default.yml b/config/default.yml index d7883cef..7aef6c8d 100644 --- a/config/default.yml +++ b/config/default.yml @@ -454,6 +454,15 @@ Lint/EmptyConditionalBody: Lint/EmptyEnsure: Enabled: true +Lint/EmptyExpression: + Enabled: false + +Lint/EmptyFile: + Enabled: false + +Lint/EmptyWhen: + Enabled: false + Lint/EmptyInterpolation: Enabled: true @@ -607,6 +616,9 @@ Lint/RegexpAsCondition: Lint/RequireParentheses: Enabled: true +Lint/RequireRangeParentheses: + Enabled: false + Lint/RequireRelativeSelfPath: Enabled: false @@ -1129,6 +1141,9 @@ Style/EmptyCaseCondition: Style/EmptyElse: Enabled: false +Style/EmptyHeredoc: + Enabled: false + Style/EmptyLambdaParameter: Enabled: false @@ -1273,6 +1288,9 @@ Style/LambdaCall: Style/LineEndConcatenation: Enabled: false +Style/MagicCommentFormat: + Enabled: false + Style/MapCompactWithConditionalBlock: Enabled: false From 25a3a08f7ac3aed0216a755e104e9fdbadd9bac5 Mon Sep 17 00:00:00 2001 From: Issy Long Date: Fri, 21 Oct 2022 14:19:04 +0000 Subject: [PATCH 011/180] config/default: Remove some redundant `Enabled: true` for cops - For cops with a styleguide link, where there's evidence that we want the rule to apply, we don't need to also explicitly declare `Enabled: true` for each of them. Since we removed `DisabledByDefault`, the enablements here for cops that are *enabled by default in RuboCop itself** are redundant. - I could have gone further and removed the rules that RuboCop has enabled by default that _didn't_ have a styleguide link, but I feel like we need some evidence for why a rule is in place first for when people come looking at this gem's config to figure out why new rules are suddenly failing or not. --- config/default.yml | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/config/default.yml b/config/default.yml index d7883cef..6ae30545 100644 --- a/config/default.yml +++ b/config/default.yml @@ -182,16 +182,14 @@ Layout/HeredocIndentation: Enabled: false Layout/IndentationConsistency: - Enabled: false + StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#indentation Layout/IndentationStyle: - Enabled: true EnforcedStyle: spaces IndentationWidth: 2 StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#default-indentation Layout/IndentationWidth: - Enabled: true Width: 2 StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#default-indentation @@ -262,11 +260,9 @@ Layout/SingleLineBlockChain: Enabled: false Layout/SpaceAfterColon: - Enabled: true StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#spaces-operators Layout/SpaceAfterComma: - Enabled: true StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#spaces-operators Layout/SpaceAfterMethodName: @@ -276,18 +272,16 @@ Layout/SpaceAfterNot: Enabled: true Layout/SpaceAfterSemicolon: - Enabled: true StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#spaces-operators Layout/SpaceAroundBlockParameters: Enabled: true Layout/SpaceAroundEqualsInParameterDefault: - Enabled: true StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#spaces-around-equals Layout/SpaceAroundKeyword: - Enabled: false + StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#spaces-operators Layout/SpaceAroundMethodCallOperator: Enabled: false @@ -317,7 +311,6 @@ Layout/SpaceInLambdaLiteral: Enabled: false Layout/SpaceInsideArrayLiteralBrackets: - Enabled: true EnforcedStyle: no_space StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#no-spaces-braces @@ -349,7 +342,6 @@ Layout/TrailingEmptyLines: Enabled: true Layout/TrailingWhitespace: - Enabled: true StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#trailing-whitespace Lint/AmbiguousAssignment: @@ -1090,7 +1082,6 @@ Style/DateTime: Enabled: false Style/DefWithParentheses: - Enabled: true StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#method-parens-when-arguments Style/Dir: @@ -1178,7 +1169,6 @@ Style/FloatDivision: Enabled: false Style/For: - Enabled: true StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#avoid-for Style/FormatString: @@ -1215,7 +1205,6 @@ Style/HashLikeCase: Enabled: false Style/HashSyntax: - Enabled: true EnforcedStyle: ruby19_no_mixed_keys StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#symbols-as-keys @@ -1316,7 +1305,6 @@ Style/MultilineIfModifier: Enabled: false Style/MultilineIfThen: - Enabled: true StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#no-then-for-multi-line-if-unless Style/MultilineInPatternThen: @@ -1583,8 +1571,8 @@ Style/StringHashKeys: Enabled: false Style/StringLiterals: - Enabled: true EnforcedStyle: double_quotes + StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#double-quotes Style/StringLiteralsInInterpolation: Enabled: false From 217b98638c7636652c1430a19d32c13f97eb7e27 Mon Sep 17 00:00:00 2001 From: Sam Partington Date: Fri, 21 Oct 2022 16:35:38 +0100 Subject: [PATCH 012/180] Fix Styleguide link in default.yml https://github.com/github/rubocop-github/pull/124/files#r1000474353 --- config/default.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/default.yml b/config/default.yml index d7883cef..ad020013 100644 --- a/config/default.yml +++ b/config/default.yml @@ -691,7 +691,7 @@ Lint/UnreachableLoop: # TODO: Enable this since it's in the styleguide. Lint/UnusedBlockArgument: Enabled: false - StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#spaces-around-equals + StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#underscore-unused-vars Lint/UnusedMethodArgument: Enabled: false From 8e768057435f96782bb53fa91fc7c77f8d857a58 Mon Sep 17 00:00:00 2001 From: Sam Partington Date: Tue, 25 Oct 2022 13:52:40 +0100 Subject: [PATCH 013/180] Add link to Style Guide from README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8796a67d..7ba558fa 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # RuboCop GitHub ![CI](https://github.com/github/rubocop-github/workflows/CI/badge.svg?event=push) -This repository provides recommended RuboCop configuration and additional Cops for use on GitHub open source and internal Ruby projects. +This repository provides recommended RuboCop configuration and additional Cops for use on GitHub open source and internal Ruby projects, and is the home of [GitHub's Ruby Style Guide](./STYLEGUIDE.md). ## Usage From d24723ec59b2ceae6fd42f62746330841c35e058 Mon Sep 17 00:00:00 2001 From: Sam Partington Date: Tue, 25 Oct 2022 14:33:09 +0100 Subject: [PATCH 014/180] Add Rails recommendations to styleguide These were originally in our web-systems documentation --- STYLEGUIDE.md | 128 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 128 insertions(+) diff --git a/STYLEGUIDE.md b/STYLEGUIDE.md index 1e55a3be..56839237 100644 --- a/STYLEGUIDE.md +++ b/STYLEGUIDE.md @@ -27,6 +27,9 @@ This is GitHub's Ruby Style Guide, inspired by [RuboCop's guide][rubocop-guide]. 1. [Conditional keywords](#conditional-keywords) 2. [Ternary operator](#ternary-operator) 17. [Syntax](#syntax) +18. [Rails](#rails) + 1. [content_for](#content_for) + 2. [Instance Variables in Views](#instance-variables-in-views) ## Layout @@ -893,4 +896,129 @@ result = hash.map { |_, v| v + 1 } Refactoring is even better. It's worth looking hard at any code that explicitly checks types. +## Rails + +### content_for + +Limit usage of `content_for` helper. The use of `content_for` is the same as setting an instance variable plus `capture`. + +``` erb +<% content_for :foo do %> + Hello +<% end %> +``` + +Is effectively the same as + +``` erb +<% @foo_content = capture do %> + Hello +<% end %> +``` + +See "Instance Variables in Views" below. + +#### Common Anti-patterns + +**Using `content_for` within the same template to capture data.** + +Instead, just use `capture`. + +``` erb + +<% content_for :page do %> + Hello +<% end %> +<% if foo? %> +
+ <%= yield :page %> +
+<% else %> + <%= yield :page %> +<% end %> +``` + +Simply capture and use a local variable since the result is only needed in this template. + +``` erb + +<% page = capture do %> + Hello +<% end %> +<% if foo? %> +
+ <%= page %> +
+<% else %> + <%= page %> +<% end %> +``` + +**Using `content_for` to pass content to a subtemplate.** + +Instead, `render layout:` with a block. + +``` erb + +<% content_for :page do %> + Hello +<% end %> +<%= render partial: "page" %> + +
+ <%= yield :page %> +
+``` + +Pass the content in a block directly to the `render` function. + +``` erb + +<%= render layout: "page" do %> + Hello +<% end %> + +
+ <%= yield %> +
+``` + +### Instance Variables in Views + +In general, passing data between templates with instance variables is discouraged. This even applies from controllers to templates, not just between partials. + +`:locals` can be used to pass data from a controller just like partials. + +``` ruby +def show + render "blob/show", locals: { + :repository => current_repository, + :commit => current_commit, + :blob => current_blob + } +end +``` + +Rails implicit renders are also discouraged. + +Always explicitly render templates with a full directory path. This makes template callers easier to trace. You can find all the callers of `"app/view/site/hompage.html.erb"` with a simple project search for `"site/homepage"`. + +``` ruby +def homepage + render "site/homepage" +end +``` + +#### Exceptions + +There are some known edge cases where you might be forced to use instance variables. In these cases, its okay to do so. + +##### Legacy templates + +If you need to call a subview that expects an instance variable be set. If possible consider refactoring the subview to accept a local instead. + +##### Layouts + +Unfortunately the only way to get data into a layout template is with instance variables. You can't explicitly pass locals to them. + [rubocop-guide]: https://github.com/rubocop-hq/ruby-style-guide From 9930c9050c0fd314ea291b8b08e7d7cd01dcef87 Mon Sep 17 00:00:00 2001 From: "Ben Sheldon [he/him]" Date: Wed, 26 Oct 2022 08:02:11 -0700 Subject: [PATCH 015/180] Update CONTRIBUTING.md Co-authored-by: Sam Partington --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4f1f09da..a69b7d28 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -7,7 +7,7 @@ Please note that this project is released with a [Contributor Code of Conduct](C ## What to contribute -This repository, `rubocop-github` is part of a broader RuboCop ecosystem. +This repository, `rubocop-github`, is part of a broader RuboCop ecosystem. If the Cop you would like to propose is **generally applicable outside of GitHub**: From ffeb9fbdc9003f0d125573d2fbb9079df50228c7 Mon Sep 17 00:00:00 2001 From: Issy Long Date: Wed, 26 Oct 2022 15:30:43 +0000 Subject: [PATCH 016/180] STYLEGUIDE: For each styleguide recommendation, link to the RuboCop rule - This allows people who are reading the style guide to investigate the configuration of the RuboCop rules in their apps if they wish, without having to Google the words in our styleguide which might not match the RuboCop rule explanation, and guess as to what the cop is called. Co-authored-by: Issy Long Co-authored-by: Elena Tanasoiu --- STYLEGUIDE.md | 66 +++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 62 insertions(+), 4 deletions(-) diff --git a/STYLEGUIDE.md b/STYLEGUIDE.md index 1e55a3be..476fcc02 100644 --- a/STYLEGUIDE.md +++ b/STYLEGUIDE.md @@ -34,9 +34,11 @@ This is GitHub's Ruby Style Guide, inspired by [RuboCop's guide][rubocop-guide]. * Use soft-tabs with a two space indent. [[link](#default-indentation)] + * RuboCop rule: Layout/IndentationStyle * Indent `when` with the start of the `case` expression. [[link](#indent-when-as-start-of-case)] + * RuboCop rule: Layout/CaseIndentation ``` ruby # bad @@ -80,10 +82,18 @@ end * Never leave trailing whitespace. [[link](#trailing-whitespace)] + * RuboCop rule: Layout/TrailingWhitespace * Use spaces around operators, after commas, colons and semicolons, around `{` and before `}`. [[link](#spaces-operators)] + * RuboCop rule: Layout/SpaceAroundOperators + * RuboCop rule: Layout/SpaceAfterComma + * RuboCop rule: Layout/SpaceAfterColon + * RuboCop rule: Layout/SpaceBeforeBlockBraces + * RuboCop rule: Layout/SpaceInsideHashLiteralBraces + * RuboCop rule: Style/HashSyntax + * RuboCop rule: Layout/SpaceAroundOperators ``` ruby sum = 1 + 2 @@ -94,6 +104,8 @@ a, b = 1, 2 * No spaces after `(`, `[` or before `]`, `)`. [[link](#no-spaces-braces)] + * RuboCop rule: Layout/SpaceInsideParens + * RuboCop rule: Layout/SpaceInsideReferenceBrackets ``` ruby some(arg).other @@ -102,6 +114,7 @@ some(arg).other * No spaces after `!`. [[link](#no-spaces-bang)] + * RuboCop rule: Layout/SpaceAfterNot ``` ruby !array.include?(element) @@ -111,10 +124,12 @@ some(arg).other * End each file with a [newline](https://github.com/bbatsov/ruby-style-guide#newline-eof). [[link](#newline-eof)] + * RuboCop rule: Layout/TrailingEmptyLines * Use empty lines between `def`s and to break up a method into logical paragraphs. [[link](#empty-lines-def)] + * RuboCop rule: Layout/EmptyLineBetweenDefs ``` ruby def some_method @@ -134,12 +149,14 @@ end * Keep each line of code to a readable length. Unless you have a reason to, keep lines to a maximum of 118 characters. Why 118? That's the width at which the pull request diff UI needs horizontal scrolling (making pull requests harder to review). [[link](#line-length)] + * RuboCop rule: Layout/LineLength ## Classes * Avoid the usage of class (`@@`) variables due to their unusual behavior in inheritance. [[link](#class-variables)] + * RuboCop rule: Style/ClassVars ``` ruby class Parent @@ -164,6 +181,7 @@ Parent.print_class_var # => will print "child" * Use `def self.method` to define singleton methods. This makes the methods more resistant to refactoring changes. [[link](#singleton-methods)] + * RuboCop rule: Style/ClassMethodsDefinitions ``` ruby class TestClass @@ -181,6 +199,7 @@ class TestClass * Avoid `class << self` except when necessary, e.g. single accessors and aliased attributes. [[link](#class-method-definitions)] + * RuboCop rule: Style/ClassMethodsDefinitions ``` ruby class TestClass @@ -214,6 +233,8 @@ end * Indent the `public`, `protected`, and `private` methods as much the method definitions they apply to. Leave one blank line above them. [[link](#access-modifier-identation)] + * RuboCop rule: Layout/AccessModifierIndentation + * RuboCop rule: Layout/EmptyLinesAroundAccessModifier ``` ruby class SomeClass @@ -231,6 +252,7 @@ end * Avoid explicit use of `self` as the recipient of internal class or instance messages unless to specify a method shadowed by a variable. [[link](#self-messages)] + * RuboCop rule: Style/RedundantSelf ``` ruby class SomeClass @@ -248,6 +270,7 @@ end * Prefer `%w` to the literal array syntax when you need an array of strings. [[link](#percent-w)] + * RuboCop rule: Style/WordArray ``` ruby # bad @@ -265,6 +288,7 @@ STATES = %w(draft open closed) * Use symbols instead of strings as hash keys. [[link](#symbols-as-keys)] + * RuboCop rule: Style/StringHashKeys ``` ruby # bad @@ -300,9 +324,10 @@ end Avoid calling `send` and its cousins unless you really need it. Metaprogramming can be extremely powerful, but in most cases you can write code that captures your meaning by being explicit: [[link](#avoid-send)] + * RuboCop rule: Style/Send ``` ruby -# avoid +# avoid unless [:base, :head].include?(base_or_head) raise ArgumentError, "base_or_head must be either :base or :head" end @@ -366,6 +391,7 @@ end Use the Ruby 1.9 syntax for hash literals when all the keys are symbols: [[link](#symbols-as-hash-keys)] +* RuboCop rule: Style/StringHashKeys ``` ruby # bad @@ -396,6 +422,7 @@ link_to("Account", controller: "users", action: "show", id: user) If you have a hash with mixed key types, use the legacy hashrocket style to avoid mixing styles within the same hash: [[link](#consistent-hash-syntax)] +* RuboCop rule: Style/HashSyntax ``` ruby @@ -417,6 +444,7 @@ hsh = { [Keyword arguments](http://magazine.rubyist.net/?Ruby200SpecialEn-kwarg) are recommended but not required when a method's arguments may otherwise be opaque or non-obvious when called. Additionally, prefer them over the old "Hash as pseudo-named args" style from pre-2.0 ruby. [[link](#keyword-arguments)] +* RuboCop rule: Style/OptionalBooleanParameter So instead of this: @@ -444,21 +472,26 @@ remove_member(user, skip_membership_check: true) * Use `snake_case` for methods and variables. [[link](#snake-case-methods-vars)] + * RuboCop rule: Naming/SnakeCase + * RuboCop rule: Naming/VariableName * Use `CamelCase` for classes and modules. (Keep acronyms like HTTP, RFC, XML uppercase.) [[link](#camelcase-classes-modules)] + * RuboCop rule: Naming/ClassAndModuleCamelCase * Use `SCREAMING_SNAKE_CASE` for other constants. [[link](#screaming-snake-case-constants)] + * RuboCop rule: Naming/ConstantName * The names of predicate methods (methods that return a boolean value) should end in a question mark. (i.e. `Array#empty?`). [[link](#bool-methods-qmark)] + * RuboCop rule: Naming/PredicateName * The names of potentially "dangerous" methods (i.e. methods that modify `self` or the arguments, `exit!`, etc.) should end with an exclamation mark. Bang methods - should only exist if a non-bang counterpart (method name which does NOT end with !) + should only exist if a non-bang counterpart (method name which does NOT end with !) also exists. [[link](#dangerous-method-bang)] @@ -466,6 +499,7 @@ remove_member(user, skip_membership_check: true) * Use `%w` freely. [[link](#use-percent-w-freely)] + * RuboCop rule: Style/WordArray ``` ruby STATES = %w(draft open closed) @@ -474,6 +508,7 @@ STATES = %w(draft open closed) * Use `%()` for single-line strings which require both interpolation and embedded double-quotes. For multi-line strings, prefer heredocs. [[link](#percent-parens-single-line)] + * RuboCop rule: Style/BarePercentLiterals ``` ruby # bad (no interpolation needed) @@ -494,6 +529,7 @@ STATES = %w(draft open closed) * Use `%r` only for regular expressions matching *more than* one '/' character. [[link](#percent-r-regular-expressions)] + * RuboCop rule: Style/RegexpLiteral ``` ruby # bad @@ -512,7 +548,7 @@ STATES = %w(draft open closed) * Avoid using $1-9 as it can be hard to track what they contain. Named groups can be used instead. [[link](#capture-with-named-groups)] - + * RuboCop rule: Lint/MixedRegexpCaptureTypes ``` ruby # bad /(regexp)/ =~ string @@ -571,6 +607,7 @@ documentation about the libraries that the current file uses. * Prefer string interpolation instead of string concatenation: [[link](#string-interpolation)] + * RuboCop rule: Style/StringConcatenation ``` ruby # bad @@ -584,6 +621,7 @@ email_with_name = "#{user.name} <#{user.email}>" will always work without a delimiter change, and `'` is a lot more common than `"` in string literals. [[link](#double-quotes)] + * RuboCop rule: Style/StringLiterals ``` ruby # bad @@ -615,6 +653,7 @@ end * Use `def` with parentheses when there are arguments. Omit the parentheses when the method doesn't accept any arguments. [[link](#method-parens-when-arguments)] + * RuboCop rule: Style/DefWithParentheses ``` ruby def some_method @@ -632,9 +671,11 @@ end always use parentheses in the method invocation. For example, write `f((3 + 2) + 1)`. [[link](#parens-no-spaces)] + * RuboCop rule: Style/MethodCallWithArgsParentheses * Never put a space between a method name and the opening parenthesis. [[link](#no-spaces-method-parens)] + * RuboCop rule: Style/ParenthesesAsGroupedExpression ``` ruby # bad @@ -650,6 +691,7 @@ f(3 + 2) + 1 * Never use `then` for multi-line `if/unless`. [[link](#no-then-for-multi-line-if-unless)] + * RuboCop rule: Style/MultilineIfThen ``` ruby # bad @@ -665,10 +707,12 @@ end * The `and` and `or` keywords are banned. It's just not worth it. Always use `&&` and `||` instead. [[link](#no-and-or-or)] + * RuboCop rule: Style/AndOr * Favor modifier `if/unless` usage when you have a single-line body. [[link](#favor-modifier-if-unless)] + * RuboCop rule: Style/MultilineTernaryOperator ``` ruby # bad @@ -682,6 +726,7 @@ do_something if some_condition * Never use `unless` with `else`. Rewrite these with the positive case first. [[link](#no-else-with-unless)] + * RuboCop rule: Style/UnlessElse ``` ruby # bad @@ -701,6 +746,7 @@ end * Don't use parentheses around the condition of an `if/unless/while`. [[link](#no-parens-if-unless-while)] + * RuboCop rule: Style/ParenthesesAroundCondition ``` ruby # bad @@ -720,6 +766,7 @@ end trivial. However, do use the ternary operator(`?:`) over `if/then/else/end` constructs for single line conditionals. [[link](#trivial-ternary)] + * RuboCop rule: Style/MultilineTernaryOperator ``` ruby # bad @@ -731,11 +778,13 @@ result = some_condition ? something : something_else * Avoid multi-line `?:` (the ternary operator), use `if/unless` instead. [[link](#no-multiline-ternary)] + * RuboCop rule: Style/MultilineTernaryOperator * Use one expression per branch in a ternary operator. This also means that ternary operators must not be nested. Prefer `if/else` constructs in these cases. [[link](#one-expression-per-branch)] + * RuboCop rule: Style/NestedTernaryOperator ``` ruby # bad @@ -757,6 +806,7 @@ end doesn't introduce a new scope (unlike `each`) and variables defined in its block will be visible outside it. [[link](#avoid-for)] + * RuboCop rule: Style/For ``` ruby arr = [1, 2, 3] @@ -776,6 +826,7 @@ arr.each { |elem| puts elem } definitions" (e.g. in Rakefiles and certain DSLs). Avoid `do...end` when chaining. [[link](#squiggly-braces)] + * RuboCop rule: Style/BlockDelimiters ``` ruby names = ["Bozhidar", "Steve", "Sarah"] @@ -798,11 +849,12 @@ end.map { |name| name.upcase } ``` * Some will argue that multiline chaining would look OK with the use of `{...}`, - but they should ask themselves: is this code really readable and can't the block's + but they should ask themselves: is this code really readable and can't the block's contents be extracted into nifty methods? * Avoid `return` where not required. [[link](#avoid-return)] + * RuboCop rule: Style/RedundantReturn ``` ruby # bad @@ -818,6 +870,7 @@ end * Use spaces around the `=` operator when assigning default values to method parameters: [[link](#spaces-around-equals)] + * RuboCop rule: Style/SpaceAroundEqualsInParameterDefault ``` ruby # bad @@ -850,6 +903,7 @@ if (v = next_value) == "hello" ... * Use `||=` freely to initialize variables. [[link](#memoize-away)] + * RuboCop rule: Style/OrAssignment ``` ruby # set name to Bozhidar, only if it's nil or false @@ -859,6 +913,7 @@ name ||= "Bozhidar" * Don't use `||=` to initialize boolean variables. (Consider what would happen if the current value happened to be `false`.) [[link](#no-memoization-for-boolean)] + * RuboCop rule: Style/OrAssignment ``` ruby # bad - would set enabled to true even if it was false @@ -873,9 +928,11 @@ enabled = true if enabled.nil? one-liner scripts is discouraged. Prefer long form versions such as `$PROGRAM_NAME`. [[link](#no-cryptic-vars)] + * RuboCop rule: Style/SpecialGlobalVars * Use `_` for unused block parameters. [[link](#underscore-unused-vars)] + * RuboCop rule: Style/UnusedBlockArgument ``` ruby # bad @@ -890,6 +947,7 @@ result = hash.map { |_, v| v + 1 } For example, `String === "hi"` is true and `"hi" === String` is false. Instead, use `is_a?` or `kind_of?` if you must. [[link](#type-checking-is-a-kind-of)] + * RuboCop rule: Style/CaseEquality Refactoring is even better. It's worth looking hard at any code that explicitly checks types. From 90a607fbb26666eae11b8d2c4253edd85b3e8da8 Mon Sep 17 00:00:00 2001 From: Issy Long Date: Thu, 27 Oct 2022 12:16:15 +0100 Subject: [PATCH 017/180] STYLEGUIDE: `UnusedBlockArgument` is in `Lint` not `Style` --- STYLEGUIDE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/STYLEGUIDE.md b/STYLEGUIDE.md index b2940753..758651b6 100644 --- a/STYLEGUIDE.md +++ b/STYLEGUIDE.md @@ -935,7 +935,7 @@ enabled = true if enabled.nil? * Use `_` for unused block parameters. [[link](#underscore-unused-vars)] - * RuboCop rule: Style/UnusedBlockArgument + * RuboCop rule: Lint/UnusedBlockArgument ``` ruby # bad From 90e921a579f959eceded18791bdf87e813107620 Mon Sep 17 00:00:00 2001 From: Ben Sheldon Date: Fri, 28 Oct 2022 10:17:54 -0700 Subject: [PATCH 018/180] Pin versions, add Dependabot rules, update rubocop versions and create pending files --- .github/dependabot.yml | 7 +++++ .rubocop.yml | 1 + CONTRIBUTING.md | 19 ++++++++++++++ Gemfile.lock | 52 +++++++++++++++++++------------------ config/default.yml | 3 +++ config/default_pending.yml | 6 +++++ config/rails.yml | 3 +++ config/rails_cops.yml | 9 ------- config/rails_pending.yml | 20 ++++++++++++++ lib/rubocop-github-rails.rb | 2 -- rubocop-github.gemspec | 6 ++--- 11 files changed, 89 insertions(+), 39 deletions(-) create mode 100644 .github/dependabot.yml create mode 100644 config/default_pending.yml create mode 100644 config/rails_pending.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..bdb77e0f --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,7 @@ +version: 2 +updates: + - package-ecosystem: bundler + directory: '/' + versioning-strategy: increase + schedule: + interval: weekly diff --git a/.rubocop.yml b/.rubocop.yml index 9c49771d..afe2d021 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,5 +1,6 @@ inherit_from: - ./config/default.yml + - ./config/rails.yml Naming/FileName: Enabled: true diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a69b7d28..fcab75d4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -29,6 +29,25 @@ If the Cop is **only applicable for GitHub**, then this is the right place to pr ## For Maintainers +### Updating Rubocop Dependencies + +Rubocop regularly releases new versions with new cops. We want to keep up to date with the latest Rubocop releases, and keep these rules and styleguide in sync to reduce burden on consumers of this gem. + +- Run `bundle update rubocop rubocop-performance rubocop-rails` to update the dependencies within this repository. Major updates will require updating the `.gemspec` file because of the pinned version constraints. +- Run `bundle exec rubocop`, and copy the output of newly introduced rules into `config/default_pending.yml` and `config/rails_pending.yml`. They should look like this: + + ```sh + Lint/DuplicateMagicComment: # new in 1.37 + Enabled: true + Style/OperatorMethodCall: # new in 1.37 + Enabled: true + Style/RedundantStringEscape: # new in 1.37 + Enabled: true + ``` + +- Run `bundle exec rubocop` again to ensure that it runs cleanly without any pending cops. Also run `bundle exec rake` to run the tests. +- Work through the pending cops, and copy them to `config/{default,rails}.yml` with an explicity `Enabled: true` or `Enabled: false` depending on your decision as to whether they should be part of our standard ruleset. + ### Releasing a new version 1. Update `rubocop-github.gemspec` with the next version number diff --git a/Gemfile.lock b/Gemfile.lock index e597b511..7395888c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,20 +2,20 @@ PATH remote: . specs: rubocop-github (0.19.0) - rubocop (>= 1.0.0) - rubocop-performance - rubocop-rails + rubocop (~> 1.37) + rubocop-performance (~> 1.15) + rubocop-rails (~> 2.17) GEM remote: https://rubygems.org/ specs: - actionview (7.0.3) - activesupport (= 7.0.3) + actionview (7.0.4) + activesupport (= 7.0.4) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activesupport (7.0.3) + activesupport (7.0.4) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) @@ -24,22 +24,23 @@ GEM builder (3.2.4) concurrent-ruby (1.1.10) crass (1.0.6) - erubi (1.10.0) - i18n (1.10.0) + erubi (1.11.0) + i18n (1.12.0) concurrent-ruby (~> 1.0) - loofah (2.18.0) + json (2.6.2) + loofah (2.19.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) - minitest (5.16.1) - nokogiri (1.13.6-arm64-darwin) + minitest (5.16.3) + nokogiri (1.13.9-arm64-darwin) racc (~> 1.4) - nokogiri (1.13.6-x86_64-darwin) + nokogiri (1.13.9-x86_64-darwin) racc (~> 1.4) parallel (1.22.1) - parser (3.1.2.0) + parser (3.1.2.1) ast (~> 2.4.1) racc (1.6.0) - rack (2.2.3.1) + rack (3.0.0) rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) @@ -47,30 +48,31 @@ GEM loofah (~> 2.3) rainbow (3.1.1) rake (13.0.6) - regexp_parser (2.5.0) + regexp_parser (2.6.0) rexml (3.2.5) - rubocop (1.31.0) + rubocop (1.37.1) + json (~> 2.3) parallel (~> 1.10) - parser (>= 3.1.0.0) + parser (>= 3.1.2.1) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.18.0, < 2.0) + rubocop-ast (>= 1.23.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 3.0) - rubocop-ast (1.18.0) + rubocop-ast (1.23.0) parser (>= 3.1.1.0) - rubocop-performance (1.14.2) + rubocop-performance (1.15.0) rubocop (>= 1.7.0, < 2.0) rubocop-ast (>= 0.4.0) - rubocop-rails (2.15.1) + rubocop-rails (2.17.2) activesupport (>= 4.2.0) rack (>= 1.1) - rubocop (>= 1.7.0, < 2.0) + rubocop (>= 1.33.0, < 2.0) ruby-progressbar (1.11.0) - tzinfo (2.0.4) + tzinfo (2.0.5) concurrent-ruby (~> 1.0) - unicode-display_width (2.2.0) + unicode-display_width (2.3.0) PLATFORMS arm64-darwin-21 @@ -84,4 +86,4 @@ DEPENDENCIES rubocop-github! BUNDLED WITH - 2.2.33 + 2.3.24 diff --git a/config/default.yml b/config/default.yml index 6b46b224..0a3672c7 100644 --- a/config/default.yml +++ b/config/default.yml @@ -1,3 +1,6 @@ +inherit_from: + - ./default_pending.yml + require: - rubocop-github - rubocop-performance diff --git a/config/default_pending.yml b/config/default_pending.yml new file mode 100644 index 00000000..ee85c603 --- /dev/null +++ b/config/default_pending.yml @@ -0,0 +1,6 @@ +Lint/DuplicateMagicComment: # new in 1.37 + Enabled: false +Style/OperatorMethodCall: # new in 1.37 + Enabled: false +Style/RedundantStringEscape: # new in 1.37 + Enabled: false diff --git a/config/rails.yml b/config/rails.yml index 81ef8a4c..b7b8d6ec 100644 --- a/config/rails.yml +++ b/config/rails.yml @@ -1,3 +1,6 @@ +inherit_from: + - ./rails_pending.yml + require: - rubocop-github-rails - rubocop-rails diff --git a/config/rails_cops.yml b/config/rails_cops.yml index 1443e4ba..d0d0a34c 100644 --- a/config/rails_cops.yml +++ b/config/rails_cops.yml @@ -22,15 +22,6 @@ GitHub/RailsControllerRenderShorthand: Include: - 'app/controllers/**/*.rb' -GitHub/RailsRenderInline: - Enabled: pending - StyleGuide: https://github.com/github/rubocop-github/blob/main/guides/rails-controller-render-inline.md - Include: - - 'app/controllers/**/*.rb' - - 'app/helpers/**/*.rb' - - 'app/view_models/**/*.rb' - - 'app/views/**/*.erb' - GitHub/RailsRenderObjectCollection: Enabled: pending diff --git a/config/rails_pending.yml b/config/rails_pending.yml new file mode 100644 index 00000000..b3abb0b5 --- /dev/null +++ b/config/rails_pending.yml @@ -0,0 +1,20 @@ +Rails/ActionControllerFlashBeforeRender: # new in 2.16 + Enabled: false +Rails/ActionOrder: # new in 2.17 + Enabled: false +Rails/ActiveSupportOnLoad: # new in 2.16 + Enabled: false +Rails/FreezeTime: # new in 2.16 + Enabled: false +Rails/IgnoredColumnsAssignment: # new in 2.17 + Enabled: false +Rails/RootPathnameMethods: # new in 2.16 + Enabled: false +Rails/ToSWithArgument: # new in 2.16 + Enabled: false +Rails/TopLevelHashWithIndifferentAccess: # new in 2.16 + Enabled: false +Rails/WhereMissing: # new in 2.16 + Enabled: false +Rails/WhereNotWithMultipleConditions: # new in 2.17 + Enabled: false diff --git a/lib/rubocop-github-rails.rb b/lib/rubocop-github-rails.rb index 02aa6adc..887b1df5 100644 --- a/lib/rubocop-github-rails.rb +++ b/lib/rubocop-github-rails.rb @@ -6,12 +6,10 @@ RuboCop::GitHub::Inject.rails_defaults! -require "rubocop/cop/github/rails_application_record" require "rubocop/cop/github/rails_controller_render_action_symbol" require "rubocop/cop/github/rails_controller_render_literal" require "rubocop/cop/github/rails_controller_render_paths_exist" require "rubocop/cop/github/rails_controller_render_shorthand" -require "rubocop/cop/github/rails_render_inline" require "rubocop/cop/github/rails_render_object_collection" require "rubocop/cop/github/rails_view_render_literal" require "rubocop/cop/github/rails_view_render_paths_exist" diff --git a/rubocop-github.gemspec b/rubocop-github.gemspec index 7b243dd4..c6d1e41c 100644 --- a/rubocop-github.gemspec +++ b/rubocop-github.gemspec @@ -10,9 +10,9 @@ Gem::Specification.new do |s| s.files = Dir["README.md", "STYLEGUIDE.md", "LICENSE", "config/*.yml", "lib/**/*.rb", "guides/*.md"] - s.add_dependency "rubocop", ">= 1.0.0" - s.add_dependency "rubocop-performance" - s.add_dependency "rubocop-rails" + s.add_dependency "rubocop", "~> 1.37" + s.add_dependency "rubocop-performance", "~> 1.15" + s.add_dependency "rubocop-rails", "~> 2.17" s.add_development_dependency "actionview" s.add_development_dependency "minitest" From d959dddf041812457cb93b0c42b2d087b6c35cc9 Mon Sep 17 00:00:00 2001 From: Ben Sheldon Date: Fri, 28 Oct 2022 11:04:20 -0700 Subject: [PATCH 019/180] Update version constraint from `~>` to `>=` --- Gemfile.lock | 6 +++--- rubocop-github.gemspec | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 7395888c..ccf0bb2d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,9 +2,9 @@ PATH remote: . specs: rubocop-github (0.19.0) - rubocop (~> 1.37) - rubocop-performance (~> 1.15) - rubocop-rails (~> 2.17) + rubocop (>= 1.37) + rubocop-performance (>= 1.15) + rubocop-rails (>= 2.17) GEM remote: https://rubygems.org/ diff --git a/rubocop-github.gemspec b/rubocop-github.gemspec index c6d1e41c..d2896876 100644 --- a/rubocop-github.gemspec +++ b/rubocop-github.gemspec @@ -10,9 +10,9 @@ Gem::Specification.new do |s| s.files = Dir["README.md", "STYLEGUIDE.md", "LICENSE", "config/*.yml", "lib/**/*.rb", "guides/*.md"] - s.add_dependency "rubocop", "~> 1.37" - s.add_dependency "rubocop-performance", "~> 1.15" - s.add_dependency "rubocop-rails", "~> 2.17" + s.add_dependency "rubocop", ">= 1.37" + s.add_dependency "rubocop-performance", ">= 1.15" + s.add_dependency "rubocop-rails", ">= 2.17" s.add_development_dependency "actionview" s.add_development_dependency "minitest" From 7c4a43c3f38e33350d6aa4700204ccb2235d1766 Mon Sep 17 00:00:00 2001 From: Ben Sheldon Date: Fri, 28 Oct 2022 12:09:42 -0700 Subject: [PATCH 020/180] Release v0.20.0 --- CHANGELOG.md | 4 ++++ Gemfile.lock | 2 +- rubocop-github.gemspec | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b4ce534..08647f45 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +## v0.20.0 + +- Updated minimum dependencies for "rubocop" (`>= 1.37`), "rubocop-performance" (`>= 1.15`), and "rubocop-rails", (`>= 2.17`). + ## v0.19.0 - Unset `DisabledByDefault: true` in `config/default.yml`. Prevents confusing behaviour where users of the gem didn't realise that RuboCop's default cops weren't being applied (including potentially custom cops in their projects). We've explicitly set `Enabled: false` for all the cops that were previously default disabled. This has the effect that consumers of this gem won't be surprised by new linting violations when they use this new version in their projects. (https://github.com/github/rubocop-github/pull/119) diff --git a/Gemfile.lock b/Gemfile.lock index ccf0bb2d..37967364 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - rubocop-github (0.19.0) + rubocop-github (0.20.0) rubocop (>= 1.37) rubocop-performance (>= 1.15) rubocop-rails (>= 2.17) diff --git a/rubocop-github.gemspec b/rubocop-github.gemspec index d2896876..00242746 100644 --- a/rubocop-github.gemspec +++ b/rubocop-github.gemspec @@ -2,7 +2,7 @@ Gem::Specification.new do |s| s.name = "rubocop-github" - s.version = "0.19.0" + s.version = "0.20.0" s.summary = "RuboCop GitHub" s.description = "Code style checking for GitHub Ruby repositories " s.homepage = "https://github.com/github/rubocop-github" From a1e1259eca46860fd0b0bfb8e6124aa9956dd577 Mon Sep 17 00:00:00 2001 From: Issy Long Date: Fri, 25 Nov 2022 11:23:48 +0000 Subject: [PATCH 021/180] config/default: Enable `Lint/ParenthesesAsGroupedExpression` - All offenses for non-ERB files were fixed in `github/github`, so it's not too much churn to enable this here. It's enabled by default in RuboCop itself, so here we can remove the `Enabled: false`, add a `StyleGuide` link, and exclude ERB files since the autocorrector hates them. --- config/default.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/config/default.yml b/config/default.yml index 0a3672c7..bfc83422 100644 --- a/config/default.yml +++ b/config/default.yml @@ -561,7 +561,9 @@ Lint/OutOfRangeRegexpRef: Enabled: false Lint/ParenthesesAsGroupedExpression: - Enabled: false + StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#no-spaces-method-parens + Exclude: + - "**/*.erb" Lint/PercentStringArray: Enabled: false From 0581a175c741ed44bc89dacb32ca5b1f97fa5ddb Mon Sep 17 00:00:00 2001 From: Ahmed Shahin Date: Mon, 5 Dec 2022 11:59:12 +0000 Subject: [PATCH 022/180] Fix usage documentation for Inheriting all of the stylistic rules and cops --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7ba558fa..678692b8 100644 --- a/README.md +++ b/README.md @@ -16,10 +16,10 @@ Inherit all of the stylistic rules and cops through an inheritance declaration i ```yaml # .rubocop.yml - inherit_from: + inherit_gem: rubocop-github: - - config/default.yml # generic Ruby rules and cops - - config/rails.yml # Rails-specific rules and cops + - config/default.yml # generic Ruby rules and cops + - config/rails.yml # Rails-specific rules and cops ``` Alternatively, only require the additional custom cops in your `.rubocop.yml` without inheriting/enabling the other stylistic rules: From 6dfaf7dd1a6c95d443fb7e212b983159669ebadf Mon Sep 17 00:00:00 2001 From: Sentinel Reviewer Date: Tue, 6 Dec 2022 10:47:26 -0600 Subject: [PATCH 023/180] Update Dependabot config file --- .github/dependabot.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index bdb77e0f..6828983e 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,7 +1,12 @@ +--- version: 2 updates: - - package-ecosystem: bundler - directory: '/' - versioning-strategy: increase - schedule: - interval: weekly +- package-ecosystem: bundler + directory: "/" + versioning-strategy: increase + schedule: + interval: weekly +- package-ecosystem: github-actions + directory: "/" + schedule: + interval: daily From e6044239711266056e1e9f1cf77709d1af49d950 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 13 Dec 2022 01:52:15 +0000 Subject: [PATCH 024/180] Bump actions/checkout from 2 to 3 Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2...v3) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c694d568..fc2db39e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,7 @@ jobs: ruby_version: ["2.7", "3.0", "3.1"] runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Ruby uses: ruby/setup-ruby@v1 with: From d7c9b70aa41a93235ae49107d6b549fd289beef7 Mon Sep 17 00:00:00 2001 From: Ben Sheldon Date: Fri, 24 Mar 2023 10:08:12 -0700 Subject: [PATCH 025/180] Add Ruby 3.2 to test matrix; add .ruby-version; ensure Rubocop::Config is passed to test helper --- .github/workflows/ci.yml | 9 +++++---- .ruby-version | 1 + Gemfile.lock | 6 +++--- test/cop_test.rb | 2 +- 4 files changed, 10 insertions(+), 8 deletions(-) create mode 100644 .ruby-version diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fc2db39e..47bba746 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,15 +7,16 @@ jobs: strategy: fail-fast: false matrix: - ruby_version: ["2.7", "3.0", "3.1"] + ruby_version: ["2.7", "3.0", "3.1", "3.2"] runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + - name: Update .ruby-version with matrix value + run: echo "${{ matrix.ruby_version }}" >| .ruby-version - name: Set up Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: ${{ matrix.ruby_version }} - - name: Install dependencies - run: bundle install --jobs 4 --retry 3 + bundler-cache: true + rubygems: latest - name: Run tests run: bundle exec rake diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 00000000..e4604e3a --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +3.2.1 diff --git a/Gemfile.lock b/Gemfile.lock index 37967364..320e76a2 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -32,9 +32,9 @@ GEM crass (~> 1.0.2) nokogiri (>= 1.5.9) minitest (5.16.3) - nokogiri (1.13.9-arm64-darwin) + nokogiri (1.14.2-arm64-darwin) racc (~> 1.4) - nokogiri (1.13.9-x86_64-darwin) + nokogiri (1.14.2-x86_64-darwin) racc (~> 1.4) parallel (1.22.1) parser (3.1.2.1) @@ -86,4 +86,4 @@ DEPENDENCIES rubocop-github! BUNDLED WITH - 2.3.24 + 2.4.9 diff --git a/test/cop_test.rb b/test/cop_test.rb index 4af051c1..0125a4ec 100644 --- a/test/cop_test.rb +++ b/test/cop_test.rb @@ -17,7 +17,7 @@ def setup def investigate(cop, src, filename = nil) processed_source = RuboCop::ProcessedSource.new(src, RUBY_VERSION.to_f, filename) - team = RuboCop::Cop::Team.new([cop], nil, raise_error: true) + team = RuboCop::Cop::Team.new([cop], cop.config, raise_error: true) report = team.investigate(processed_source) report.offenses end From 2ede82088bab54725090538a3df5f18d0a8e1cdd Mon Sep 17 00:00:00 2001 From: Ben Sheldon Date: Fri, 24 Mar 2023 10:10:03 -0700 Subject: [PATCH 026/180] Update ruby platforms --- Gemfile.lock | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Gemfile.lock b/Gemfile.lock index 320e76a2..07a10347 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -31,11 +31,17 @@ GEM loofah (2.19.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) + mini_portile2 (2.8.1) minitest (5.16.3) + nokogiri (1.14.2) + mini_portile2 (~> 2.8.0) + racc (~> 1.4) nokogiri (1.14.2-arm64-darwin) racc (~> 1.4) nokogiri (1.14.2-x86_64-darwin) racc (~> 1.4) + nokogiri (1.14.2-x86_64-linux) + racc (~> 1.4) parallel (1.22.1) parser (3.1.2.1) ast (~> 2.4.1) @@ -76,8 +82,10 @@ GEM PLATFORMS arm64-darwin-21 + ruby x86_64-darwin-19 x86_64-darwin-20 + x86_64-linux DEPENDENCIES actionview From d5cb180fe9bee74dfa6bfe8e9cd809220726cc95 Mon Sep 17 00:00:00 2001 From: Ben Sheldon Date: Fri, 24 Mar 2023 10:13:19 -0700 Subject: [PATCH 027/180] Run `bundle update` --- Gemfile.lock | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 07a10347..2bec5a35 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -9,30 +9,30 @@ PATH GEM remote: https://rubygems.org/ specs: - actionview (7.0.4) - activesupport (= 7.0.4) + actionview (7.0.4.3) + activesupport (= 7.0.4.3) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activesupport (7.0.4) + activesupport (7.0.4.3) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) tzinfo (~> 2.0) ast (2.4.2) builder (3.2.4) - concurrent-ruby (1.1.10) + concurrent-ruby (1.2.2) crass (1.0.6) - erubi (1.11.0) + erubi (1.12.0) i18n (1.12.0) concurrent-ruby (~> 1.0) - json (2.6.2) - loofah (2.19.0) + json (2.6.3) + loofah (2.19.1) crass (~> 1.0.2) nokogiri (>= 1.5.9) mini_portile2 (2.8.1) - minitest (5.16.3) + minitest (5.18.0) nokogiri (1.14.2) mini_portile2 (~> 2.8.0) racc (~> 1.4) @@ -43,42 +43,42 @@ GEM nokogiri (1.14.2-x86_64-linux) racc (~> 1.4) parallel (1.22.1) - parser (3.1.2.1) + parser (3.2.1.1) ast (~> 2.4.1) - racc (1.6.0) - rack (3.0.0) + racc (1.6.2) + rack (3.0.7) rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) - rails-html-sanitizer (1.4.3) - loofah (~> 2.3) + rails-html-sanitizer (1.5.0) + loofah (~> 2.19, >= 2.19.1) rainbow (3.1.1) rake (13.0.6) - regexp_parser (2.6.0) + regexp_parser (2.7.0) rexml (3.2.5) - rubocop (1.37.1) + rubocop (1.48.1) json (~> 2.3) parallel (~> 1.10) - parser (>= 3.1.2.1) + parser (>= 3.2.0.0) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.23.0, < 2.0) + rubocop-ast (>= 1.26.0, < 2.0) ruby-progressbar (~> 1.7) - unicode-display_width (>= 1.4.0, < 3.0) - rubocop-ast (1.23.0) - parser (>= 3.1.1.0) - rubocop-performance (1.15.0) + unicode-display_width (>= 2.4.0, < 3.0) + rubocop-ast (1.27.0) + parser (>= 3.2.1.0) + rubocop-performance (1.16.0) rubocop (>= 1.7.0, < 2.0) rubocop-ast (>= 0.4.0) - rubocop-rails (2.17.2) + rubocop-rails (2.18.0) activesupport (>= 4.2.0) rack (>= 1.1) rubocop (>= 1.33.0, < 2.0) - ruby-progressbar (1.11.0) - tzinfo (2.0.5) + ruby-progressbar (1.13.0) + tzinfo (2.0.6) concurrent-ruby (~> 1.0) - unicode-display_width (2.3.0) + unicode-display_width (2.4.2) PLATFORMS arm64-darwin-21 From 102c8ebce849abb0c993805072a9a36f978b48a9 Mon Sep 17 00:00:00 2001 From: Ben Sheldon Date: Fri, 24 Mar 2023 10:17:42 -0700 Subject: [PATCH 028/180] Update codeowners to `rubocop-reviewers` --- CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CODEOWNERS b/CODEOWNERS index fb48a77e..165ff874 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1 +1 @@ -* @github/ruby-architecture-reviewers +* @github/rubocop-reviewers From abaad7902a08e4f40b6fc70c6bc1ddc52b1fbb1d Mon Sep 17 00:00:00 2001 From: Sam Partington Date: Wed, 29 Mar 2023 11:57:29 +0100 Subject: [PATCH 029/180] Enable rules recently enabled in the GitHub monolith --- config/default.yml | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/config/default.yml b/config/default.yml index bfc83422..bed6307f 100644 --- a/config/default.yml +++ b/config/default.yml @@ -290,7 +290,10 @@ Layout/SpaceAroundMethodCallOperator: Enabled: false Layout/SpaceAroundOperators: - Enabled: false + Enabled: true + StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#spaces-operators + Exclude: + - "**/*.erb" Layout/SpaceBeforeBlockBraces: Enabled: true @@ -997,9 +1000,8 @@ Style/AccessorGrouping: Style/Alias: Enabled: false -# TODO: Enable this since it's in the styleguide. Style/AndOr: - Enabled: false + Enabled: true StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#no-and-or-or Style/ArgumentsForwarding: @@ -1057,7 +1059,8 @@ Style/ClassMethods: Enabled: true Style/ClassMethodsDefinitions: - Enabled: false + Enabled: true + StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#classes Style/ClassVars: Enabled: false @@ -1373,7 +1376,10 @@ Style/NestedParenthesizedCalls: Enabled: false Style/NestedTernaryOperator: - Enabled: false + Enabled: true + StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#one-expression-per-branch + Exclude: + - "**/*.erb" Style/Next: Enabled: false @@ -1424,7 +1430,10 @@ Style/OptionalBooleanParameter: Enabled: false Style/OrAssignment: - Enabled: false + Enabled: true + StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#memoize-away + Exclude: + - "**/*.erb" Style/ParallelAssignment: Enabled: false From 3aa9fa8adf920bbcf7c621e161575b78ae9fd29e Mon Sep 17 00:00:00 2001 From: John Hawthorn Date: Thu, 22 Jun 2023 14:50:52 -0700 Subject: [PATCH 030/180] Improve check for hash literals Previously this linter was possible to circumvent by using splats. --- lib/rubocop/cop/github/render_literal_helpers.rb | 3 ++- test/test_rails_controller_render_literal.rb | 11 +++++++++++ test/test_rails_view_render_literal.rb | 16 ++++++++++++++++ 3 files changed, 29 insertions(+), 1 deletion(-) diff --git a/lib/rubocop/cop/github/render_literal_helpers.rb b/lib/rubocop/cop/github/render_literal_helpers.rb index 67417a54..29820b0e 100644 --- a/lib/rubocop/cop/github/render_literal_helpers.rb +++ b/lib/rubocop/cop/github/render_literal_helpers.rb @@ -41,7 +41,8 @@ module RenderLiteralHelpers PATTERN def hash_with_literal_keys?(hash) - hash.pairs.all? { |pair| literal?(pair.key) } + hash.children.all? { |child| child.pair_type? } && + hash.pairs.all? { |pair| literal?(pair.key) } end def render_view_component?(node) diff --git a/test/test_rails_controller_render_literal.rb b/test/test_rails_controller_render_literal.rb index 9da2f16c..d8ebfba0 100644 --- a/test/test_rails_controller_render_literal.rb +++ b/test/test_rails_controller_render_literal.rb @@ -442,6 +442,17 @@ def index assert_equal 1, offenses.count end + def test_render_literal_splat_locals_offense + offenses = investigate cop, <<-RUBY, "app/controllers/products_controller.rb" + class ProductsController < ActionController::Base + def index + render "products/product", locals: { **locals } + end + end + RUBY + + assert_equal 1, offenses.count + end def test_render_literal_dynamic_local_key_offense offenses = investigate cop, <<-RUBY, "app/controllers/products_controller.rb" diff --git a/test/test_rails_view_render_literal.rb b/test/test_rails_view_render_literal.rb index b983d5f8..c2ba57e0 100644 --- a/test/test_rails_view_render_literal.rb +++ b/test/test_rails_view_render_literal.rb @@ -145,6 +145,14 @@ def test_render_literal_dynamic_local_key_offense assert_equal 1, offenses.count end + def test_render_literal_splat_locals_offense + offenses = erb_investigate cop, <<-ERB, "app/views/products/index.html.erb" + <%= render "products/product", { **locals } %> + ERB + + assert_equal 1, offenses.count + end + def test_render_options_static_locals_no_offense offenses = erb_investigate cop, <<-ERB, "app/views/products/index.html.erb" <%= render partial: "products/product", locals: { product: product } %> @@ -168,4 +176,12 @@ def test_render_options_dynamic_local_key_offense assert_equal 1, offenses.count end + + def test_render_options_local_splat_offense + offenses = erb_investigate cop, <<-ERB, "app/views/products/index.html.erb" + <%= render partial: "products/product", locals: { **locals } %> + ERB + + assert_equal 1, offenses.count + end end From c8675b40355ae0838e75e4a1c262208305d597ef Mon Sep 17 00:00:00 2001 From: JC Date: Tue, 7 Nov 2023 12:32:00 -0500 Subject: [PATCH 031/180] Update default.yml --- config/default.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/config/default.yml b/config/default.yml index bed6307f..cbaa990f 100644 --- a/config/default.yml +++ b/config/default.yml @@ -68,9 +68,8 @@ Layout/BlockAlignment: Layout/BlockEndNewline: Enabled: true -# TODO: Enable this since it's in the styleguide. Layout/CaseIndentation: - Enabled: false + Enabled: true StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#indent-when-as-start-of-case Layout/ClassStructure: From de39a86ee93763db0515064312be2e9310564a77 Mon Sep 17 00:00:00 2001 From: Daniel Colson Date: Tue, 12 Dec 2023 07:53:02 -0500 Subject: [PATCH 032/180] Bum dev dependencies bin/bundle update so we run the latest versions of things. --- Gemfile.lock | 80 +++++++++++++++++++++++++++++------------------- test/cop_test.rb | 2 +- 2 files changed, 49 insertions(+), 33 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 2bec5a35..411b6ac6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -9,53 +9,67 @@ PATH GEM remote: https://rubygems.org/ specs: - actionview (7.0.4.3) - activesupport (= 7.0.4.3) + actionview (7.1.2) + activesupport (= 7.1.2) builder (~> 3.1) - erubi (~> 1.4) - rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.1, >= 1.2.0) - activesupport (7.0.4.3) + erubi (~> 1.11) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + activesupport (7.1.2) + base64 + bigdecimal concurrent-ruby (~> 1.0, >= 1.0.2) + connection_pool (>= 2.2.5) + drb i18n (>= 1.6, < 2) minitest (>= 5.1) + mutex_m tzinfo (~> 2.0) ast (2.4.2) + base64 (0.2.0) + bigdecimal (3.1.4) builder (3.2.4) concurrent-ruby (1.2.2) + connection_pool (2.4.1) crass (1.0.6) + drb (2.2.0) + ruby2_keywords erubi (1.12.0) - i18n (1.12.0) + i18n (1.14.1) concurrent-ruby (~> 1.0) - json (2.6.3) - loofah (2.19.1) + json (2.7.1) + loofah (2.22.0) crass (~> 1.0.2) - nokogiri (>= 1.5.9) - mini_portile2 (2.8.1) - minitest (5.18.0) - nokogiri (1.14.2) - mini_portile2 (~> 2.8.0) + nokogiri (>= 1.12.0) + mini_portile2 (2.8.5) + minitest (5.20.0) + mutex_m (0.2.0) + nokogiri (1.15.5) + mini_portile2 (~> 2.8.2) racc (~> 1.4) - nokogiri (1.14.2-arm64-darwin) + nokogiri (1.15.5-arm64-darwin) racc (~> 1.4) - nokogiri (1.14.2-x86_64-darwin) + nokogiri (1.15.5-x86_64-darwin) racc (~> 1.4) - nokogiri (1.14.2-x86_64-linux) + nokogiri (1.15.5-x86_64-linux) racc (~> 1.4) - parallel (1.22.1) - parser (3.2.1.1) + parallel (1.23.0) + parser (3.2.2.4) ast (~> 2.4.1) - racc (1.6.2) - rack (3.0.7) - rails-dom-testing (2.0.3) - activesupport (>= 4.2.0) + racc + racc (1.7.3) + rack (3.0.8) + rails-dom-testing (2.2.0) + activesupport (>= 5.0.0) + minitest nokogiri (>= 1.6) - rails-html-sanitizer (1.5.0) - loofah (~> 2.19, >= 2.19.1) + rails-html-sanitizer (1.6.0) + loofah (~> 2.21) + nokogiri (~> 1.14) rainbow (3.1.1) - rake (13.0.6) - regexp_parser (2.7.0) - rexml (3.2.5) + rake (13.1.0) + regexp_parser (2.8.3) + rexml (3.2.6) rubocop (1.48.1) json (~> 2.3) parallel (~> 1.10) @@ -66,19 +80,21 @@ GEM rubocop-ast (>= 1.26.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.27.0) + rubocop-ast (1.30.0) parser (>= 3.2.1.0) - rubocop-performance (1.16.0) + rubocop-performance (1.19.1) rubocop (>= 1.7.0, < 2.0) rubocop-ast (>= 0.4.0) - rubocop-rails (2.18.0) + rubocop-rails (2.22.2) activesupport (>= 4.2.0) rack (>= 1.1) rubocop (>= 1.33.0, < 2.0) + rubocop-ast (>= 1.30.0, < 2.0) ruby-progressbar (1.13.0) + ruby2_keywords (0.0.5) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - unicode-display_width (2.4.2) + unicode-display_width (2.5.0) PLATFORMS arm64-darwin-21 diff --git a/test/cop_test.rb b/test/cop_test.rb index 0125a4ec..cb4047ab 100644 --- a/test/cop_test.rb +++ b/test/cop_test.rb @@ -3,7 +3,7 @@ require "action_view" require "minitest" -class CopTest < MiniTest::Test +class CopTest < Minitest::Test def cop_class raise NotImplementedError end From 3146ccfa642222ae8d6409a8bd771db5edb63aea Mon Sep 17 00:00:00 2001 From: "J.C. Manzo" Date: Wed, 3 Jan 2024 10:33:51 -0500 Subject: [PATCH 033/180] Update config/default.yml Co-authored-by: Issy Long --- config/default.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/config/default.yml b/config/default.yml index cbaa990f..0ea967a6 100644 --- a/config/default.yml +++ b/config/default.yml @@ -71,6 +71,7 @@ Layout/BlockEndNewline: Layout/CaseIndentation: Enabled: true StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#indent-when-as-start-of-case + EnforcedStyle: end Layout/ClassStructure: Enabled: false From 5ab0dadc00225a95bfe6c769fb63c355bb394555 Mon Sep 17 00:00:00 2001 From: Sarah Vessels Date: Wed, 3 Jan 2024 13:26:32 -0600 Subject: [PATCH 034/180] Add AvoidObjectSendWithDynamicMethod cop --- .../avoid_object_send_with_dynamic_method.rb | 76 ++++++++++++++++++ ...t_avoid_object_send_with_dynamic_method.rb | 80 +++++++++++++++++++ 2 files changed, 156 insertions(+) create mode 100644 lib/rubocop/cop/github/avoid_object_send_with_dynamic_method.rb create mode 100644 test/test_avoid_object_send_with_dynamic_method.rb diff --git a/lib/rubocop/cop/github/avoid_object_send_with_dynamic_method.rb b/lib/rubocop/cop/github/avoid_object_send_with_dynamic_method.rb new file mode 100644 index 00000000..ff38f0be --- /dev/null +++ b/lib/rubocop/cop/github/avoid_object_send_with_dynamic_method.rb @@ -0,0 +1,76 @@ +# frozen_string_literal: true + +require "rubocop" + +module RuboCop + module Cop + module GitHub + # Public: A Rubocop to discourage using methods like Object#send that allow you to dynamically call other + # methods on a Ruby object, when the method being called is itself completely dynamic. Instead, explicitly call + # methods by name. + # + # Examples: + # + # # bad + # foo.send(some_variable) + # + # # good + # case some_variable + # when "bar" + # foo.bar + # else + # foo.baz + # end + # + # # fine + # foo.send(:bar) + # foo.public_send("some_method") + # foo.__send__("some_#{variable}_method") + class AvoidObjectSendWithDynamicMethod < Base + MESSAGE_TEMPLATE = "Avoid using Object#%s with a dynamic method name." + SEND_METHODS = %i(send public_send __send__).freeze + CONSTANT_TYPES = %i(sym str const).freeze + + def on_send(node) + return unless send_method?(node) + return if method_being_sent_is_constrained?(node) + add_offense(source_range_for_method_call(node), message: MESSAGE_TEMPLATE % node.method_name) + end + + private + + def send_method?(node) + SEND_METHODS.include?(node.method_name) + end + + def method_being_sent_is_constrained?(node) + method_name_being_sent_is_constant?(node) || method_name_being_sent_is_dynamic_string_with_constants?(node) + end + + def method_name_being_sent_is_constant?(node) + method_being_sent = node.arguments.first + # e.g., `worker.send(:perform)` or `base.send("extend", Foo)` + CONSTANT_TYPES.include?(method_being_sent.type) + end + + def method_name_being_sent_is_dynamic_string_with_constants?(node) + method_being_sent = node.arguments.first + return false unless method_being_sent.type == :dstr + + # e.g., `foo.send("can_#{action}?")` + method_being_sent.child_nodes.any? { |child_node| CONSTANT_TYPES.include?(child_node.type) } + end + + def source_range_for_method_call(node) + begin_pos = if node.receiver # e.g., for `foo.send(:bar)`, `foo` is the receiver + node.receiver.source_range.end_pos + else # e.g., `send(:bar)` + node.source_range.begin_pos + end + end_pos = node.loc.selector.end_pos + Parser::Source::Range.new(processed_source.buffer, begin_pos, end_pos) + end + end + end + end +end diff --git a/test/test_avoid_object_send_with_dynamic_method.rb b/test/test_avoid_object_send_with_dynamic_method.rb new file mode 100644 index 00000000..68d529fb --- /dev/null +++ b/test/test_avoid_object_send_with_dynamic_method.rb @@ -0,0 +1,80 @@ +# frozen_string_literal: true + +require_relative "./cop_test" +require "minitest/autorun" +require "rubocop/cop/github/avoid_object_send_with_dynamic_method" + +class TestAvoidObjectSendWithDynamicMethod < CopTest + def cop_class + RuboCop::Cop::GitHub::AvoidObjectSendWithDynamicMethod + end + + def test_offended_by_send_call + offenses = investigate cop, <<-RUBY + def my_method(foo) + foo.send(@some_ivar) + end + RUBY + assert_equal 1, offenses.size + assert_equal "Avoid using Object#send with a dynamic method name.", offenses.first.message + end + + def test_offended_by_public_send_call + offenses = investigate cop, <<-RUBY + foo.public_send(bar) + RUBY + assert_equal 1, offenses.size + assert_equal "Avoid using Object#public_send with a dynamic method name.", offenses.first.message + end + + def test_offended_by_call_to___send__ + offenses = investigate cop, <<-RUBY + foo.__send__(bar) + RUBY + assert_equal 1, offenses.size + assert_equal "Avoid using Object#__send__ with a dynamic method name.", offenses.first.message + end + + def test_offended_by_send_calls_without_receiver + offenses = investigate cop, <<-RUBY + send(some_method) + public_send(@some_ivar) + __send__(a_variable, "foo", "bar") + RUBY + assert_equal 3, offenses.size + assert_equal "Avoid using Object#send with a dynamic method name.", offenses[0].message + assert_equal "Avoid using Object#public_send with a dynamic method name.", offenses[1].message + assert_equal "Avoid using Object#__send__ with a dynamic method name.", offenses[2].message + end + + def test_unoffended_by_other_method_calls + offenses = investigate cop, <<-RUBY + foo.bar(arg1, arg2) + case @some_ivar + when :foo + baz.foo + when :bar + baz.bar + end + puts "public_send" if send? + RUBY + assert_equal 0, offenses.size + end + + def test_unoffended_by_send_calls_to_dynamic_methods_that_include_hardcoded_strings + offenses = investigate cop, <<-'RUBY' + foo.send("can_#{action}?") + foo.public_send("make_#{SOME_CONSTANT}") + RUBY + assert_equal 0, offenses.size + end + + def test_unoffended_by_send_calls_without_dynamic_methods + offenses = investigate cop, <<-RUBY + base.send :extend, ClassMethods + foo.public_send(:bar) + foo.__send__("bar", arg1, arg2) + RUBY + assert_equal 0, offenses.size + end +end From 5963503a553b361f2bc1b8f2d28b0c6aa86b67da Mon Sep 17 00:00:00 2001 From: Sarah Vessels Date: Wed, 3 Jan 2024 13:31:05 -0600 Subject: [PATCH 035/180] Add AvoidObjectSendWithDynamicMethod to config --- config/default.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/default.yml b/config/default.yml index 0ea967a6..5a319885 100644 --- a/config/default.yml +++ b/config/default.yml @@ -44,6 +44,9 @@ Gemspec/RequiredRubyVersion: Gemspec/RubyVersionGlobalsUsage: Enabled: false +GitHub/AvoidObjectSendWithDynamicMethod: + Enabled: true + GitHub/InsecureHashAlgorithm: Enabled: true From 03e916f484827b08507b884b6ddd26d80b10433d Mon Sep 17 00:00:00 2001 From: Sarah Vessels Date: Wed, 3 Jan 2024 13:31:35 -0600 Subject: [PATCH 036/180] Bump gem version to 0.21.0 --- Gemfile.lock | 2 +- rubocop-github.gemspec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 411b6ac6..0d748cfe 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - rubocop-github (0.20.0) + rubocop-github (0.21.0) rubocop (>= 1.37) rubocop-performance (>= 1.15) rubocop-rails (>= 2.17) diff --git a/rubocop-github.gemspec b/rubocop-github.gemspec index 00242746..ed3a5816 100644 --- a/rubocop-github.gemspec +++ b/rubocop-github.gemspec @@ -2,7 +2,7 @@ Gem::Specification.new do |s| s.name = "rubocop-github" - s.version = "0.20.0" + s.version = "0.21.0" s.summary = "RuboCop GitHub" s.description = "Code style checking for GitHub Ruby repositories " s.homepage = "https://github.com/github/rubocop-github" From 69897dec2e172e97eb072fb5d9e5141f7f15fb50 Mon Sep 17 00:00:00 2001 From: Sarah Vessels Date: Wed, 3 Jan 2024 13:31:45 -0600 Subject: [PATCH 037/180] Update changelog for v0.21.0 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 08647f45..9fa7ddc6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +## v0.21.0 + +- Added new GitHub/AvoidObjectSendWithDynamicMethod cop to discourage use of methods like Object#send + ## v0.20.0 - Updated minimum dependencies for "rubocop" (`>= 1.37`), "rubocop-performance" (`>= 1.15`), and "rubocop-rails", (`>= 2.17`). From 52976d26700d0da4122162485c4f91da3d2a2fb2 Mon Sep 17 00:00:00 2001 From: Sarah Vessels Date: Wed, 3 Jan 2024 13:34:35 -0600 Subject: [PATCH 038/180] Require the new cop in rubocop-github --- lib/rubocop-github.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/rubocop-github.rb b/lib/rubocop-github.rb index 17c07e77..65bc8dc8 100644 --- a/lib/rubocop-github.rb +++ b/lib/rubocop-github.rb @@ -6,4 +6,5 @@ RuboCop::GitHub::Inject.default_defaults! +require "rubocop/cop/github/avoid_object_send_with_dynamic_method" require "rubocop/cop/github/insecure_hash_algorithm" From bdbf52fc261e9fafe6ee94161b4d970b20ca7c74 Mon Sep 17 00:00:00 2001 From: Sarah Vessels Date: Wed, 3 Jan 2024 13:38:40 -0600 Subject: [PATCH 039/180] Fix indentation for linter --- .../github/avoid_object_send_with_dynamic_method.rb | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/rubocop/cop/github/avoid_object_send_with_dynamic_method.rb b/lib/rubocop/cop/github/avoid_object_send_with_dynamic_method.rb index ff38f0be..e5e7677d 100644 --- a/lib/rubocop/cop/github/avoid_object_send_with_dynamic_method.rb +++ b/lib/rubocop/cop/github/avoid_object_send_with_dynamic_method.rb @@ -62,11 +62,12 @@ def method_name_being_sent_is_dynamic_string_with_constants?(node) end def source_range_for_method_call(node) - begin_pos = if node.receiver # e.g., for `foo.send(:bar)`, `foo` is the receiver - node.receiver.source_range.end_pos - else # e.g., `send(:bar)` - node.source_range.begin_pos - end + begin_pos = + if node.receiver # e.g., for `foo.send(:bar)`, `foo` is the receiver + node.receiver.source_range.end_pos + else # e.g., `send(:bar)` + node.source_range.begin_pos + end end_pos = node.loc.selector.end_pos Parser::Source::Range.new(processed_source.buffer, begin_pos, end_pos) end From 742bd8fdd7f7dec7ac647a0178c9a9ad1382316e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 5 Jan 2024 20:10:09 +0000 Subject: [PATCH 040/180] Bump actions/checkout from 3 to 4 Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 47bba746..4ef5fab8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,7 @@ jobs: ruby_version: ["2.7", "3.0", "3.1", "3.2"] runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Update .ruby-version with matrix value run: echo "${{ matrix.ruby_version }}" >| .ruby-version - name: Set up Ruby From 801e056dd9d3d3e308ea3b8369a9adde58335999 Mon Sep 17 00:00:00 2001 From: Ben Sheldon Date: Tue, 6 Feb 2024 08:24:57 -0800 Subject: [PATCH 041/180] Remove Ruby 2.7 from test matrix; update Nokogiri v1.16.2 --- .github/workflows/ci.yml | 2 +- Gemfile.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4ef5fab8..833def29 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,7 +7,7 @@ jobs: strategy: fail-fast: false matrix: - ruby_version: ["2.7", "3.0", "3.1", "3.2"] + ruby_version: ["3.0", "3.1", "3.2"] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/Gemfile.lock b/Gemfile.lock index 0d748cfe..0ebb2696 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -44,14 +44,14 @@ GEM mini_portile2 (2.8.5) minitest (5.20.0) mutex_m (0.2.0) - nokogiri (1.15.5) + nokogiri (1.16.2) mini_portile2 (~> 2.8.2) racc (~> 1.4) - nokogiri (1.15.5-arm64-darwin) + nokogiri (1.16.2-arm64-darwin) racc (~> 1.4) - nokogiri (1.15.5-x86_64-darwin) + nokogiri (1.16.2-x86_64-darwin) racc (~> 1.4) - nokogiri (1.15.5-x86_64-linux) + nokogiri (1.16.2-x86_64-linux) racc (~> 1.4) parallel (1.23.0) parser (3.2.2.4) From b1a082fe8fae369f4578920b8d7e15eaac0674ab Mon Sep 17 00:00:00 2001 From: "Ben Sheldon [he/him]" Date: Tue, 6 Feb 2024 09:28:44 -0800 Subject: [PATCH 042/180] Add Ruby 3.3 to test matrix --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 833def29..ef4708e2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,7 +7,7 @@ jobs: strategy: fail-fast: false matrix: - ruby_version: ["3.0", "3.1", "3.2"] + ruby_version: ["3.0", "3.1", "3.2", "3.3"] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 From fc477fe8ed6c28a17dcbde8f054263aabca34221 Mon Sep 17 00:00:00 2001 From: Issy Long Date: Mon, 12 Feb 2024 10:41:51 +0000 Subject: [PATCH 043/180] ci: Only run on PRs - Let's stop wasting the planet's precious resources by running CI on push _and_ PR. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ef4708e2..a8f4d2c8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,6 @@ name: CI -on: [push, pull_request] +on: pull_request jobs: test: From 6d1e61cef211826d99641ac1116b2cf0cad92812 Mon Sep 17 00:00:00 2001 From: Abraham Williams Date: Mon, 12 Feb 2024 14:09:45 -0600 Subject: [PATCH 044/180] Set required_ruby_version to 3 --- rubocop-github.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rubocop-github.gemspec b/rubocop-github.gemspec index ed3a5816..66d16540 100644 --- a/rubocop-github.gemspec +++ b/rubocop-github.gemspec @@ -18,7 +18,7 @@ Gem::Specification.new do |s| s.add_development_dependency "minitest" s.add_development_dependency "rake" - s.required_ruby_version = ">= 2.5.0" + s.required_ruby_version = ">= 3.0.0" s.email = "engineering@github.com" s.authors = "GitHub" From 545be6b95b196f5a19719b9c13eb43bba17785b1 Mon Sep 17 00:00:00 2001 From: Abraham Williams Date: Mon, 12 Feb 2024 14:22:28 -0600 Subject: [PATCH 045/180] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9fa7ddc6..dd9319e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +- Update Gemspec `required_ruby_version to `>= 3.0.0` + ## v0.21.0 - Added new GitHub/AvoidObjectSendWithDynamicMethod cop to discourage use of methods like Object#send From 577c6599a18a9953b7a91d4e7964a272890843a1 Mon Sep 17 00:00:00 2001 From: Abraham Williams Date: Mon, 12 Feb 2024 14:22:43 -0600 Subject: [PATCH 046/180] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dd9319e0..b3297896 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ## Unreleased -- Update Gemspec `required_ruby_version to `>= 3.0.0` +- Update Gemspec `required_ruby_version` to `>= 3.0.0` ## v0.21.0 From eca6bc969e5ee1f478345364efd97e9547cdbaed Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 28 Feb 2024 23:01:56 +0000 Subject: [PATCH 047/180] Bump rack from 3.0.8 to 3.0.9.1 Bumps [rack](https://github.com/rack/rack) from 3.0.8 to 3.0.9.1. - [Release notes](https://github.com/rack/rack/releases) - [Changelog](https://github.com/rack/rack/blob/main/CHANGELOG.md) - [Commits](https://github.com/rack/rack/compare/v3.0.8...v3.0.9.1) --- updated-dependencies: - dependency-name: rack dependency-type: indirect ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 0ebb2696..e060d692 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -58,7 +58,7 @@ GEM ast (~> 2.4.1) racc racc (1.7.3) - rack (3.0.8) + rack (3.0.9.1) rails-dom-testing (2.2.0) activesupport (>= 5.0.0) minitest From d9aa7fae2ee66854d8e55a647c5313d46e192385 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Mar 2024 19:16:20 +0000 Subject: [PATCH 048/180] Bump minitest from 5.20.0 to 5.22.2 Bumps [minitest](https://github.com/minitest/minitest) from 5.20.0 to 5.22.2. - [Changelog](https://github.com/minitest/minitest/blob/master/History.rdoc) - [Commits](https://github.com/minitest/minitest/compare/v5.20.0...v5.22.2) --- updated-dependencies: - dependency-name: minitest dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index e060d692..7c6f8991 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -42,7 +42,7 @@ GEM crass (~> 1.0.2) nokogiri (>= 1.12.0) mini_portile2 (2.8.5) - minitest (5.20.0) + minitest (5.22.2) mutex_m (0.2.0) nokogiri (1.16.2) mini_portile2 (~> 2.8.2) From 693dfb4fe862ac707f060985717822ce9e5f81de Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Mar 2024 19:50:12 +0000 Subject: [PATCH 049/180] Bump actionview from 7.1.2 to 7.1.3.2 Bumps [actionview](https://github.com/rails/rails) from 7.1.2 to 7.1.3.2. - [Release notes](https://github.com/rails/rails/releases) - [Changelog](https://github.com/rails/rails/blob/v7.1.3.2/actionview/CHANGELOG.md) - [Commits](https://github.com/rails/rails/compare/v7.1.2...v7.1.3.2) --- updated-dependencies: - dependency-name: actionview dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 7c6f8991..07e6bbc7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -9,13 +9,13 @@ PATH GEM remote: https://rubygems.org/ specs: - actionview (7.1.2) - activesupport (= 7.1.2) + actionview (7.1.3.2) + activesupport (= 7.1.3.2) builder (~> 3.1) erubi (~> 1.11) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - activesupport (7.1.2) + activesupport (7.1.3.2) base64 bigdecimal concurrent-ruby (~> 1.0, >= 1.0.2) @@ -27,13 +27,12 @@ GEM tzinfo (~> 2.0) ast (2.4.2) base64 (0.2.0) - bigdecimal (3.1.4) + bigdecimal (3.1.6) builder (3.2.4) - concurrent-ruby (1.2.2) + concurrent-ruby (1.2.3) connection_pool (2.4.1) crass (1.0.6) - drb (2.2.0) - ruby2_keywords + drb (2.2.1) erubi (1.12.0) i18n (1.14.1) concurrent-ruby (~> 1.0) @@ -91,7 +90,6 @@ GEM rubocop (>= 1.33.0, < 2.0) rubocop-ast (>= 1.30.0, < 2.0) ruby-progressbar (1.13.0) - ruby2_keywords (0.0.5) tzinfo (2.0.6) concurrent-ruby (~> 1.0) unicode-display_width (2.5.0) From 36720cc19ee4d876e7b13679d9e9f3e68389db18 Mon Sep 17 00:00:00 2001 From: "Ben Sheldon [he/him]" Date: Mon, 4 Mar 2024 11:52:50 -0800 Subject: [PATCH 050/180] Add grouped Dependabot updates for Bundler --- .github/dependabot.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 6828983e..8afc1973 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -6,7 +6,20 @@ updates: versioning-strategy: increase schedule: interval: weekly + open-pull-requests-limit: 10 + allow: + - dependency-type: "all" + groups: + bundler-rubocop: + patterns: + - "rubocop*" + bundler-all: + update-types: + - minor + - patch + exclude-patterns: + - "rubocop*" - package-ecosystem: github-actions directory: "/" schedule: - interval: daily + interval: weekly From 3e56b7264df0c23e19bcfe8c26183a6a9e26a6ea Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Mar 2024 19:35:39 +0000 Subject: [PATCH 051/180] Bump rubocop from 1.48.1 to 1.62.1 Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.48.1 to 1.62.1. - [Release notes](https://github.com/rubocop/rubocop/releases) - [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop/compare/v1.48.1...v1.62.1) --- updated-dependencies: - dependency-name: rubocop dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 07e6bbc7..2aa9b0ed 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -37,6 +37,7 @@ GEM i18n (1.14.1) concurrent-ruby (~> 1.0) json (2.7.1) + language_server-protocol (3.17.0.3) loofah (2.22.0) crass (~> 1.0.2) nokogiri (>= 1.12.0) @@ -52,8 +53,8 @@ GEM racc (~> 1.4) nokogiri (1.16.2-x86_64-linux) racc (~> 1.4) - parallel (1.23.0) - parser (3.2.2.4) + parallel (1.24.0) + parser (3.3.0.5) ast (~> 2.4.1) racc racc (1.7.3) @@ -67,20 +68,21 @@ GEM nokogiri (~> 1.14) rainbow (3.1.1) rake (13.1.0) - regexp_parser (2.8.3) + regexp_parser (2.9.0) rexml (3.2.6) - rubocop (1.48.1) + rubocop (1.62.1) json (~> 2.3) + language_server-protocol (>= 3.17.0) parallel (~> 1.10) - parser (>= 3.2.0.0) + parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.26.0, < 2.0) + rubocop-ast (>= 1.31.1, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.30.0) - parser (>= 3.2.1.0) + rubocop-ast (1.31.2) + parser (>= 3.3.0.4) rubocop-performance (1.19.1) rubocop (>= 1.7.0, < 2.0) rubocop-ast (>= 0.4.0) From 073037552347d47fd46911d92d82d2b5e630c1d9 Mon Sep 17 00:00:00 2001 From: Mike Griffin Date: Tue, 19 Mar 2024 14:15:09 +0000 Subject: [PATCH 052/180] Add a few styleguide links --- config/default.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/default.yml b/config/default.yml index 5a319885..ee641dfd 100644 --- a/config/default.yml +++ b/config/default.yml @@ -219,6 +219,7 @@ Layout/LineEndStringConcatenationIndentation: Layout/LineLength: Enabled: false + StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#line-length Layout/MultilineArrayBraceLayout: Enabled: false @@ -1042,6 +1043,7 @@ Style/BlockDelimiters: Style/CaseEquality: Enabled: true + StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#type-checking-is-a-kind-of Style/CaseLikeIf: Enabled: false @@ -1067,6 +1069,7 @@ Style/ClassMethodsDefinitions: Style/ClassVars: Enabled: false + StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#class-variables Style/CollectionCompact: Enabled: false From d8ffff195854626e143be1bdc4a5edd064cf6e93 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 28 Mar 2024 21:54:57 +0000 Subject: [PATCH 053/180] Bump minitest from 5.22.2 to 5.22.3 Bumps [minitest](https://github.com/minitest/minitest) from 5.22.2 to 5.22.3. - [Changelog](https://github.com/minitest/minitest/blob/master/History.rdoc) - [Commits](https://github.com/minitest/minitest/compare/v5.22.2...v5.22.3) --- updated-dependencies: - dependency-name: minitest dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 07e6bbc7..39fb0b50 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -41,7 +41,7 @@ GEM crass (~> 1.0.2) nokogiri (>= 1.12.0) mini_portile2 (2.8.5) - minitest (5.22.2) + minitest (5.22.3) mutex_m (0.2.0) nokogiri (1.16.2) mini_portile2 (~> 2.8.2) From cc0116116a4f8794693f0c08ee1efccdab5dee1e Mon Sep 17 00:00:00 2001 From: Abraham Williams Date: Fri, 29 Mar 2024 19:12:46 +0000 Subject: [PATCH 054/180] Add cop name to test matches --- ...t_avoid_object_send_with_dynamic_method.rb | 12 +++---- test/test_insecure_hash_algorithm.rb | 36 +++++++++---------- ...t_rails_controller_render_action_symbol.rb | 2 +- test/test_rails_controller_render_literal.rb | 20 +++++------ .../test_rails_controller_render_shorthand.rb | 12 +++---- test/test_rails_render_object_collection.rb | 6 ++-- test/test_rails_view_render_literal.rb | 4 +-- test/test_rails_view_render_shorthand.rb | 4 +-- 8 files changed, 48 insertions(+), 48 deletions(-) diff --git a/test/test_avoid_object_send_with_dynamic_method.rb b/test/test_avoid_object_send_with_dynamic_method.rb index 68d529fb..bdca640d 100644 --- a/test/test_avoid_object_send_with_dynamic_method.rb +++ b/test/test_avoid_object_send_with_dynamic_method.rb @@ -16,7 +16,7 @@ def my_method(foo) end RUBY assert_equal 1, offenses.size - assert_equal "Avoid using Object#send with a dynamic method name.", offenses.first.message + assert_equal "#{cop.name}: Avoid using Object#send with a dynamic method name.", offenses.first.message end def test_offended_by_public_send_call @@ -24,7 +24,7 @@ def test_offended_by_public_send_call foo.public_send(bar) RUBY assert_equal 1, offenses.size - assert_equal "Avoid using Object#public_send with a dynamic method name.", offenses.first.message + assert_equal "#{cop.name}: Avoid using Object#public_send with a dynamic method name.", offenses.first.message end def test_offended_by_call_to___send__ @@ -32,7 +32,7 @@ def test_offended_by_call_to___send__ foo.__send__(bar) RUBY assert_equal 1, offenses.size - assert_equal "Avoid using Object#__send__ with a dynamic method name.", offenses.first.message + assert_equal "#{cop.name}: Avoid using Object#__send__ with a dynamic method name.", offenses.first.message end def test_offended_by_send_calls_without_receiver @@ -42,9 +42,9 @@ def test_offended_by_send_calls_without_receiver __send__(a_variable, "foo", "bar") RUBY assert_equal 3, offenses.size - assert_equal "Avoid using Object#send with a dynamic method name.", offenses[0].message - assert_equal "Avoid using Object#public_send with a dynamic method name.", offenses[1].message - assert_equal "Avoid using Object#__send__ with a dynamic method name.", offenses[2].message + assert_equal "#{cop.name}: Avoid using Object#send with a dynamic method name.", offenses[0].message + assert_equal "#{cop.name}: Avoid using Object#public_send with a dynamic method name.", offenses[1].message + assert_equal "#{cop.name}: Avoid using Object#__send__ with a dynamic method name.", offenses[2].message end def test_unoffended_by_other_method_calls diff --git a/test/test_insecure_hash_algorithm.rb b/test/test_insecure_hash_algorithm.rb index 597450b8..71df7e3a 100644 --- a/test/test_insecure_hash_algorithm.rb +++ b/test/test_insecure_hash_algorithm.rb @@ -57,7 +57,7 @@ def secret_hmac RUBY assert_equal 1, offenses.count - assert_equal cop_class::MSG, offenses.first.message + assert_equal "#{cop.name}: #{cop_class::MSG}", offenses.first.message end def test_digest_method_md5_str @@ -70,7 +70,7 @@ def h RUBY assert_equal 1, offenses.count - assert_equal cop_class::MSG, offenses.first.message + assert_equal "#{cop.name}: #{cop_class::MSG}", offenses.first.message end def test_digest_method_md5_symbol @@ -83,7 +83,7 @@ def h RUBY assert_equal 1, offenses.count - assert_equal cop_class::MSG, offenses.first.message + assert_equal "#{cop.name}: #{cop_class::MSG}", offenses.first.message end def test_digest_method_sha256_str @@ -122,7 +122,7 @@ class Something RUBY assert_equal 1, offenses.count - assert_equal cop_class::MSG, offenses.first.message + assert_equal "#{cop.name}: #{cop_class::MSG}", offenses.first.message end def test_alias_for_openssl_digest_md5 @@ -133,7 +133,7 @@ class Something RUBY assert_equal 1, offenses.count - assert_equal cop_class::MSG, offenses.first.message + assert_equal "#{cop.name}: #{cop_class::MSG}", offenses.first.message end def test_alias_for_digest_sha1 @@ -144,7 +144,7 @@ class Something RUBY assert_equal 1, offenses.count - assert_equal cop_class::MSG, offenses.first.message + assert_equal "#{cop.name}: #{cop_class::MSG}", offenses.first.message end def test_alias_for_openssl_digest_sha1 @@ -155,7 +155,7 @@ class Something RUBY assert_equal 1, offenses.count - assert_equal cop_class::MSG, offenses.first.message + assert_equal "#{cop.name}: #{cop_class::MSG}", offenses.first.message end def test_alias_for_digest_sha256 @@ -200,7 +200,7 @@ def something(str) RUBY assert_equal 1, offenses.count - assert_equal cop_class::MSG, offenses.first.message + assert_equal "#{cop.name}: #{cop_class::MSG}", offenses.first.message end def test_openssl_md5_hexdigest @@ -213,7 +213,7 @@ def something(str) RUBY assert_equal 1, offenses.count - assert_equal cop_class::MSG, offenses.first.message + assert_equal "#{cop.name}: #{cop_class::MSG}", offenses.first.message end def test_openssl_md5_digest_by_name @@ -226,7 +226,7 @@ def something(str) RUBY assert_equal 1, offenses.count - assert_equal cop_class::MSG, offenses.first.message + assert_equal "#{cop.name}: #{cop_class::MSG}", offenses.first.message end def test_openssl_sha1_digest_by_name @@ -239,7 +239,7 @@ def something(str) RUBY assert_equal 1, offenses.count - assert_equal cop_class::MSG, offenses.first.message + assert_equal "#{cop.name}: #{cop_class::MSG}", offenses.first.message end def test_openssl_sha1_hexdigest_by_name_mixed_case @@ -252,7 +252,7 @@ def something(str) RUBY assert_equal 1, offenses.count - assert_equal cop_class::MSG, offenses.first.message + assert_equal "#{cop.name}: #{cop_class::MSG}", offenses.first.message end def test_openssl_sha256_digest_by_name @@ -277,7 +277,7 @@ def something(str) RUBY assert_equal 1, offenses.count - assert_equal cop_class::MSG, offenses.first.message + assert_equal "#{cop.name}: #{cop_class::MSG}", offenses.first.message end def test_openssl_sha1_hmac_by_name @@ -290,7 +290,7 @@ def something(str) RUBY assert_equal 1, offenses.count - assert_equal cop_class::MSG, offenses.first.message + assert_equal "#{cop.name}: #{cop_class::MSG}", offenses.first.message end def test_openssl_sha256_hmac_by_name @@ -315,7 +315,7 @@ def something(str) RUBY assert_equal 1, offenses.count - assert_equal cop_class::MSG, offenses.first.message + assert_equal "#{cop.name}: #{cop_class::MSG}", offenses.first.message end def test_openssl_sha1_digest_instance_by_name @@ -328,7 +328,7 @@ def something(str) RUBY assert_equal 1, offenses.count - assert_equal cop_class::MSG, offenses.first.message + assert_equal "#{cop.name}: #{cop_class::MSG}", offenses.first.message end def test_openssl_sha256_digest_instance_by_name @@ -367,7 +367,7 @@ def uuid RUBY assert_equal 1, offenses.count - assert_equal cop_class::UUID_V3_MSG, offenses.first.message + assert_equal "#{cop.name}: #{cop_class::UUID_V3_MSG}", offenses.first.message end def test_uuid_v3_with_md5_allowed @@ -405,7 +405,7 @@ def uuid RUBY assert_equal 1, offenses.count - assert_equal cop_class::UUID_V5_MSG, offenses.first.message + assert_equal "#{cop.name}: #{cop_class::UUID_V5_MSG}", offenses.first.message end def test_uuid_v5_with_sha1_allowed diff --git a/test/test_rails_controller_render_action_symbol.rb b/test/test_rails_controller_render_action_symbol.rb index 5731d82e..8376ab67 100644 --- a/test/test_rails_controller_render_action_symbol.rb +++ b/test/test_rails_controller_render_action_symbol.rb @@ -47,7 +47,7 @@ def update RUBY assert_equal 3, offenses.count - expected_message = "Prefer `render` with string instead of symbol" + expected_message = "#{cop.name}: Prefer `render` with string instead of symbol" assert_equal expected_message, offenses[0].message assert_equal expected_message, offenses[1].message assert_equal expected_message, offenses[2].message diff --git a/test/test_rails_controller_render_literal.rb b/test/test_rails_controller_render_literal.rb index d8ebfba0..712b81d7 100644 --- a/test/test_rails_controller_render_literal.rb +++ b/test/test_rails_controller_render_literal.rb @@ -274,7 +274,7 @@ def index RUBY assert_equal 1, offenses.count - assert_equal "render must be used with a string literal or an instance of a Class", offenses[0].message + assert_equal "#{cop.name}: render must be used with a string literal or an instance of a Class", offenses[0].message end def test_render_implicit_with_layout_offense @@ -287,7 +287,7 @@ def index RUBY assert_equal 1, offenses.count - assert_equal "render must be used with a string literal or an instance of a Class", offenses[0].message + assert_equal "#{cop.name}: render must be used with a string literal or an instance of a Class", offenses[0].message end def test_render_implicit_with_status_offense @@ -300,7 +300,7 @@ def index RUBY assert_equal 1, offenses.count - assert_equal "render must be used with a string literal or an instance of a Class", offenses[0].message + assert_equal "#{cop.name}: render must be used with a string literal or an instance of a Class", offenses[0].message end def test_render_variable_offense @@ -313,7 +313,7 @@ def index RUBY assert_equal 1, offenses.count - assert_equal "render must be used with a string literal or an instance of a Class", offenses[0].message + assert_equal "#{cop.name}: render must be used with a string literal or an instance of a Class", offenses[0].message end def test_render_to_string_variable_offense @@ -326,7 +326,7 @@ def index RUBY assert_equal 1, offenses.count - assert_equal "render must be used with a string literal or an instance of a Class", offenses[0].message + assert_equal "#{cop.name}: render must be used with a string literal or an instance of a Class", offenses[0].message end def test_render_action_variable_offense @@ -339,7 +339,7 @@ def index RUBY assert_equal 1, offenses.count - assert_equal "render must be used with a string literal or an instance of a Class", offenses[0].message + assert_equal "#{cop.name}: render must be used with a string literal or an instance of a Class", offenses[0].message end def test_render_template_variable_offense @@ -352,7 +352,7 @@ def index RUBY assert_equal 1, offenses.count - assert_equal "render must be used with a string literal or an instance of a Class", offenses[0].message + assert_equal "#{cop.name}: render must be used with a string literal or an instance of a Class", offenses[0].message end def test_render_partial_variable_offense @@ -365,7 +365,7 @@ def index RUBY assert_equal 1, offenses.count - assert_equal "render must be used with a string literal or an instance of a Class", offenses[0].message + assert_equal "#{cop.name}: render must be used with a string literal or an instance of a Class", offenses[0].message end def test_render_template_with_layout_variable_offense @@ -378,7 +378,7 @@ def index RUBY assert_equal 1, offenses.count - assert_equal "render must be used with a string literal or an instance of a Class", offenses[0].message + assert_equal "#{cop.name}: render must be used with a string literal or an instance of a Class", offenses[0].message end def test_render_template_variable_with_layout_offense @@ -391,7 +391,7 @@ def index RUBY assert_equal 1, offenses.count - assert_equal "render must be used with a string literal or an instance of a Class", offenses[0].message + assert_equal "#{cop.name}: render must be used with a string literal or an instance of a Class", offenses[0].message end def test_render_shorthand_static_locals_no_offsense diff --git a/test/test_rails_controller_render_shorthand.rb b/test/test_rails_controller_render_shorthand.rb index 0c16bd56..4998c025 100644 --- a/test/test_rails_controller_render_shorthand.rb +++ b/test/test_rails_controller_render_shorthand.rb @@ -55,9 +55,9 @@ def confirm RUBY assert_equal 3, offenses.count - assert_equal "Use `render \"edit\"` instead", offenses[0].message - assert_equal "Use `render \"new\"` instead", offenses[1].message - assert_equal "Use `render \"confirm.html.erb\"` instead", offenses[2].message + assert_equal "#{cop.name}: Use `render \"edit\"` instead", offenses[0].message + assert_equal "#{cop.name}: Use `render \"new\"` instead", offenses[1].message + assert_equal "#{cop.name}: Use `render \"confirm.html.erb\"` instead", offenses[2].message end def test_render_template_offense @@ -78,8 +78,8 @@ def edit RUBY assert_equal 3, offenses.count - assert_equal "Use `render \"books/new\"` instead", offenses[0].message - assert_equal "Use `render \"books/show\", locals: { book: @book }` instead", offenses[1].message - assert_equal "Use `render \"books/edit.html.erb\", status: :ok, layout: \"application\"` instead", offenses[2].message + assert_equal "#{cop.name}: Use `render \"books/new\"` instead", offenses[0].message + assert_equal "#{cop.name}: Use `render \"books/show\", locals: { book: @book }` instead", offenses[1].message + assert_equal "#{cop.name}: Use `render \"books/edit.html.erb\", status: :ok, layout: \"application\"` instead", offenses[2].message end end diff --git a/test/test_rails_render_object_collection.rb b/test/test_rails_render_object_collection.rb index 7786dedd..e5fa9720 100644 --- a/test/test_rails_render_object_collection.rb +++ b/test/test_rails_render_object_collection.rb @@ -27,7 +27,7 @@ def test_render_partial_with_object_offense ERB assert_equal 1, offenses.count - assert_equal "Avoid `render object:`, instead `render partial: \"account\", locals: { account: @buyer }`", offenses[0].message + assert_equal "#{cop.name}: Avoid `render object:`, instead `render partial: \"account\", locals: { account: @buyer }`", offenses[0].message end def test_render_collection_with_object_offense @@ -36,7 +36,7 @@ def test_render_collection_with_object_offense ERB assert_equal 1, offenses.count - assert_equal "Avoid `render collection:`", offenses[0].message + assert_equal "#{cop.name}: Avoid `render collection:`", offenses[0].message end def test_render_spacer_template_with_object_offense @@ -45,6 +45,6 @@ def test_render_spacer_template_with_object_offense ERB assert_equal 1, offenses.count - assert_equal "Avoid `render collection:`", offenses[0].message + assert_equal "#{cop.name}: Avoid `render collection:`", offenses[0].message end end diff --git a/test/test_rails_view_render_literal.rb b/test/test_rails_view_render_literal.rb index c2ba57e0..0def50e4 100644 --- a/test/test_rails_view_render_literal.rb +++ b/test/test_rails_view_render_literal.rb @@ -43,7 +43,7 @@ def test_render_variable_offense ERB assert_equal 2, offenses.count - assert_equal "render must be used with a literal template and use literals for locals keys", offenses[0].message + assert_equal "#{cop.name}: render must be used with a literal template and use literals for locals keys", offenses[0].message end def test_render_component_no_offense @@ -102,7 +102,7 @@ def test_render_layout_variable_literal_no_offense ERB assert_equal 1, offenses.count - assert_equal "render must be used with a literal template and use literals for locals keys", offenses[0].message + assert_equal "#{cop.name}: render must be used with a literal template and use literals for locals keys", offenses[0].message end def test_render_inline_no_offense diff --git a/test/test_rails_view_render_shorthand.rb b/test/test_rails_view_render_shorthand.rb index 22ff453a..4c8110f6 100644 --- a/test/test_rails_view_render_shorthand.rb +++ b/test/test_rails_view_render_shorthand.rb @@ -31,7 +31,7 @@ def test_render_partial_offense ERB assert_equal 1, offenses.count - assert_equal "Use `render \"foo/bar\"` instead", offenses[0].message + assert_equal "#{cop.name}: Use `render \"foo/bar\"` instead", offenses[0].message end def test_render_partial_with_locals_offense @@ -40,7 +40,7 @@ def test_render_partial_with_locals_offense ERB assert_equal 1, offenses.count - assert_equal "Use `render \"foo/bar\", { bar: 42 }` instead", offenses[0].message + assert_equal "#{cop.name}: Use `render \"foo/bar\", { bar: 42 }` instead", offenses[0].message end def test_render_layout_no_offense From 3f87230bc50a3b3bb345840436a73e538cee1f7a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 29 Mar 2024 19:35:36 +0000 Subject: [PATCH 055/180] Bump rubocop-rails from 2.22.2 to 2.24.1 Bumps [rubocop-rails](https://github.com/rubocop/rubocop-rails) from 2.22.2 to 2.24.1. - [Release notes](https://github.com/rubocop/rubocop-rails/releases) - [Changelog](https://github.com/rubocop/rubocop-rails/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop-rails/compare/v2.22.2...v2.24.1) --- updated-dependencies: - dependency-name: rubocop-rails dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index d3fba5fd..10578746 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -27,14 +27,14 @@ GEM tzinfo (~> 2.0) ast (2.4.2) base64 (0.2.0) - bigdecimal (3.1.6) + bigdecimal (3.1.7) builder (3.2.4) concurrent-ruby (1.2.3) connection_pool (2.4.1) crass (1.0.6) drb (2.2.1) erubi (1.12.0) - i18n (1.14.1) + i18n (1.14.4) concurrent-ruby (~> 1.0) json (2.7.1) language_server-protocol (3.17.0.3) @@ -58,7 +58,7 @@ GEM ast (~> 2.4.1) racc racc (1.7.3) - rack (3.0.9.1) + rack (3.0.10) rails-dom-testing (2.2.0) activesupport (>= 5.0.0) minitest @@ -86,11 +86,11 @@ GEM rubocop-performance (1.19.1) rubocop (>= 1.7.0, < 2.0) rubocop-ast (>= 0.4.0) - rubocop-rails (2.22.2) + rubocop-rails (2.24.1) activesupport (>= 4.2.0) rack (>= 1.1) rubocop (>= 1.33.0, < 2.0) - rubocop-ast (>= 1.30.0, < 2.0) + rubocop-ast (>= 1.31.1, < 2.0) ruby-progressbar (1.13.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) From 7b83ceb25f3398a26b62cb041866ca314d238acf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 29 Mar 2024 19:41:00 +0000 Subject: [PATCH 056/180] Bump rubocop-performance from 1.19.1 to 1.20.2 Bumps [rubocop-performance](https://github.com/rubocop/rubocop-performance) from 1.19.1 to 1.20.2. - [Release notes](https://github.com/rubocop/rubocop-performance/releases) - [Changelog](https://github.com/rubocop/rubocop-performance/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop-performance/compare/v1.19.1...v1.20.2) --- updated-dependencies: - dependency-name: rubocop-performance dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 10578746..1946238a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -83,9 +83,9 @@ GEM unicode-display_width (>= 2.4.0, < 3.0) rubocop-ast (1.31.2) parser (>= 3.3.0.4) - rubocop-performance (1.19.1) - rubocop (>= 1.7.0, < 2.0) - rubocop-ast (>= 0.4.0) + rubocop-performance (1.20.2) + rubocop (>= 1.48.1, < 2.0) + rubocop-ast (>= 1.30.0, < 2.0) rubocop-rails (2.24.1) activesupport (>= 4.2.0) rack (>= 1.1) From 4f77aa7db85cec451fd6e8c11eccc20f304a1e61 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Apr 2024 19:45:23 +0000 Subject: [PATCH 057/180] Bump rubocop-performance from 1.20.2 to 1.21.0 Bumps [rubocop-performance](https://github.com/rubocop/rubocop-performance) from 1.20.2 to 1.21.0. - [Release notes](https://github.com/rubocop/rubocop-performance/releases) - [Changelog](https://github.com/rubocop/rubocop-performance/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop-performance/compare/v1.20.2...v1.21.0) --- updated-dependencies: - dependency-name: rubocop-performance dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 1946238a..16617821 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -83,9 +83,9 @@ GEM unicode-display_width (>= 2.4.0, < 3.0) rubocop-ast (1.31.2) parser (>= 3.3.0.4) - rubocop-performance (1.20.2) + rubocop-performance (1.21.0) rubocop (>= 1.48.1, < 2.0) - rubocop-ast (>= 1.30.0, < 2.0) + rubocop-ast (>= 1.31.1, < 2.0) rubocop-rails (2.24.1) activesupport (>= 4.2.0) rack (>= 1.1) From 7400b0a96aae772abd75b3c823924117c57c0849 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Apr 2024 19:44:44 +0000 Subject: [PATCH 058/180] Bump rake from 13.1.0 to 13.2.1 Bumps [rake](https://github.com/ruby/rake) from 13.1.0 to 13.2.1. - [Release notes](https://github.com/ruby/rake/releases) - [Changelog](https://github.com/ruby/rake/blob/master/History.rdoc) - [Commits](https://github.com/ruby/rake/compare/v13.1.0...v13.2.1) --- updated-dependencies: - dependency-name: rake dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 16617821..0a831307 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -67,7 +67,7 @@ GEM loofah (~> 2.21) nokogiri (~> 1.14) rainbow (3.1.1) - rake (13.1.0) + rake (13.2.1) regexp_parser (2.9.0) rexml (3.2.6) rubocop (1.62.1) From f40116afb2d08f43e6f2822e8f647f2f49f45106 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Apr 2024 19:57:40 +0000 Subject: [PATCH 059/180] Bump rubocop from 1.62.1 to 1.63.1 Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.62.1 to 1.63.1. - [Release notes](https://github.com/rubocop/rubocop/releases) - [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop/compare/v1.62.1...v1.63.1) --- updated-dependencies: - dependency-name: rubocop dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 0a831307..ec080f29 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -36,7 +36,7 @@ GEM erubi (1.12.0) i18n (1.14.4) concurrent-ruby (~> 1.0) - json (2.7.1) + json (2.7.2) language_server-protocol (3.17.0.3) loofah (2.22.0) crass (~> 1.0.2) @@ -70,7 +70,7 @@ GEM rake (13.2.1) regexp_parser (2.9.0) rexml (3.2.6) - rubocop (1.62.1) + rubocop (1.63.1) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) From c104a8a46a089d8b4c39c94193d4b573dfa4e7e8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Apr 2024 19:13:11 +0000 Subject: [PATCH 060/180] Bump rubocop from 1.63.1 to 1.63.3 Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.63.1 to 1.63.3. - [Release notes](https://github.com/rubocop/rubocop/releases) - [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop/compare/v1.63.1...v1.63.3) --- updated-dependencies: - dependency-name: rubocop dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index ec080f29..527c7576 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -70,7 +70,7 @@ GEM rake (13.2.1) regexp_parser (2.9.0) rexml (3.2.6) - rubocop (1.63.1) + rubocop (1.63.3) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) From 28126e84ec2aed9d1009e607bd47c18fd18f76d7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Apr 2024 19:32:23 +0000 Subject: [PATCH 061/180] Bump rubocop from 1.63.3 to 1.63.4 Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.63.3 to 1.63.4. - [Release notes](https://github.com/rubocop/rubocop/releases) - [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop/compare/v1.63.3...v1.63.4) --- updated-dependencies: - dependency-name: rubocop dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 527c7576..e40f15a7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -54,7 +54,7 @@ GEM nokogiri (1.16.2-x86_64-linux) racc (~> 1.4) parallel (1.24.0) - parser (3.3.0.5) + parser (3.3.1.0) ast (~> 2.4.1) racc racc (1.7.3) @@ -70,7 +70,7 @@ GEM rake (13.2.1) regexp_parser (2.9.0) rexml (3.2.6) - rubocop (1.63.3) + rubocop (1.63.4) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) @@ -81,8 +81,8 @@ GEM rubocop-ast (>= 1.31.1, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.31.2) - parser (>= 3.3.0.4) + rubocop-ast (1.31.3) + parser (>= 3.3.1.0) rubocop-performance (1.21.0) rubocop (>= 1.48.1, < 2.0) rubocop-ast (>= 1.31.1, < 2.0) From 4087e8c210089a1e2779f9b0bcee2a573fcb8c74 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 May 2024 19:05:57 +0000 Subject: [PATCH 062/180] Bump rubocop from 1.63.4 to 1.63.5 Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.63.4 to 1.63.5. - [Release notes](https://github.com/rubocop/rubocop/releases) - [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop/compare/v1.63.4...v1.63.5) --- updated-dependencies: - dependency-name: rubocop dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index e40f15a7..185cda4d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -68,9 +68,9 @@ GEM nokogiri (~> 1.14) rainbow (3.1.1) rake (13.2.1) - regexp_parser (2.9.0) + regexp_parser (2.9.1) rexml (3.2.6) - rubocop (1.63.4) + rubocop (1.63.5) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) From 630d8fd75b07f8f0467ef14ff072619bb1a91ad3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 May 2024 23:37:56 +0000 Subject: [PATCH 063/180] Bump nokogiri from 1.16.2 to 1.16.5 Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.16.2 to 1.16.5. - [Release notes](https://github.com/sparklemotion/nokogiri/releases) - [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md) - [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.16.2...v1.16.5) --- updated-dependencies: - dependency-name: nokogiri dependency-type: indirect ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index e40f15a7..f3741450 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -41,17 +41,17 @@ GEM loofah (2.22.0) crass (~> 1.0.2) nokogiri (>= 1.12.0) - mini_portile2 (2.8.5) + mini_portile2 (2.8.6) minitest (5.22.3) mutex_m (0.2.0) - nokogiri (1.16.2) + nokogiri (1.16.5) mini_portile2 (~> 2.8.2) racc (~> 1.4) - nokogiri (1.16.2-arm64-darwin) + nokogiri (1.16.5-arm64-darwin) racc (~> 1.4) - nokogiri (1.16.2-x86_64-darwin) + nokogiri (1.16.5-x86_64-darwin) racc (~> 1.4) - nokogiri (1.16.2-x86_64-linux) + nokogiri (1.16.5-x86_64-linux) racc (~> 1.4) parallel (1.24.0) parser (3.3.1.0) From 86ee5a974dfe7d5c275d19fdd0253fb9541a7a76 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 16 May 2024 21:20:44 +0000 Subject: [PATCH 064/180] Bump rexml from 3.2.6 to 3.2.8 Bumps [rexml](https://github.com/ruby/rexml) from 3.2.6 to 3.2.8. - [Release notes](https://github.com/ruby/rexml/releases) - [Changelog](https://github.com/ruby/rexml/blob/master/NEWS.md) - [Commits](https://github.com/ruby/rexml/compare/v3.2.6...v3.2.8) --- updated-dependencies: - dependency-name: rexml dependency-type: indirect ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 4d5330ab..4565de38 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -69,7 +69,8 @@ GEM rainbow (3.1.1) rake (13.2.1) regexp_parser (2.9.1) - rexml (3.2.6) + rexml (3.2.8) + strscan (>= 3.0.9) rubocop (1.63.5) json (~> 2.3) language_server-protocol (>= 3.17.0) @@ -92,6 +93,7 @@ GEM rubocop (>= 1.33.0, < 2.0) rubocop-ast (>= 1.31.1, < 2.0) ruby-progressbar (1.13.0) + strscan (3.1.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) unicode-display_width (2.5.0) From 0f90c61bab9a44c2e7dff49955205e55a082fbe9 Mon Sep 17 00:00:00 2001 From: Abraham Williams Date: Fri, 17 May 2024 21:06:52 +0000 Subject: [PATCH 065/180] update pending configs --- config/default_pending.yml | 66 ++++++++++++++++++++++++++++++++ config/rails_pending.yml | 78 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 144 insertions(+) diff --git a/config/default_pending.yml b/config/default_pending.yml index ee85c603..d7161a45 100644 --- a/config/default_pending.yml +++ b/config/default_pending.yml @@ -4,3 +4,69 @@ Style/OperatorMethodCall: # new in 1.37 Enabled: false Style/RedundantStringEscape: # new in 1.37 Enabled: false +Gemspec/DevelopmentDependencies: # new in 1.44 + Enabled: true +Lint/DuplicateMatchPattern: # new in 1.50 + Enabled: true +Lint/ItWithoutArgumentsInBlock: # new in 1.59 + Enabled: true +Lint/LiteralAssignmentInCondition: # new in 1.58 + Enabled: true +Lint/MixedCaseRange: # new in 1.53 + Enabled: true +Lint/RedundantRegexpQuantifiers: # new in 1.53 + Enabled: true +Lint/UselessRescue: # new in 1.43 + Enabled: true +Metrics/CollectionLiteralLength: # new in 1.47 + Enabled: true +Style/ArrayIntersect: # new in 1.40 + 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/ExactRegexpMatch: # new in 1.51 + Enabled: true +Style/FileEmpty: # new in 1.48 + Enabled: true +Style/MapIntoArray: # new in 1.63 + Enabled: true +Style/MapToSet: # new in 1.42 + Enabled: true +Style/MinMaxComparison: # new in 1.42 + 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/RedundantLineContinuation: # new in 1.49 + Enabled: true +Style/RedundantRegexpArgument: # new in 1.53 + Enabled: true +Style/RedundantRegexpConstructor: # new in 1.52 + Enabled: true +Style/ReturnNilInPredicateMethodDefinition: # new in 1.53 + Enabled: true +Style/SingleLineDoEndBlock: # new in 1.57 + Enabled: true +Style/SuperWithArgsParentheses: # new in 1.58 + Enabled: true +Style/YAMLFileRead: # new in 1.53 + Enabled: true +Performance/MapMethodChain: # new in 1.19 + Enabled: true diff --git a/config/rails_pending.yml b/config/rails_pending.yml index b3abb0b5..893864bb 100644 --- a/config/rails_pending.yml +++ b/config/rails_pending.yml @@ -18,3 +18,81 @@ Rails/WhereMissing: # new in 2.16 Enabled: false Rails/WhereNotWithMultipleConditions: # new in 2.17 Enabled: false +Gemspec/DevelopmentDependencies: # new in 1.44 + Enabled: true +Lint/DuplicateMatchPattern: # new in 1.50 + Enabled: true +Lint/ItWithoutArgumentsInBlock: # new in 1.59 + Enabled: true +Lint/LiteralAssignmentInCondition: # new in 1.58 + Enabled: true +Lint/MixedCaseRange: # new in 1.53 + Enabled: true +Lint/RedundantRegexpQuantifiers: # new in 1.53 + Enabled: true +Lint/UselessRescue: # new in 1.43 + Enabled: true +Metrics/CollectionLiteralLength: # new in 1.47 + Enabled: true +Style/ArrayIntersect: # new in 1.40 + 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/ExactRegexpMatch: # new in 1.51 + Enabled: true +Style/FileEmpty: # new in 1.48 + Enabled: true +Style/MapIntoArray: # new in 1.63 + Enabled: true +Style/MapToSet: # new in 1.42 + Enabled: true +Style/MinMaxComparison: # new in 1.42 + 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/RedundantLineContinuation: # new in 1.49 + Enabled: true +Style/RedundantRegexpArgument: # new in 1.53 + Enabled: true +Style/RedundantRegexpConstructor: # new in 1.52 + Enabled: true +Style/ReturnNilInPredicateMethodDefinition: # new in 1.53 + Enabled: true +Style/SingleLineDoEndBlock: # new in 1.57 + Enabled: true +Style/SuperWithArgsParentheses: # new in 1.58 + Enabled: true +Style/YAMLFileRead: # new in 1.53 + Enabled: true +Performance/MapMethodChain: # new in 1.19 + Enabled: true +Rails/DangerousColumnNames: # new in 2.21 + Enabled: true +Rails/EnvLocal: # new in 2.22 + Enabled: true +Rails/RedundantActiveRecordAllMethod: # new in 2.21 + Enabled: true +Rails/ResponseParsedBody: # new in 2.18 + Enabled: true +Rails/ThreeStateBooleanColumn: # new in 2.19 + Enabled: true +Rails/UnusedRenderContent: # new in 2.21 + Enabled: true From fd01fa3db13bb21b11d2b2b0b38fe405e2f0041e Mon Sep 17 00:00:00 2001 From: Abraham Williams Date: Fri, 17 May 2024 21:07:47 +0000 Subject: [PATCH 066/180] Resolve Style/RedundantCurrentDirectoryInPath --- test/test_avoid_object_send_with_dynamic_method.rb | 2 +- test/test_insecure_hash_algorithm.rb | 2 +- test/test_rails_controller_render_action_symbol.rb | 2 +- test/test_rails_controller_render_literal.rb | 2 +- test/test_rails_controller_render_shorthand.rb | 2 +- test/test_rails_render_object_collection.rb | 2 +- test/test_rails_view_render_literal.rb | 2 +- test/test_rails_view_render_shorthand.rb | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/test/test_avoid_object_send_with_dynamic_method.rb b/test/test_avoid_object_send_with_dynamic_method.rb index bdca640d..b176cbcc 100644 --- a/test/test_avoid_object_send_with_dynamic_method.rb +++ b/test/test_avoid_object_send_with_dynamic_method.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative "./cop_test" +require_relative "cop_test" require "minitest/autorun" require "rubocop/cop/github/avoid_object_send_with_dynamic_method" diff --git a/test/test_insecure_hash_algorithm.rb b/test/test_insecure_hash_algorithm.rb index 71df7e3a..6e0277f3 100644 --- a/test/test_insecure_hash_algorithm.rb +++ b/test/test_insecure_hash_algorithm.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative "./cop_test" +require_relative "cop_test" require "minitest/autorun" require "rubocop/cop/github/insecure_hash_algorithm" diff --git a/test/test_rails_controller_render_action_symbol.rb b/test/test_rails_controller_render_action_symbol.rb index 8376ab67..9b67a2c5 100644 --- a/test/test_rails_controller_render_action_symbol.rb +++ b/test/test_rails_controller_render_action_symbol.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative "./cop_test" +require_relative "cop_test" require "minitest/autorun" require "rubocop/cop/github/rails_controller_render_action_symbol" diff --git a/test/test_rails_controller_render_literal.rb b/test/test_rails_controller_render_literal.rb index 712b81d7..5acd5c26 100644 --- a/test/test_rails_controller_render_literal.rb +++ b/test/test_rails_controller_render_literal.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative "./cop_test" +require_relative "cop_test" require "minitest/autorun" require "rubocop/cop/github/rails_controller_render_literal" diff --git a/test/test_rails_controller_render_shorthand.rb b/test/test_rails_controller_render_shorthand.rb index 4998c025..f4bb111a 100644 --- a/test/test_rails_controller_render_shorthand.rb +++ b/test/test_rails_controller_render_shorthand.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative "./cop_test" +require_relative "cop_test" require "minitest/autorun" require "rubocop/cop/github/rails_controller_render_shorthand" diff --git a/test/test_rails_render_object_collection.rb b/test/test_rails_render_object_collection.rb index e5fa9720..c13ec9af 100644 --- a/test/test_rails_render_object_collection.rb +++ b/test/test_rails_render_object_collection.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative "./cop_test" +require_relative "cop_test" require "minitest/autorun" require "rubocop/cop/github/rails_render_object_collection" diff --git a/test/test_rails_view_render_literal.rb b/test/test_rails_view_render_literal.rb index 0def50e4..7c081dd3 100644 --- a/test/test_rails_view_render_literal.rb +++ b/test/test_rails_view_render_literal.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative "./cop_test" +require_relative "cop_test" require "minitest/autorun" require "rubocop/cop/github/rails_view_render_literal" diff --git a/test/test_rails_view_render_shorthand.rb b/test/test_rails_view_render_shorthand.rb index 4c8110f6..0077ceea 100644 --- a/test/test_rails_view_render_shorthand.rb +++ b/test/test_rails_view_render_shorthand.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative "./cop_test" +require_relative "cop_test" require "minitest/autorun" require "rubocop/cop/github/rails_view_render_shorthand" From 689f5bbaf4d2cb57b03bb710db8e924adfbb1b0a Mon Sep 17 00:00:00 2001 From: Abraham Williams Date: Fri, 17 May 2024 21:11:45 +0000 Subject: [PATCH 067/180] Switch Gemspec/DevelopmentDependencies to gemspec --- .rubocop.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.rubocop.yml b/.rubocop.yml index afe2d021..50ed10da 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -8,3 +8,7 @@ Naming/FileName: - "rubocop-github.gemspec" - "lib/rubocop-github.rb" - "lib/rubocop-github-rails.rb" + +Gemspec/DevelopmentDependencies: + Enabled: true + EnforcedStyle: gemspec From aacab4994a3f834688d2d0b415d09d6b9f79341e Mon Sep 17 00:00:00 2001 From: Abraham Williams Date: Fri, 17 May 2024 21:13:54 +0000 Subject: [PATCH 068/180] Default pendng to false --- config/default_pending.yml | 66 ++++++++++++++++---------------- config/rails_pending.yml | 78 +++++++++++++++++++------------------- 2 files changed, 72 insertions(+), 72 deletions(-) diff --git a/config/default_pending.yml b/config/default_pending.yml index d7161a45..9d189036 100644 --- a/config/default_pending.yml +++ b/config/default_pending.yml @@ -5,68 +5,68 @@ Style/OperatorMethodCall: # new in 1.37 Style/RedundantStringEscape: # new in 1.37 Enabled: false Gemspec/DevelopmentDependencies: # new in 1.44 - Enabled: true + Enabled: false Lint/DuplicateMatchPattern: # new in 1.50 - Enabled: true + Enabled: false Lint/ItWithoutArgumentsInBlock: # new in 1.59 - Enabled: true + Enabled: false Lint/LiteralAssignmentInCondition: # new in 1.58 - Enabled: true + Enabled: false Lint/MixedCaseRange: # new in 1.53 - Enabled: true + Enabled: false Lint/RedundantRegexpQuantifiers: # new in 1.53 - Enabled: true + Enabled: false Lint/UselessRescue: # new in 1.43 - Enabled: true + Enabled: false Metrics/CollectionLiteralLength: # new in 1.47 - Enabled: true + Enabled: false Style/ArrayIntersect: # new in 1.40 - Enabled: true + Enabled: false Style/ComparableClamp: # new in 1.44 - Enabled: true + Enabled: false Style/ConcatArrayLiterals: # new in 1.41 - Enabled: true + Enabled: false Style/DataInheritance: # new in 1.49 - Enabled: true + Enabled: false Style/DirEmpty: # new in 1.48 - Enabled: true + Enabled: false Style/ExactRegexpMatch: # new in 1.51 - Enabled: true + Enabled: false Style/FileEmpty: # new in 1.48 - Enabled: true + Enabled: false Style/MapIntoArray: # new in 1.63 - Enabled: true + Enabled: false Style/MapToSet: # new in 1.42 - Enabled: true + Enabled: false Style/MinMaxComparison: # new in 1.42 - Enabled: true + Enabled: false Style/RedundantArrayConstructor: # new in 1.52 - Enabled: true + Enabled: false Style/RedundantConstantBase: # new in 1.40 - Enabled: true + Enabled: false Style/RedundantCurrentDirectoryInPath: # new in 1.53 - Enabled: true + Enabled: false Style/RedundantDoubleSplatHashBraces: # new in 1.41 - Enabled: true + Enabled: false Style/RedundantEach: # new in 1.38 - Enabled: true + Enabled: false Style/RedundantFilterChain: # new in 1.52 - Enabled: true + Enabled: false Style/RedundantHeredocDelimiterQuotes: # new in 1.45 - Enabled: true + Enabled: false Style/RedundantLineContinuation: # new in 1.49 - Enabled: true + Enabled: false Style/RedundantRegexpArgument: # new in 1.53 - Enabled: true + Enabled: false Style/RedundantRegexpConstructor: # new in 1.52 - Enabled: true + Enabled: false Style/ReturnNilInPredicateMethodDefinition: # new in 1.53 - Enabled: true + Enabled: false Style/SingleLineDoEndBlock: # new in 1.57 - Enabled: true + Enabled: false Style/SuperWithArgsParentheses: # new in 1.58 - Enabled: true + Enabled: false Style/YAMLFileRead: # new in 1.53 - Enabled: true + Enabled: false Performance/MapMethodChain: # new in 1.19 - Enabled: true + Enabled: false diff --git a/config/rails_pending.yml b/config/rails_pending.yml index 893864bb..3e9582d9 100644 --- a/config/rails_pending.yml +++ b/config/rails_pending.yml @@ -19,80 +19,80 @@ Rails/WhereMissing: # new in 2.16 Rails/WhereNotWithMultipleConditions: # new in 2.17 Enabled: false Gemspec/DevelopmentDependencies: # new in 1.44 - Enabled: true + Enabled: false Lint/DuplicateMatchPattern: # new in 1.50 - Enabled: true + Enabled: false Lint/ItWithoutArgumentsInBlock: # new in 1.59 - Enabled: true + Enabled: false Lint/LiteralAssignmentInCondition: # new in 1.58 - Enabled: true + Enabled: false Lint/MixedCaseRange: # new in 1.53 - Enabled: true + Enabled: false Lint/RedundantRegexpQuantifiers: # new in 1.53 - Enabled: true + Enabled: false Lint/UselessRescue: # new in 1.43 - Enabled: true + Enabled: false Metrics/CollectionLiteralLength: # new in 1.47 - Enabled: true + Enabled: false Style/ArrayIntersect: # new in 1.40 - Enabled: true + Enabled: false Style/ComparableClamp: # new in 1.44 - Enabled: true + Enabled: false Style/ConcatArrayLiterals: # new in 1.41 - Enabled: true + Enabled: false Style/DataInheritance: # new in 1.49 - Enabled: true + Enabled: false Style/DirEmpty: # new in 1.48 - Enabled: true + Enabled: false Style/ExactRegexpMatch: # new in 1.51 - Enabled: true + Enabled: false Style/FileEmpty: # new in 1.48 - Enabled: true + Enabled: false Style/MapIntoArray: # new in 1.63 - Enabled: true + Enabled: false Style/MapToSet: # new in 1.42 - Enabled: true + Enabled: false Style/MinMaxComparison: # new in 1.42 - Enabled: true + Enabled: false Style/RedundantArrayConstructor: # new in 1.52 - Enabled: true + Enabled: false Style/RedundantConstantBase: # new in 1.40 - Enabled: true + Enabled: false Style/RedundantCurrentDirectoryInPath: # new in 1.53 - Enabled: true + Enabled: false Style/RedundantDoubleSplatHashBraces: # new in 1.41 - Enabled: true + Enabled: false Style/RedundantEach: # new in 1.38 - Enabled: true + Enabled: false Style/RedundantFilterChain: # new in 1.52 - Enabled: true + Enabled: false Style/RedundantHeredocDelimiterQuotes: # new in 1.45 - Enabled: true + Enabled: false Style/RedundantLineContinuation: # new in 1.49 - Enabled: true + Enabled: false Style/RedundantRegexpArgument: # new in 1.53 - Enabled: true + Enabled: false Style/RedundantRegexpConstructor: # new in 1.52 - Enabled: true + Enabled: false Style/ReturnNilInPredicateMethodDefinition: # new in 1.53 - Enabled: true + Enabled: false Style/SingleLineDoEndBlock: # new in 1.57 - Enabled: true + Enabled: false Style/SuperWithArgsParentheses: # new in 1.58 - Enabled: true + Enabled: false Style/YAMLFileRead: # new in 1.53 - Enabled: true + Enabled: false Performance/MapMethodChain: # new in 1.19 - Enabled: true + Enabled: false Rails/DangerousColumnNames: # new in 2.21 - Enabled: true + Enabled: false Rails/EnvLocal: # new in 2.22 - Enabled: true + Enabled: false Rails/RedundantActiveRecordAllMethod: # new in 2.21 - Enabled: true + Enabled: false Rails/ResponseParsedBody: # new in 2.18 - Enabled: true + Enabled: false Rails/ThreeStateBooleanColumn: # new in 2.19 - Enabled: true + Enabled: false Rails/UnusedRenderContent: # new in 2.21 - Enabled: true + Enabled: false From e21e116416b6da71f659399cc5b4770d136a7836 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 May 2024 19:39:35 +0000 Subject: [PATCH 069/180] --- updated-dependencies: - dependency-name: rubocop-rails dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 4565de38..62e46d01 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -27,14 +27,14 @@ GEM tzinfo (~> 2.0) ast (2.4.2) base64 (0.2.0) - bigdecimal (3.1.7) + bigdecimal (3.1.8) builder (3.2.4) concurrent-ruby (1.2.3) connection_pool (2.4.1) crass (1.0.6) drb (2.2.1) erubi (1.12.0) - i18n (1.14.4) + i18n (1.14.5) concurrent-ruby (~> 1.0) json (2.7.2) language_server-protocol (3.17.0.3) @@ -57,8 +57,8 @@ GEM parser (3.3.1.0) ast (~> 2.4.1) racc - racc (1.7.3) - rack (3.0.10) + racc (1.8.0) + rack (3.0.11) rails-dom-testing (2.2.0) activesupport (>= 5.0.0) minitest @@ -68,7 +68,7 @@ GEM nokogiri (~> 1.14) rainbow (3.1.1) rake (13.2.1) - regexp_parser (2.9.1) + regexp_parser (2.9.2) rexml (3.2.8) strscan (>= 3.0.9) rubocop (1.63.5) @@ -87,7 +87,7 @@ GEM rubocop-performance (1.21.0) rubocop (>= 1.48.1, < 2.0) rubocop-ast (>= 1.31.1, < 2.0) - rubocop-rails (2.24.1) + rubocop-rails (2.25.0) activesupport (>= 4.2.0) rack (>= 1.1) rubocop (>= 1.33.0, < 2.0) From 9412db6fd8c428292c015521bfdcaf8b6b6f01dc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 May 2024 19:44:30 +0000 Subject: [PATCH 070/180] --- updated-dependencies: - dependency-name: minitest dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 62e46d01..fa8d9d59 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -42,7 +42,7 @@ GEM crass (~> 1.0.2) nokogiri (>= 1.12.0) mini_portile2 (2.8.6) - minitest (5.22.3) + minitest (5.23.0) mutex_m (0.2.0) nokogiri (1.16.5) mini_portile2 (~> 2.8.2) From 33c275f5f0216685806d8a9157b5af228d8efcbe Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 May 2024 19:44:32 +0000 Subject: [PATCH 071/180] --- updated-dependencies: - dependency-name: actionview dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 62e46d01..dfadb224 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -9,13 +9,13 @@ PATH GEM remote: https://rubygems.org/ specs: - actionview (7.1.3.2) - activesupport (= 7.1.3.2) + actionview (7.1.3.3) + activesupport (= 7.1.3.3) builder (~> 3.1) erubi (~> 1.11) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - activesupport (7.1.3.2) + activesupport (7.1.3.3) base64 bigdecimal concurrent-ruby (~> 1.0, >= 1.0.2) From 4f33c69bf97c8d42cdc8edab8507469435330f09 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 May 2024 19:26:16 +0000 Subject: [PATCH 072/180] Bump minitest from 5.23.0 to 5.23.1 Bumps [minitest](https://github.com/minitest/minitest) from 5.23.0 to 5.23.1. - [Changelog](https://github.com/minitest/minitest/blob/master/History.rdoc) - [Commits](https://github.com/minitest/minitest/compare/v5.23.0...v5.23.1) --- updated-dependencies: - dependency-name: minitest dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index c61757df..50343b5a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -42,7 +42,7 @@ GEM crass (~> 1.0.2) nokogiri (>= 1.12.0) mini_portile2 (2.8.6) - minitest (5.23.0) + minitest (5.23.1) mutex_m (0.2.0) nokogiri (1.16.5) mini_portile2 (~> 2.8.2) From f2942c22215838a06c7e22266ce7d189e81e1065 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Jun 2024 19:38:51 +0000 Subject: [PATCH 073/180] Bump rubocop from 1.63.5 to 1.64.1 Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.63.5 to 1.64.1. - [Release notes](https://github.com/rubocop/rubocop/releases) - [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop/compare/v1.63.5...v1.64.1) --- updated-dependencies: - dependency-name: rubocop dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index c61757df..6441cec5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -54,7 +54,7 @@ GEM nokogiri (1.16.5-x86_64-linux) racc (~> 1.4) parallel (1.24.0) - parser (3.3.1.0) + parser (3.3.2.0) ast (~> 2.4.1) racc racc (1.8.0) @@ -71,7 +71,7 @@ GEM regexp_parser (2.9.2) rexml (3.2.8) strscan (>= 3.0.9) - rubocop (1.63.5) + rubocop (1.64.1) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) From fecfcc6b01a1e7650b0c34fd64f2c16b91f104b0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Jun 2024 19:07:52 +0000 Subject: [PATCH 074/180] Bump actionview from 7.1.3.3 to 7.1.3.4 Bumps [actionview](https://github.com/rails/rails) from 7.1.3.3 to 7.1.3.4. - [Release notes](https://github.com/rails/rails/releases) - [Changelog](https://github.com/rails/rails/blob/v7.1.3.4/actionview/CHANGELOG.md) - [Commits](https://github.com/rails/rails/compare/v7.1.3.3...v7.1.3.4) --- updated-dependencies: - dependency-name: actionview dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index fca18bfb..5473541d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -9,13 +9,13 @@ PATH GEM remote: https://rubygems.org/ specs: - actionview (7.1.3.3) - activesupport (= 7.1.3.3) + actionview (7.1.3.4) + activesupport (= 7.1.3.4) builder (~> 3.1) erubi (~> 1.11) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - activesupport (7.1.3.3) + activesupport (7.1.3.4) base64 bigdecimal concurrent-ruby (~> 1.0, >= 1.0.2) @@ -28,8 +28,8 @@ GEM ast (2.4.2) base64 (0.2.0) bigdecimal (3.1.8) - builder (3.2.4) - concurrent-ruby (1.2.3) + builder (3.3.0) + concurrent-ruby (1.3.3) connection_pool (2.4.1) crass (1.0.6) drb (2.2.1) @@ -41,7 +41,7 @@ GEM loofah (2.22.0) crass (~> 1.0.2) nokogiri (>= 1.12.0) - mini_portile2 (2.8.6) + mini_portile2 (2.8.7) minitest (5.23.1) mutex_m (0.2.0) nokogiri (1.16.5) From 1863de7f6e43368046eaa005b2f13fa4f8030939 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Jun 2024 19:26:53 +0000 Subject: [PATCH 075/180] Bump rubocop-performance from 1.21.0 to 1.21.1 Bumps [rubocop-performance](https://github.com/rubocop/rubocop-performance) from 1.21.0 to 1.21.1. - [Release notes](https://github.com/rubocop/rubocop-performance/releases) - [Changelog](https://github.com/rubocop/rubocop-performance/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop-performance/compare/v1.21.0...v1.21.1) --- updated-dependencies: - dependency-name: rubocop-performance dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 5473541d..ea57ce0b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -53,8 +53,8 @@ GEM racc (~> 1.4) nokogiri (1.16.5-x86_64-linux) racc (~> 1.4) - parallel (1.24.0) - parser (3.3.2.0) + parallel (1.25.1) + parser (3.3.3.0) ast (~> 2.4.1) racc racc (1.8.0) @@ -69,8 +69,8 @@ GEM rainbow (3.1.1) rake (13.2.1) regexp_parser (2.9.2) - rexml (3.2.8) - strscan (>= 3.0.9) + rexml (3.3.0) + strscan rubocop (1.64.1) json (~> 2.3) language_server-protocol (>= 3.17.0) @@ -84,7 +84,7 @@ GEM unicode-display_width (>= 2.4.0, < 3.0) rubocop-ast (1.31.3) parser (>= 3.3.1.0) - rubocop-performance (1.21.0) + rubocop-performance (1.21.1) rubocop (>= 1.48.1, < 2.0) rubocop-ast (>= 1.31.1, < 2.0) rubocop-rails (2.25.0) From 7c39f4b5b11337c7811eabdc7c23c677b1db56fc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Jul 2024 19:55:13 +0000 Subject: [PATCH 076/180] Bump minitest from 5.23.1 to 5.24.1 Bumps [minitest](https://github.com/minitest/minitest) from 5.23.1 to 5.24.1. - [Changelog](https://github.com/minitest/minitest/blob/master/History.rdoc) - [Commits](https://github.com/minitest/minitest/compare/v5.23.1...v5.24.1) --- updated-dependencies: - dependency-name: minitest dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index ea57ce0b..11671a68 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -42,7 +42,7 @@ GEM crass (~> 1.0.2) nokogiri (>= 1.12.0) mini_portile2 (2.8.7) - minitest (5.23.1) + minitest (5.24.1) mutex_m (0.2.0) nokogiri (1.16.5) mini_portile2 (~> 2.8.2) From a09eaddcaa024bee84fc5c20243165fb0b63f519 Mon Sep 17 00:00:00 2001 From: James Dennes Date: Wed, 17 Jul 2024 16:48:39 +0200 Subject: [PATCH 077/180] Use meaningful message for locals offense --- lib/rubocop/cop/github/rails_controller_render_literal.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/rubocop/cop/github/rails_controller_render_literal.rb b/lib/rubocop/cop/github/rails_controller_render_literal.rb index 0f2efd39..44c82bd5 100644 --- a/lib/rubocop/cop/github/rails_controller_render_literal.rb +++ b/lib/rubocop/cop/github/rails_controller_render_literal.rb @@ -11,6 +11,8 @@ class RailsControllerRenderLiteral < Base MSG = "render must be used with a string literal or an instance of a Class" + LOCALS_MSG = "render must be used with a hash literal for the locals keyword argument" + def_node_matcher :ignore_key?, <<-PATTERN (pair (sym { :body @@ -99,7 +101,7 @@ def on_send(node) if option_pairs locals = option_pairs.map { |pair| locals_key?(pair) }.compact.first if locals && (!locals.hash_type? || !hash_with_literal_keys?(locals)) - add_offense(node) + add_offense(node, message: LOCALS_MSG) end end end From 9cfbd5915f2cf1f8ac3745dddbb8341a46e8b1d2 Mon Sep 17 00:00:00 2001 From: James Dennes Date: Wed, 17 Jul 2024 16:54:09 +0200 Subject: [PATCH 078/180] Just use a single message --- lib/rubocop/cop/github/rails_controller_render_literal.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/rubocop/cop/github/rails_controller_render_literal.rb b/lib/rubocop/cop/github/rails_controller_render_literal.rb index 44c82bd5..4ed294e1 100644 --- a/lib/rubocop/cop/github/rails_controller_render_literal.rb +++ b/lib/rubocop/cop/github/rails_controller_render_literal.rb @@ -9,9 +9,7 @@ module GitHub class RailsControllerRenderLiteral < Base include RenderLiteralHelpers - MSG = "render must be used with a string literal or an instance of a Class" - - LOCALS_MSG = "render must be used with a hash literal for the locals keyword argument" + MSG = "render must be used with a string literal or an instance of a Class, and use literals for locals keys" def_node_matcher :ignore_key?, <<-PATTERN (pair (sym { @@ -101,7 +99,7 @@ def on_send(node) if option_pairs locals = option_pairs.map { |pair| locals_key?(pair) }.compact.first if locals && (!locals.hash_type? || !hash_with_literal_keys?(locals)) - add_offense(node, message: LOCALS_MSG) + add_offense(node) end end end From 0aed77073ef16108388ec01fea97d1ccbbf3723e Mon Sep 17 00:00:00 2001 From: James Dennes Date: Wed, 17 Jul 2024 16:54:15 +0200 Subject: [PATCH 079/180] Update tests --- test/test_rails_controller_render_literal.rb | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/test/test_rails_controller_render_literal.rb b/test/test_rails_controller_render_literal.rb index 5acd5c26..753399a9 100644 --- a/test/test_rails_controller_render_literal.rb +++ b/test/test_rails_controller_render_literal.rb @@ -274,7 +274,7 @@ def index RUBY assert_equal 1, offenses.count - assert_equal "#{cop.name}: render must be used with a string literal or an instance of a Class", offenses[0].message + assert_equal "#{cop.name}: render must be used with a string literal or an instance of a Class, and use literals for locals keys", offenses[0].message end def test_render_implicit_with_layout_offense @@ -287,7 +287,7 @@ def index RUBY assert_equal 1, offenses.count - assert_equal "#{cop.name}: render must be used with a string literal or an instance of a Class", offenses[0].message + assert_equal "#{cop.name}: render must be used with a string literal or an instance of a Class, and use literals for locals keys", offenses[0].message end def test_render_implicit_with_status_offense @@ -300,7 +300,7 @@ def index RUBY assert_equal 1, offenses.count - assert_equal "#{cop.name}: render must be used with a string literal or an instance of a Class", offenses[0].message + assert_equal "#{cop.name}: render must be used with a string literal or an instance of a Class, and use literals for locals keys", offenses[0].message end def test_render_variable_offense @@ -313,7 +313,7 @@ def index RUBY assert_equal 1, offenses.count - assert_equal "#{cop.name}: render must be used with a string literal or an instance of a Class", offenses[0].message + assert_equal "#{cop.name}: render must be used with a string literal or an instance of a Class, and use literals for locals keys", offenses[0].message end def test_render_to_string_variable_offense @@ -326,7 +326,7 @@ def index RUBY assert_equal 1, offenses.count - assert_equal "#{cop.name}: render must be used with a string literal or an instance of a Class", offenses[0].message + assert_equal "#{cop.name}: render must be used with a string literal or an instance of a Class, and use literals for locals keys", offenses[0].message end def test_render_action_variable_offense @@ -339,7 +339,7 @@ def index RUBY assert_equal 1, offenses.count - assert_equal "#{cop.name}: render must be used with a string literal or an instance of a Class", offenses[0].message + assert_equal "#{cop.name}: render must be used with a string literal or an instance of a Class, and use literals for locals keys", offenses[0].message end def test_render_template_variable_offense @@ -352,7 +352,7 @@ def index RUBY assert_equal 1, offenses.count - assert_equal "#{cop.name}: render must be used with a string literal or an instance of a Class", offenses[0].message + assert_equal "#{cop.name}: render must be used with a string literal or an instance of a Class, and use literals for locals keys", offenses[0].message end def test_render_partial_variable_offense @@ -365,7 +365,7 @@ def index RUBY assert_equal 1, offenses.count - assert_equal "#{cop.name}: render must be used with a string literal or an instance of a Class", offenses[0].message + assert_equal "#{cop.name}: render must be used with a string literal or an instance of a Class, and use literals for locals keys", offenses[0].message end def test_render_template_with_layout_variable_offense @@ -378,7 +378,7 @@ def index RUBY assert_equal 1, offenses.count - assert_equal "#{cop.name}: render must be used with a string literal or an instance of a Class", offenses[0].message + assert_equal "#{cop.name}: render must be used with a string literal or an instance of a Class, and use literals for locals keys", offenses[0].message end def test_render_template_variable_with_layout_offense @@ -391,7 +391,7 @@ def index RUBY assert_equal 1, offenses.count - assert_equal "#{cop.name}: render must be used with a string literal or an instance of a Class", offenses[0].message + assert_equal "#{cop.name}: render must be used with a string literal or an instance of a Class, and use literals for locals keys", offenses[0].message end def test_render_shorthand_static_locals_no_offsense From cec95e7afbc1926b49b1b653461ae9cd4d67812a Mon Sep 17 00:00:00 2001 From: James Dennes Date: Wed, 17 Jul 2024 16:58:00 +0200 Subject: [PATCH 080/180] Make line length reasonable --- test/test_rails_controller_render_literal.rb | 40 +++++++++++++++----- 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/test/test_rails_controller_render_literal.rb b/test/test_rails_controller_render_literal.rb index 753399a9..eb13928f 100644 --- a/test/test_rails_controller_render_literal.rb +++ b/test/test_rails_controller_render_literal.rb @@ -274,7 +274,9 @@ def index RUBY assert_equal 1, offenses.count - assert_equal "#{cop.name}: render must be used with a string literal or an instance of a Class, and use literals for locals keys", offenses[0].message + assert_equal \ + "#{cop.name}: render must be used with a string literal or an instance of a Class, and use literals for locals keys", + offenses[0].message end def test_render_implicit_with_layout_offense @@ -287,7 +289,9 @@ def index RUBY assert_equal 1, offenses.count - assert_equal "#{cop.name}: render must be used with a string literal or an instance of a Class, and use literals for locals keys", offenses[0].message + assert_equal \ + "#{cop.name}: render must be used with a string literal or an instance of a Class, and use literals for locals keys", + offenses[0].message end def test_render_implicit_with_status_offense @@ -300,7 +304,9 @@ def index RUBY assert_equal 1, offenses.count - assert_equal "#{cop.name}: render must be used with a string literal or an instance of a Class, and use literals for locals keys", offenses[0].message + assert_equal \ + "#{cop.name}: render must be used with a string literal or an instance of a Class, and use literals for locals keys", + offenses[0].message end def test_render_variable_offense @@ -313,7 +319,9 @@ def index RUBY assert_equal 1, offenses.count - assert_equal "#{cop.name}: render must be used with a string literal or an instance of a Class, and use literals for locals keys", offenses[0].message + assert_equal \ + "#{cop.name}: render must be used with a string literal or an instance of a Class, and use literals for locals keys", + offenses[0].message end def test_render_to_string_variable_offense @@ -326,7 +334,9 @@ def index RUBY assert_equal 1, offenses.count - assert_equal "#{cop.name}: render must be used with a string literal or an instance of a Class, and use literals for locals keys", offenses[0].message + assert_equal \ + "#{cop.name}: render must be used with a string literal or an instance of a Class, and use literals for locals keys", + offenses[0].message end def test_render_action_variable_offense @@ -339,7 +349,9 @@ def index RUBY assert_equal 1, offenses.count - assert_equal "#{cop.name}: render must be used with a string literal or an instance of a Class, and use literals for locals keys", offenses[0].message + assert_equal \ + "#{cop.name}: render must be used with a string literal or an instance of a Class, and use literals for locals keys", + offenses[0].message end def test_render_template_variable_offense @@ -352,7 +364,9 @@ def index RUBY assert_equal 1, offenses.count - assert_equal "#{cop.name}: render must be used with a string literal or an instance of a Class, and use literals for locals keys", offenses[0].message + assert_equal \ + "#{cop.name}: render must be used with a string literal or an instance of a Class, and use literals for locals keys", + offenses[0].message end def test_render_partial_variable_offense @@ -365,7 +379,9 @@ def index RUBY assert_equal 1, offenses.count - assert_equal "#{cop.name}: render must be used with a string literal or an instance of a Class, and use literals for locals keys", offenses[0].message + assert_equal \ + "#{cop.name}: render must be used with a string literal or an instance of a Class, and use literals for locals keys", + offenses[0].message end def test_render_template_with_layout_variable_offense @@ -378,7 +394,9 @@ def index RUBY assert_equal 1, offenses.count - assert_equal "#{cop.name}: render must be used with a string literal or an instance of a Class, and use literals for locals keys", offenses[0].message + assert_equal \ + "#{cop.name}: render must be used with a string literal or an instance of a Class, and use literals for locals keys", + offenses[0].message end def test_render_template_variable_with_layout_offense @@ -391,7 +409,9 @@ def index RUBY assert_equal 1, offenses.count - assert_equal "#{cop.name}: render must be used with a string literal or an instance of a Class, and use literals for locals keys", offenses[0].message + assert_equal \ + "#{cop.name}: render must be used with a string literal or an instance of a Class, and use literals for locals keys", + offenses[0].message end def test_render_shorthand_static_locals_no_offsense From 3c290346b792cd169cdb87dab833004b12b4fc29 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 2 Aug 2024 16:42:14 +0000 Subject: [PATCH 081/180] Bump rexml from 3.3.0 to 3.3.3 in the bundler group Bumps the bundler group with 1 update: [rexml](https://github.com/ruby/rexml). Updates `rexml` from 3.3.0 to 3.3.3 - [Release notes](https://github.com/ruby/rexml/releases) - [Changelog](https://github.com/ruby/rexml/blob/master/NEWS.md) - [Commits](https://github.com/ruby/rexml/compare/v3.3.0...v3.3.3) --- updated-dependencies: - dependency-name: rexml dependency-type: indirect dependency-group: bundler ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index ea57ce0b..fb048da1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -69,7 +69,7 @@ GEM rainbow (3.1.1) rake (13.2.1) regexp_parser (2.9.2) - rexml (3.3.0) + rexml (3.3.3) strscan rubocop (1.64.1) json (~> 2.3) From 2a684aed0e4e1ca9d05eb855f20de29e9edc84e2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 2 Aug 2024 16:44:38 +0000 Subject: [PATCH 082/180] Bump rubocop from 1.64.1 to 1.65.1 Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.64.1 to 1.65.1. - [Release notes](https://github.com/rubocop/rubocop/releases) - [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop/compare/v1.64.1...v1.65.1) --- updated-dependencies: - dependency-name: rubocop dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index fb048da1..f8a8698a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -54,10 +54,10 @@ GEM nokogiri (1.16.5-x86_64-linux) racc (~> 1.4) parallel (1.25.1) - parser (3.3.3.0) + parser (3.3.4.0) ast (~> 2.4.1) racc - racc (1.8.0) + racc (1.8.1) rack (3.0.11) rails-dom-testing (2.2.0) activesupport (>= 5.0.0) @@ -69,15 +69,15 @@ GEM rainbow (3.1.1) rake (13.2.1) regexp_parser (2.9.2) - rexml (3.3.3) + rexml (3.3.4) strscan - rubocop (1.64.1) + rubocop (1.65.1) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) - regexp_parser (>= 1.8, < 3.0) + regexp_parser (>= 2.4, < 3.0) rexml (>= 3.2.5, < 4.0) rubocop-ast (>= 1.31.1, < 2.0) ruby-progressbar (~> 1.7) From 39c5a00938f6a7f536237d7fde2fb9565ef64abb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Aug 2024 10:33:26 +0000 Subject: [PATCH 083/180] Bump rubocop-rails from 2.25.0 to 2.25.1 Bumps [rubocop-rails](https://github.com/rubocop/rubocop-rails) from 2.25.0 to 2.25.1. - [Release notes](https://github.com/rubocop/rubocop-rails/releases) - [Changelog](https://github.com/rubocop/rubocop-rails/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop-rails/compare/v2.25.0...v2.25.1) --- updated-dependencies: - dependency-name: rubocop-rails dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 81abc8f8..75334217 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -58,7 +58,7 @@ GEM ast (~> 2.4.1) racc racc (1.8.1) - rack (3.0.11) + rack (3.1.7) rails-dom-testing (2.2.0) activesupport (>= 5.0.0) minitest @@ -87,7 +87,7 @@ GEM rubocop-performance (1.21.1) rubocop (>= 1.48.1, < 2.0) rubocop-ast (>= 1.31.1, < 2.0) - rubocop-rails (2.25.0) + rubocop-rails (2.25.1) activesupport (>= 4.2.0) rack (>= 1.1) rubocop (>= 1.33.0, < 2.0) From 18ec1e4f671fe892f34f3048bb60953603e41e53 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Aug 2024 19:18:42 +0000 Subject: [PATCH 084/180] Bump minitest from 5.24.1 to 5.25.1 Bumps [minitest](https://github.com/minitest/minitest) from 5.24.1 to 5.25.1. - [Changelog](https://github.com/minitest/minitest/blob/master/History.rdoc) - [Commits](https://github.com/minitest/minitest/compare/v5.24.1...v5.25.1) --- updated-dependencies: - dependency-name: minitest dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 75334217..f33a2029 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -42,7 +42,7 @@ GEM crass (~> 1.0.2) nokogiri (>= 1.12.0) mini_portile2 (2.8.7) - minitest (5.24.1) + minitest (5.25.1) mutex_m (0.2.0) nokogiri (1.16.5) mini_portile2 (~> 2.8.2) From 44755d314e2bd860c4d63c41dd8758b3fa5611a4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Aug 2024 19:36:27 +0000 Subject: [PATCH 085/180] Bump actionview from 7.1.3.4 to 7.1.4 Bumps [actionview](https://github.com/rails/rails) from 7.1.3.4 to 7.1.4. - [Release notes](https://github.com/rails/rails/releases) - [Changelog](https://github.com/rails/rails/blob/v7.2.1/actionview/CHANGELOG.md) - [Commits](https://github.com/rails/rails/compare/v7.1.3.4...v7.1.4) --- updated-dependencies: - dependency-name: actionview dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index f33a2029..9129f0f6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -9,13 +9,13 @@ PATH GEM remote: https://rubygems.org/ specs: - actionview (7.1.3.4) - activesupport (= 7.1.3.4) + actionview (7.1.4) + activesupport (= 7.1.4) builder (~> 3.1) erubi (~> 1.11) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - activesupport (7.1.3.4) + activesupport (7.1.4) base64 bigdecimal concurrent-ruby (~> 1.0, >= 1.0.2) @@ -29,11 +29,11 @@ GEM base64 (0.2.0) bigdecimal (3.1.8) builder (3.3.0) - concurrent-ruby (1.3.3) + concurrent-ruby (1.3.4) connection_pool (2.4.1) crass (1.0.6) drb (2.2.1) - erubi (1.12.0) + erubi (1.13.0) i18n (1.14.5) concurrent-ruby (~> 1.0) json (2.7.2) @@ -44,14 +44,14 @@ GEM mini_portile2 (2.8.7) minitest (5.25.1) mutex_m (0.2.0) - nokogiri (1.16.5) + nokogiri (1.16.7) mini_portile2 (~> 2.8.2) racc (~> 1.4) - nokogiri (1.16.5-arm64-darwin) + nokogiri (1.16.7-arm64-darwin) racc (~> 1.4) - nokogiri (1.16.5-x86_64-darwin) + nokogiri (1.16.7-x86_64-darwin) racc (~> 1.4) - nokogiri (1.16.5-x86_64-linux) + nokogiri (1.16.7-x86_64-linux) racc (~> 1.4) parallel (1.25.1) parser (3.3.4.0) From debf99d283d302782a1d2259a496957b8c16e834 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Aug 2024 19:36:33 +0000 Subject: [PATCH 086/180] Bump rubocop-rails from 2.25.1 to 2.26.0 Bumps [rubocop-rails](https://github.com/rubocop/rubocop-rails) from 2.25.1 to 2.26.0. - [Release notes](https://github.com/rubocop/rubocop-rails/releases) - [Changelog](https://github.com/rubocop/rubocop-rails/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop-rails/compare/v2.25.1...v2.26.0) --- updated-dependencies: - dependency-name: rubocop-rails dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index f33a2029..c726b6fb 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -29,7 +29,7 @@ GEM base64 (0.2.0) bigdecimal (3.1.8) builder (3.3.0) - concurrent-ruby (1.3.3) + concurrent-ruby (1.3.4) connection_pool (2.4.1) crass (1.0.6) drb (2.2.1) @@ -53,8 +53,8 @@ GEM racc (~> 1.4) nokogiri (1.16.5-x86_64-linux) racc (~> 1.4) - parallel (1.25.1) - parser (3.3.4.0) + parallel (1.26.3) + parser (3.3.4.2) ast (~> 2.4.1) racc racc (1.8.1) @@ -69,7 +69,7 @@ GEM rainbow (3.1.1) rake (13.2.1) regexp_parser (2.9.2) - rexml (3.3.4) + rexml (3.3.6) strscan rubocop (1.65.1) json (~> 2.3) @@ -82,15 +82,15 @@ GEM rubocop-ast (>= 1.31.1, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.31.3) + rubocop-ast (1.32.1) parser (>= 3.3.1.0) rubocop-performance (1.21.1) rubocop (>= 1.48.1, < 2.0) rubocop-ast (>= 1.31.1, < 2.0) - rubocop-rails (2.25.1) + rubocop-rails (2.26.0) activesupport (>= 4.2.0) rack (>= 1.1) - rubocop (>= 1.33.0, < 2.0) + rubocop (>= 1.52.0, < 2.0) rubocop-ast (>= 1.31.1, < 2.0) ruby-progressbar (1.13.0) strscan (3.1.0) From 8cd1b82cef564580150e637edb7e1b35a59d8231 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Sep 2024 19:35:23 +0000 Subject: [PATCH 087/180] Bump rubocop from 1.65.1 to 1.66.1 Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.65.1 to 1.66.1. - [Release notes](https://github.com/rubocop/rubocop/releases) - [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop/compare/v1.65.1...v1.66.1) --- updated-dependencies: - dependency-name: rubocop dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index e1b6015c..ff1e4930 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -54,7 +54,7 @@ GEM nokogiri (1.16.7-x86_64-linux) racc (~> 1.4) parallel (1.26.3) - parser (3.3.4.2) + parser (3.3.5.0) ast (~> 2.4.1) racc racc (1.8.1) @@ -69,20 +69,17 @@ GEM rainbow (3.1.1) rake (13.2.1) regexp_parser (2.9.2) - rexml (3.3.6) - strscan - rubocop (1.65.1) + rubocop (1.66.1) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 2.4, < 3.0) - rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.31.1, < 2.0) + rubocop-ast (>= 1.32.2, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.32.1) + rubocop-ast (1.32.3) parser (>= 3.3.1.0) rubocop-performance (1.21.1) rubocop (>= 1.48.1, < 2.0) @@ -93,7 +90,6 @@ GEM rubocop (>= 1.52.0, < 2.0) rubocop-ast (>= 1.31.1, < 2.0) ruby-progressbar (1.13.0) - strscan (3.1.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) unicode-display_width (2.5.0) From 8d75c10498d0ce36d2b318114cf303ff2e5d78fd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Sep 2024 19:39:01 +0000 Subject: [PATCH 088/180] Bump rubocop-rails from 2.26.0 to 2.26.2 Bumps [rubocop-rails](https://github.com/rubocop/rubocop-rails) from 2.26.0 to 2.26.2. - [Release notes](https://github.com/rubocop/rubocop-rails/releases) - [Changelog](https://github.com/rubocop/rubocop-rails/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop-rails/compare/v2.26.0...v2.26.2) --- updated-dependencies: - dependency-name: rubocop-rails dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index e1b6015c..24eaff57 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -34,7 +34,7 @@ GEM crass (1.0.6) drb (2.2.1) erubi (1.13.0) - i18n (1.14.5) + i18n (1.14.6) concurrent-ruby (~> 1.0) json (2.7.2) language_server-protocol (3.17.0.3) @@ -54,7 +54,7 @@ GEM nokogiri (1.16.7-x86_64-linux) racc (~> 1.4) parallel (1.26.3) - parser (3.3.4.2) + parser (3.3.5.0) ast (~> 2.4.1) racc racc (1.8.1) @@ -69,34 +69,30 @@ GEM rainbow (3.1.1) rake (13.2.1) regexp_parser (2.9.2) - rexml (3.3.6) - strscan - rubocop (1.65.1) + rubocop (1.66.1) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 2.4, < 3.0) - rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.31.1, < 2.0) + rubocop-ast (>= 1.32.2, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.32.1) + rubocop-ast (1.32.3) parser (>= 3.3.1.0) rubocop-performance (1.21.1) rubocop (>= 1.48.1, < 2.0) rubocop-ast (>= 1.31.1, < 2.0) - rubocop-rails (2.26.0) + rubocop-rails (2.26.2) activesupport (>= 4.2.0) rack (>= 1.1) rubocop (>= 1.52.0, < 2.0) rubocop-ast (>= 1.31.1, < 2.0) ruby-progressbar (1.13.0) - strscan (3.1.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - unicode-display_width (2.5.0) + unicode-display_width (2.6.0) PLATFORMS arm64-darwin-21 From 70499a0e6661b5133d0221fd12962a6258bf347f Mon Sep 17 00:00:00 2001 From: "Ben Sheldon [he/him]" Date: Thu, 10 Oct 2024 12:54:34 -0700 Subject: [PATCH 089/180] Declare least necessary permissions for GitHub Action --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a8f4d2c8..b6ad7485 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,6 @@ name: CI +permissions: + contents: read on: pull_request From 7b9d6d5253074ac4b5481268f25f6064617fc5d0 Mon Sep 17 00:00:00 2001 From: "Ben Sheldon [he/him]" Date: Thu, 10 Oct 2024 12:58:11 -0700 Subject: [PATCH 090/180] Pin ruby/setup-ruby to a specific sha --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b6ad7485..9052bde6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: - name: Update .ruby-version with matrix value run: echo "${{ matrix.ruby_version }}" >| .ruby-version - name: Set up Ruby - uses: ruby/setup-ruby@v1 + uses: ruby/setup-ruby@f26937343756480a8cb3ae1f623b9c8d89ed6984 with: bundler-cache: true rubygems: latest From d84dfb8f16c3caffce61a284ec3e994ca43c8fbd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 10 Oct 2024 20:52:30 +0000 Subject: [PATCH 091/180] Bump rubocop-performance from 1.21.1 to 1.22.1 Bumps [rubocop-performance](https://github.com/rubocop/rubocop-performance) from 1.21.1 to 1.22.1. - [Release notes](https://github.com/rubocop/rubocop-performance/releases) - [Changelog](https://github.com/rubocop/rubocop-performance/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop-performance/compare/v1.21.1...v1.22.1) --- updated-dependencies: - dependency-name: rubocop-performance dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 24eaff57..20222914 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -81,7 +81,7 @@ GEM unicode-display_width (>= 2.4.0, < 3.0) rubocop-ast (1.32.3) parser (>= 3.3.1.0) - rubocop-performance (1.21.1) + rubocop-performance (1.22.1) rubocop (>= 1.48.1, < 2.0) rubocop-ast (>= 1.31.1, < 2.0) rubocop-rails (2.26.2) From 94945101d995e9a4a7c387606d54581c09985e0a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 17 Oct 2024 19:54:42 +0000 Subject: [PATCH 092/180] Bump ruby/setup-ruby from 1.196.0 to 1.197.0 Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.196.0 to 1.197.0. - [Release notes](https://github.com/ruby/setup-ruby/releases) - [Changelog](https://github.com/ruby/setup-ruby/blob/master/release.rb) - [Commits](https://github.com/ruby/setup-ruby/compare/f26937343756480a8cb3ae1f623b9c8d89ed6984...7bae1d00b5db9166f4f0fc47985a3a5702cb58f0) --- updated-dependencies: - dependency-name: ruby/setup-ruby dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9052bde6..e2e9fa5a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: - name: Update .ruby-version with matrix value run: echo "${{ matrix.ruby_version }}" >| .ruby-version - name: Set up Ruby - uses: ruby/setup-ruby@f26937343756480a8cb3ae1f623b9c8d89ed6984 + uses: ruby/setup-ruby@7bae1d00b5db9166f4f0fc47985a3a5702cb58f0 with: bundler-cache: true rubygems: latest From e35caaece4af44d2c2ff1a111965e6b672aae16c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Oct 2024 19:12:42 +0000 Subject: [PATCH 093/180] Bump rubocop from 1.66.1 to 1.67.0 Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.66.1 to 1.67.0. - [Release notes](https://github.com/rubocop/rubocop/releases) - [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop/compare/v1.66.1...v1.67.0) --- updated-dependencies: - dependency-name: rubocop dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 20222914..0d4e165b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -69,7 +69,7 @@ GEM rainbow (3.1.1) rake (13.2.1) regexp_parser (2.9.2) - rubocop (1.66.1) + rubocop (1.67.0) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) From c95c8ee4464edc089ca0842e2d441bfa5765067a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Oct 2024 19:12:49 +0000 Subject: [PATCH 094/180] Bump actionview from 7.1.4 to 7.1.4.1 Bumps [actionview](https://github.com/rails/rails) from 7.1.4 to 7.1.4.1. - [Release notes](https://github.com/rails/rails/releases) - [Changelog](https://github.com/rails/rails/blob/v7.2.1.1/actionview/CHANGELOG.md) - [Commits](https://github.com/rails/rails/compare/v7.1.4...v7.1.4.1) --- updated-dependencies: - dependency-name: actionview dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 20222914..b713c00d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -9,13 +9,13 @@ PATH GEM remote: https://rubygems.org/ specs: - actionview (7.1.4) - activesupport (= 7.1.4) + actionview (7.1.4.1) + activesupport (= 7.1.4.1) builder (~> 3.1) erubi (~> 1.11) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - activesupport (7.1.4) + activesupport (7.1.4.1) base64 bigdecimal concurrent-ruby (~> 1.0, >= 1.0.2) From 782c004ba64b00ef70002962aaf6ba5ca060e50a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Oct 2024 20:15:30 +0000 Subject: [PATCH 095/180] Bump rubocop-rails from 2.26.2 to 2.27.0 Bumps [rubocop-rails](https://github.com/rubocop/rubocop-rails) from 2.26.2 to 2.27.0. - [Release notes](https://github.com/rubocop/rubocop-rails/releases) - [Changelog](https://github.com/rubocop/rubocop-rails/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop-rails/compare/v2.26.2...v2.27.0) --- updated-dependencies: - dependency-name: rubocop-rails dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 0bb93e08..7467b8f0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -36,7 +36,7 @@ GEM erubi (1.13.0) i18n (1.14.6) concurrent-ruby (~> 1.0) - json (2.7.2) + json (2.7.4) language_server-protocol (3.17.0.3) loofah (2.22.0) crass (~> 1.0.2) @@ -58,7 +58,7 @@ GEM ast (~> 2.4.1) racc racc (1.8.1) - rack (3.1.7) + rack (3.1.8) rails-dom-testing (2.2.0) activesupport (>= 5.0.0) minitest @@ -84,7 +84,7 @@ GEM rubocop-performance (1.22.1) rubocop (>= 1.48.1, < 2.0) rubocop-ast (>= 1.31.1, < 2.0) - rubocop-rails (2.26.2) + rubocop-rails (2.27.0) activesupport (>= 4.2.0) rack (>= 1.1) rubocop (>= 1.52.0, < 2.0) From 7bc742b592505c0ab2684dad2510c2275d4eee89 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 31 Oct 2024 19:35:01 +0000 Subject: [PATCH 096/180] Bump ruby/setup-ruby from 1.197.0 to 1.198.0 Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.197.0 to 1.198.0. - [Release notes](https://github.com/ruby/setup-ruby/releases) - [Changelog](https://github.com/ruby/setup-ruby/blob/master/release.rb) - [Commits](https://github.com/ruby/setup-ruby/compare/7bae1d00b5db9166f4f0fc47985a3a5702cb58f0...98aefb3c83eea830993080938ed245dc8e2b843b) --- updated-dependencies: - dependency-name: ruby/setup-ruby dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e2e9fa5a..0b109a2d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: - name: Update .ruby-version with matrix value run: echo "${{ matrix.ruby_version }}" >| .ruby-version - name: Set up Ruby - uses: ruby/setup-ruby@7bae1d00b5db9166f4f0fc47985a3a5702cb58f0 + uses: ruby/setup-ruby@98aefb3c83eea830993080938ed245dc8e2b843b with: bundler-cache: true rubygems: latest From 1f5d3b211410e26f2892be4dd4dcc96e5990edb7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Nov 2024 19:42:30 +0000 Subject: [PATCH 097/180] Bump actionview from 7.1.4.1 to 7.1.5 Bumps [actionview](https://github.com/rails/rails) from 7.1.4.1 to 7.1.5. - [Release notes](https://github.com/rails/rails/releases) - [Changelog](https://github.com/rails/rails/blob/v7.2.2/actionview/CHANGELOG.md) - [Commits](https://github.com/rails/rails/compare/v7.1.4.1...v7.1.5) --- updated-dependencies: - dependency-name: actionview dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 0bb93e08..92ca7591 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -9,24 +9,28 @@ PATH GEM remote: https://rubygems.org/ specs: - actionview (7.1.4.1) - activesupport (= 7.1.4.1) + actionview (7.1.5) + activesupport (= 7.1.5) builder (~> 3.1) erubi (~> 1.11) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - activesupport (7.1.4.1) + activesupport (7.1.5) base64 + benchmark (>= 0.3) bigdecimal concurrent-ruby (~> 1.0, >= 1.0.2) connection_pool (>= 2.2.5) drb i18n (>= 1.6, < 2) + logger (>= 1.4.2) minitest (>= 5.1) mutex_m + securerandom (>= 0.3) tzinfo (~> 2.0) ast (2.4.2) base64 (0.2.0) + benchmark (0.3.0) bigdecimal (3.1.8) builder (3.3.0) concurrent-ruby (1.3.4) @@ -38,7 +42,8 @@ GEM concurrent-ruby (~> 1.0) json (2.7.2) language_server-protocol (3.17.0.3) - loofah (2.22.0) + logger (1.6.1) + loofah (2.23.1) crass (~> 1.0.2) nokogiri (>= 1.12.0) mini_portile2 (2.8.7) @@ -90,6 +95,7 @@ GEM rubocop (>= 1.52.0, < 2.0) rubocop-ast (>= 1.31.1, < 2.0) ruby-progressbar (1.13.0) + securerandom (0.3.1) tzinfo (2.0.6) concurrent-ruby (~> 1.0) unicode-display_width (2.6.0) From 3b438a5a0bbb8c9f86ef542164cbd5ae7be9dedd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Nov 2024 19:38:45 +0000 Subject: [PATCH 098/180] Bump ruby/setup-ruby from 1.198.0 to 1.200.0 Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.198.0 to 1.200.0. - [Release notes](https://github.com/ruby/setup-ruby/releases) - [Changelog](https://github.com/ruby/setup-ruby/blob/master/release.rb) - [Commits](https://github.com/ruby/setup-ruby/compare/98aefb3c83eea830993080938ed245dc8e2b843b...217c988b8c2bf2bacb2d5c78a7e7b18f8c34daed) --- updated-dependencies: - dependency-name: ruby/setup-ruby dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0b109a2d..0f16ed41 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: - name: Update .ruby-version with matrix value run: echo "${{ matrix.ruby_version }}" >| .ruby-version - name: Set up Ruby - uses: ruby/setup-ruby@98aefb3c83eea830993080938ed245dc8e2b843b + uses: ruby/setup-ruby@217c988b8c2bf2bacb2d5c78a7e7b18f8c34daed with: bundler-cache: true rubygems: latest From 7115cdfba6135635d26a9908460b807e7fe6c90f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Nov 2024 21:42:32 +0000 Subject: [PATCH 099/180] Bump rubocop from 1.67.0 to 1.68.0 Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.67.0 to 1.68.0. - [Release notes](https://github.com/rubocop/rubocop/releases) - [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop/compare/v1.67.0...v1.68.0) --- updated-dependencies: - dependency-name: rubocop dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 097c3dce..5d46e10e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -40,7 +40,7 @@ GEM erubi (1.13.0) i18n (1.14.6) concurrent-ruby (~> 1.0) - json (2.7.4) + json (2.7.6) language_server-protocol (3.17.0.3) logger (1.6.1) loofah (2.23.1) @@ -59,7 +59,7 @@ GEM nokogiri (1.16.7-x86_64-linux) racc (~> 1.4) parallel (1.26.3) - parser (3.3.5.0) + parser (3.3.6.0) ast (~> 2.4.1) racc racc (1.8.1) @@ -74,7 +74,7 @@ GEM rainbow (3.1.1) rake (13.2.1) regexp_parser (2.9.2) - rubocop (1.67.0) + rubocop (1.68.0) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) @@ -84,7 +84,7 @@ GEM rubocop-ast (>= 1.32.2, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.32.3) + rubocop-ast (1.34.0) parser (>= 3.3.1.0) rubocop-performance (1.22.1) rubocop (>= 1.48.1, < 2.0) From 224772c2b7a77836fa1bfd94bc25f2a437973c25 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Nov 2024 11:49:35 -0800 Subject: [PATCH 100/180] Bump rubocop-performance from 1.22.1 to 1.23.0 (#210) Bumps [rubocop-performance](https://github.com/rubocop/rubocop-performance) from 1.22.1 to 1.23.0. - [Release notes](https://github.com/rubocop/rubocop-performance/releases) - [Changelog](https://github.com/rubocop/rubocop-performance/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop-performance/compare/v1.22.1...v1.23.0) --- updated-dependencies: - dependency-name: rubocop-performance dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Gemfile.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 5d46e10e..be3d0b60 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -40,7 +40,7 @@ GEM erubi (1.13.0) i18n (1.14.6) concurrent-ruby (~> 1.0) - json (2.7.6) + json (2.8.2) language_server-protocol (3.17.0.3) logger (1.6.1) loofah (2.23.1) @@ -84,9 +84,9 @@ GEM rubocop-ast (>= 1.32.2, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.34.0) + rubocop-ast (1.36.1) parser (>= 3.3.1.0) - rubocop-performance (1.22.1) + rubocop-performance (1.23.0) rubocop (>= 1.48.1, < 2.0) rubocop-ast (>= 1.31.1, < 2.0) rubocop-rails (2.27.0) From 6fcff2d3c2369b91a4d5193a771b218d5185324b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Nov 2024 11:49:56 -0800 Subject: [PATCH 101/180] Bump ruby/setup-ruby from 1.200.0 to 1.202.0 (#209) Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.200.0 to 1.202.0. - [Release notes](https://github.com/ruby/setup-ruby/releases) - [Changelog](https://github.com/ruby/setup-ruby/blob/master/release.rb) - [Commits](https://github.com/ruby/setup-ruby/compare/217c988b8c2bf2bacb2d5c78a7e7b18f8c34daed...a2bbe5b1b236842c1cb7dd11e8e3b51e0a616acc) --- updated-dependencies: - dependency-name: ruby/setup-ruby dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0f16ed41..bd713532 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: - name: Update .ruby-version with matrix value run: echo "${{ matrix.ruby_version }}" >| .ruby-version - name: Set up Ruby - uses: ruby/setup-ruby@217c988b8c2bf2bacb2d5c78a7e7b18f8c34daed + uses: ruby/setup-ruby@a2bbe5b1b236842c1cb7dd11e8e3b51e0a616acc with: bundler-cache: true rubygems: latest From 6eba9eb1be45c64db1ae25ce0751b8efe5f80db8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Dec 2024 21:15:51 +0000 Subject: [PATCH 102/180] Bump rubocop from 1.68.0 to 1.69.0 Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.68.0 to 1.69.0. - [Release notes](https://github.com/rubocop/rubocop/releases) - [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop/compare/v1.68.0...v1.69.0) --- updated-dependencies: - dependency-name: rubocop dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index be3d0b60..f4affe44 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -73,18 +73,18 @@ GEM nokogiri (~> 1.14) rainbow (3.1.1) rake (13.2.1) - regexp_parser (2.9.2) - rubocop (1.68.0) + regexp_parser (2.9.3) + rubocop (1.69.0) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 2.4, < 3.0) - rubocop-ast (>= 1.32.2, < 2.0) + rubocop-ast (>= 1.36.1, < 2.0) ruby-progressbar (~> 1.7) - unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.36.1) + unicode-display_width (>= 2.4.0, < 4.0) + rubocop-ast (1.36.2) parser (>= 3.3.1.0) rubocop-performance (1.23.0) rubocop (>= 1.48.1, < 2.0) @@ -98,7 +98,9 @@ GEM securerandom (0.3.1) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - unicode-display_width (2.6.0) + unicode-display_width (3.1.2) + unicode-emoji (~> 4.0, >= 4.0.4) + unicode-emoji (4.0.4) PLATFORMS arm64-darwin-21 From 377b278a0b08c5021b8fd6dfbbb11617f8a7453d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 13 Dec 2024 10:07:28 -0800 Subject: [PATCH 103/180] Bump rails-html-sanitizer from 1.6.0 to 1.6.1 in the bundler group (#213) Bumps the bundler group with 1 update: [rails-html-sanitizer](https://github.com/rails/rails-html-sanitizer). Updates `rails-html-sanitizer` from 1.6.0 to 1.6.1 - [Release notes](https://github.com/rails/rails-html-sanitizer/releases) - [Changelog](https://github.com/rails/rails-html-sanitizer/blob/main/CHANGELOG.md) - [Commits](https://github.com/rails/rails-html-sanitizer/compare/v1.6.0...v1.6.1) --- updated-dependencies: - dependency-name: rails-html-sanitizer dependency-type: indirect dependency-group: bundler ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Gemfile.lock | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index f4affe44..dd366f65 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -46,17 +46,17 @@ GEM loofah (2.23.1) crass (~> 1.0.2) nokogiri (>= 1.12.0) - mini_portile2 (2.8.7) + mini_portile2 (2.8.8) minitest (5.25.1) mutex_m (0.2.0) - nokogiri (1.16.7) + nokogiri (1.16.8) mini_portile2 (~> 2.8.2) racc (~> 1.4) - nokogiri (1.16.7-arm64-darwin) + nokogiri (1.16.8-arm64-darwin) racc (~> 1.4) - nokogiri (1.16.7-x86_64-darwin) + nokogiri (1.16.8-x86_64-darwin) racc (~> 1.4) - nokogiri (1.16.7-x86_64-linux) + nokogiri (1.16.8-x86_64-linux) racc (~> 1.4) parallel (1.26.3) parser (3.3.6.0) @@ -68,9 +68,9 @@ GEM activesupport (>= 5.0.0) minitest nokogiri (>= 1.6) - rails-html-sanitizer (1.6.0) + rails-html-sanitizer (1.6.1) loofah (~> 2.21) - nokogiri (~> 1.14) + nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0) rainbow (3.1.1) rake (13.2.1) regexp_parser (2.9.3) From c74844d777cf4d2ff60dc869c1d13ca635518e13 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Dec 2024 11:53:04 -0800 Subject: [PATCH 104/180] Bump minitest from 5.25.1 to 5.25.4 (#214) Bumps [minitest](https://github.com/minitest/minitest) from 5.25.1 to 5.25.4. - [Changelog](https://github.com/minitest/minitest/blob/master/History.rdoc) - [Commits](https://github.com/minitest/minitest/compare/v5.25.1...v5.25.4) --- updated-dependencies: - dependency-name: minitest dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index dd366f65..c3751bb5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -47,7 +47,7 @@ GEM crass (~> 1.0.2) nokogiri (>= 1.12.0) mini_portile2 (2.8.8) - minitest (5.25.1) + minitest (5.25.4) mutex_m (0.2.0) nokogiri (1.16.8) mini_portile2 (~> 2.8.2) From 1fca1c073edf5be47b06ecc8470ca3b27c59ffa3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Dec 2024 11:53:25 -0800 Subject: [PATCH 105/180] Bump ruby/setup-ruby from 1.202.0 to 1.204.0 (#217) Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.202.0 to 1.204.0. - [Release notes](https://github.com/ruby/setup-ruby/releases) - [Changelog](https://github.com/ruby/setup-ruby/blob/master/release.rb) - [Commits](https://github.com/ruby/setup-ruby/compare/a2bbe5b1b236842c1cb7dd11e8e3b51e0a616acc...401c19e14f474b54450cd3905bb8b86e2c8509cf) --- updated-dependencies: - dependency-name: ruby/setup-ruby dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bd713532..e8c7d7de 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: - name: Update .ruby-version with matrix value run: echo "${{ matrix.ruby_version }}" >| .ruby-version - name: Set up Ruby - uses: ruby/setup-ruby@a2bbe5b1b236842c1cb7dd11e8e3b51e0a616acc + uses: ruby/setup-ruby@401c19e14f474b54450cd3905bb8b86e2c8509cf with: bundler-cache: true rubygems: latest From 29f4a3fb68e030c212402e732a084dbecf844f57 Mon Sep 17 00:00:00 2001 From: "Ben Sheldon [he/him]" Date: Mon, 16 Dec 2024 12:03:50 -0800 Subject: [PATCH 106/180] Remove "rubygems: latest" from setup-ruby workflow (#220) --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e8c7d7de..ff46a6f8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,6 +19,5 @@ jobs: uses: ruby/setup-ruby@401c19e14f474b54450cd3905bb8b86e2c8509cf with: bundler-cache: true - rubygems: latest - name: Run tests run: bundle exec rake From 025afe1c03e6a610fec413b4456c49df9d724696 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Dec 2024 13:42:39 -0800 Subject: [PATCH 107/180] Bump rubocop from 1.69.0 to 1.69.2 (#218) Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.69.0 to 1.69.2. - [Release notes](https://github.com/rubocop/rubocop/releases) - [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop/compare/v1.69.0...v1.69.2) --- updated-dependencies: - dependency-name: rubocop dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Gemfile.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index c3751bb5..8c67f411 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -40,7 +40,7 @@ GEM erubi (1.13.0) i18n (1.14.6) concurrent-ruby (~> 1.0) - json (2.8.2) + json (2.9.0) language_server-protocol (3.17.0.3) logger (1.6.1) loofah (2.23.1) @@ -74,17 +74,17 @@ GEM rainbow (3.1.1) rake (13.2.1) regexp_parser (2.9.3) - rubocop (1.69.0) + rubocop (1.69.2) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) - regexp_parser (>= 2.4, < 3.0) - rubocop-ast (>= 1.36.1, < 2.0) + regexp_parser (>= 2.9.3, < 3.0) + rubocop-ast (>= 1.36.2, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 4.0) - rubocop-ast (1.36.2) + rubocop-ast (1.37.0) parser (>= 3.3.1.0) rubocop-performance (1.23.0) rubocop (>= 1.48.1, < 2.0) From bc3ebe718a09a764e450cf23918cee600ff751ad Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Dec 2024 13:42:59 -0800 Subject: [PATCH 108/180] Bump actionview from 7.1.5 to 7.1.5.1 (#219) Bumps [actionview](https://github.com/rails/rails) from 7.1.5 to 7.1.5.1. - [Release notes](https://github.com/rails/rails/releases) - [Changelog](https://github.com/rails/rails/blob/v8.0.1/actionview/CHANGELOG.md) - [Commits](https://github.com/rails/rails/compare/v7.1.5...v7.1.5.1) --- updated-dependencies: - dependency-name: actionview dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Gemfile.lock | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 8c67f411..9cbc1838 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -9,13 +9,13 @@ PATH GEM remote: https://rubygems.org/ specs: - actionview (7.1.5) - activesupport (= 7.1.5) + actionview (7.1.5.1) + activesupport (= 7.1.5.1) builder (~> 3.1) erubi (~> 1.11) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - activesupport (7.1.5) + activesupport (7.1.5.1) base64 benchmark (>= 0.3) bigdecimal @@ -30,7 +30,7 @@ GEM tzinfo (~> 2.0) ast (2.4.2) base64 (0.2.0) - benchmark (0.3.0) + benchmark (0.4.0) bigdecimal (3.1.8) builder (3.3.0) concurrent-ruby (1.3.4) @@ -42,21 +42,21 @@ GEM concurrent-ruby (~> 1.0) json (2.9.0) language_server-protocol (3.17.0.3) - logger (1.6.1) + logger (1.6.3) loofah (2.23.1) crass (~> 1.0.2) nokogiri (>= 1.12.0) mini_portile2 (2.8.8) minitest (5.25.4) - mutex_m (0.2.0) - nokogiri (1.16.8) + mutex_m (0.3.0) + nokogiri (1.17.2) mini_portile2 (~> 2.8.2) racc (~> 1.4) - nokogiri (1.16.8-arm64-darwin) + nokogiri (1.17.2-arm64-darwin) racc (~> 1.4) - nokogiri (1.16.8-x86_64-darwin) + nokogiri (1.17.2-x86_64-darwin) racc (~> 1.4) - nokogiri (1.16.8-x86_64-linux) + nokogiri (1.17.2-x86_64-linux) racc (~> 1.4) parallel (1.26.3) parser (3.3.6.0) @@ -68,7 +68,7 @@ GEM activesupport (>= 5.0.0) minitest nokogiri (>= 1.6) - rails-html-sanitizer (1.6.1) + rails-html-sanitizer (1.6.2) loofah (~> 2.21) nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0) rainbow (3.1.1) @@ -95,7 +95,7 @@ GEM rubocop (>= 1.52.0, < 2.0) rubocop-ast (>= 1.31.1, < 2.0) ruby-progressbar (1.13.0) - securerandom (0.3.1) + securerandom (0.3.2) tzinfo (2.0.6) concurrent-ruby (~> 1.0) unicode-display_width (3.1.2) From 15f767f58abdb84a1f28d9cd1bd7ecd5c18acea0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 31 Dec 2024 19:06:38 +0000 Subject: [PATCH 109/180] Bump ruby/setup-ruby from 1.204.0 to 1.207.0 Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.204.0 to 1.207.0. - [Release notes](https://github.com/ruby/setup-ruby/releases) - [Changelog](https://github.com/ruby/setup-ruby/blob/master/release.rb) - [Commits](https://github.com/ruby/setup-ruby/compare/401c19e14f474b54450cd3905bb8b86e2c8509cf...4a9ddd6f338a97768b8006bf671dfbad383215f4) --- updated-dependencies: - dependency-name: ruby/setup-ruby dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ff46a6f8..746ca47e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: - name: Update .ruby-version with matrix value run: echo "${{ matrix.ruby_version }}" >| .ruby-version - name: Set up Ruby - uses: ruby/setup-ruby@401c19e14f474b54450cd3905bb8b86e2c8509cf + uses: ruby/setup-ruby@4a9ddd6f338a97768b8006bf671dfbad383215f4 with: bundler-cache: true - name: Run tests From 5c532e1d1fcd4525ae10263ac5ca902dfb3ed23e Mon Sep 17 00:00:00 2001 From: Sam Partington Date: Wed, 8 Jan 2025 17:06:24 +0000 Subject: [PATCH 110/180] Fix link to ParenthesesAsGroupedExpression --- STYLEGUIDE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/STYLEGUIDE.md b/STYLEGUIDE.md index 758651b6..6cb942d1 100644 --- a/STYLEGUIDE.md +++ b/STYLEGUIDE.md @@ -678,7 +678,7 @@ end * Never put a space between a method name and the opening parenthesis. [[link](#no-spaces-method-parens)] - * RuboCop rule: Style/ParenthesesAsGroupedExpression + * RuboCop rule: Lint/ParenthesesAsGroupedExpression ``` ruby # bad From 21882c80908c159389d02a2ca923062d6cadbf7d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Jan 2025 19:43:57 +0000 Subject: [PATCH 111/180] Bump rubocop from 1.69.2 to 1.70.0 Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.69.2 to 1.70.0. - [Release notes](https://github.com/rubocop/rubocop/releases) - [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop/compare/v1.69.2...v1.70.0) --- updated-dependencies: - dependency-name: rubocop dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 9cbc1838..a3999134 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -40,7 +40,7 @@ GEM erubi (1.13.0) i18n (1.14.6) concurrent-ruby (~> 1.0) - json (2.9.0) + json (2.9.1) language_server-protocol (3.17.0.3) logger (1.6.3) loofah (2.23.1) @@ -73,8 +73,8 @@ GEM nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0) rainbow (3.1.1) rake (13.2.1) - regexp_parser (2.9.3) - rubocop (1.69.2) + regexp_parser (2.10.0) + rubocop (1.70.0) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) @@ -98,7 +98,7 @@ GEM securerandom (0.3.2) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - unicode-display_width (3.1.2) + unicode-display_width (3.1.4) unicode-emoji (~> 4.0, >= 4.0.4) unicode-emoji (4.0.4) From 7ff8441911ca0d783858e097eac441b35fce9b3b Mon Sep 17 00:00:00 2001 From: Issy Long Date: Thu, 16 Jan 2025 15:27:44 +0000 Subject: [PATCH 112/180] Enable `Layout/SpaceInsideHashLiteralBraces` - This is part of our styleguide and was enabled in `github/github` in 2022, so let's make it the default. --- config/default.yml | 3 ++- test/test_insecure_hash_algorithm.rb | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/config/default.yml b/config/default.yml index ee641dfd..52d44625 100644 --- a/config/default.yml +++ b/config/default.yml @@ -331,7 +331,8 @@ Layout/SpaceInsideBlockBraces: Enabled: true Layout/SpaceInsideHashLiteralBraces: - Enabled: false + Enabled: true + StyleGuide: https://github.com/github/rubocop-github/blob/main/STYLEGUIDE.md#spaces-operators Layout/SpaceInsideParens: Enabled: true diff --git a/test/test_insecure_hash_algorithm.rb b/test/test_insecure_hash_algorithm.rb index 6e0277f3..317562e1 100644 --- a/test/test_insecure_hash_algorithm.rb +++ b/test/test_insecure_hash_algorithm.rb @@ -10,7 +10,7 @@ def cop_class end def make_cop(allowed:) - config = RuboCop::Config.new({"GitHub/InsecureHashAlgorithm" => {"Allowed" => allowed}}) + config = RuboCop::Config.new({ "GitHub/InsecureHashAlgorithm" => { "Allowed" => allowed } }) cop_class.new(config) end From aa3351573bc9b5a5e4059e2e22870a13c446dc6c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 16 Jan 2025 15:36:42 +0000 Subject: [PATCH 113/180] Bump rubocop-rails from 2.27.0 to 2.28.0 Bumps [rubocop-rails](https://github.com/rubocop/rubocop-rails) from 2.27.0 to 2.28.0. - [Release notes](https://github.com/rubocop/rubocop-rails/releases) - [Changelog](https://github.com/rubocop/rubocop-rails/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop-rails/compare/v2.27.0...v2.28.0) --- updated-dependencies: - dependency-name: rubocop-rails dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index a3999134..b04b605a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -31,10 +31,10 @@ GEM ast (2.4.2) base64 (0.2.0) benchmark (0.4.0) - bigdecimal (3.1.8) + bigdecimal (3.1.9) builder (3.3.0) - concurrent-ruby (1.3.4) - connection_pool (2.4.1) + concurrent-ruby (1.3.5) + connection_pool (2.5.0) crass (1.0.6) drb (2.2.1) erubi (1.13.0) @@ -42,7 +42,7 @@ GEM concurrent-ruby (~> 1.0) json (2.9.1) language_server-protocol (3.17.0.3) - logger (1.6.3) + logger (1.6.5) loofah (2.23.1) crass (~> 1.0.2) nokogiri (>= 1.12.0) @@ -59,7 +59,7 @@ GEM nokogiri (1.17.2-x86_64-linux) racc (~> 1.4) parallel (1.26.3) - parser (3.3.6.0) + parser (3.3.7.0) ast (~> 2.4.1) racc racc (1.8.1) @@ -89,7 +89,7 @@ GEM rubocop-performance (1.23.0) rubocop (>= 1.48.1, < 2.0) rubocop-ast (>= 1.31.1, < 2.0) - rubocop-rails (2.27.0) + rubocop-rails (2.28.0) activesupport (>= 4.2.0) rack (>= 1.1) rubocop (>= 1.52.0, < 2.0) From f2c4319b4d16eeafe6dba2f28bcc634282fc588f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 16 Jan 2025 15:38:56 +0000 Subject: [PATCH 114/180] Bump rubocop-performance from 1.23.0 to 1.23.1 Bumps [rubocop-performance](https://github.com/rubocop/rubocop-performance) from 1.23.0 to 1.23.1. - [Release notes](https://github.com/rubocop/rubocop-performance/releases) - [Changelog](https://github.com/rubocop/rubocop-performance/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop-performance/compare/v1.23.0...v1.23.1) --- updated-dependencies: - dependency-name: rubocop-performance dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index b04b605a..86331506 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -86,7 +86,7 @@ GEM unicode-display_width (>= 2.4.0, < 4.0) rubocop-ast (1.37.0) parser (>= 3.3.1.0) - rubocop-performance (1.23.0) + rubocop-performance (1.23.1) rubocop (>= 1.48.1, < 2.0) rubocop-ast (>= 1.31.1, < 2.0) rubocop-rails (2.28.0) From 3752ea72a14b6c07a553d0ce6940fffe82767d05 Mon Sep 17 00:00:00 2001 From: Issy Long Date: Thu, 16 Jan 2025 15:47:01 +0000 Subject: [PATCH 115/180] Add the pending cops from the new RuboCop versions --- config/default_pending.yml | 44 ++++++++++++++++++++++++++++++++++++++ config/rails_pending.yml | 4 ++++ 2 files changed, 48 insertions(+) diff --git a/config/default_pending.yml b/config/default_pending.yml index 9d189036..5ae412d3 100644 --- a/config/default_pending.yml +++ b/config/default_pending.yml @@ -70,3 +70,47 @@ Style/YAMLFileRead: # new in 1.53 Enabled: false Performance/MapMethodChain: # new in 1.19 Enabled: false +Gemspec/AddRuntimeDependency: # new in 1.65 + Enabled: false +Lint/ConstantReassignment: # new in 1.70 + Enabled: false +Lint/DuplicateSetElement: # new in 1.67 + Enabled: false +Lint/HashNewWithKeywordArgumentsAsDefault: # new in 1.69 + Enabled: false +Lint/NumericOperationWithConstantResult: # new in 1.69 + Enabled: false +Lint/SharedMutableDefault: # new in 1.70 + Enabled: false +Lint/UnescapedBracketInRegexp: # new in 1.68 + Enabled: false +Lint/UselessDefined: # new in 1.69 + Enabled: false +Lint/UselessNumericOperation: # new in 1.66 + Enabled: false +Style/AmbiguousEndlessMethodDefinition: # new in 1.68 + Enabled: false +Style/BitwisePredicate: # new in 1.68 + Enabled: false +Style/CombinableDefined: # new in 1.68 + Enabled: false +Style/DigChain: # new in 1.69 + Enabled: false +Style/FileNull: # new in 1.69 + Enabled: false +Style/FileTouch: # new in 1.69 + Enabled: false +Style/ItAssignment: # new in 1.70 + Enabled: false +Style/KeywordArgumentsMerging: # new in 1.68 + Enabled: false +Style/RedundantInterpolationUnfreeze: # new in 1.66 + Enabled: false +Style/SafeNavigationChainLength: # new in 1.68 + Enabled: false +Style/SendWithLiteralMethodName: # new in 1.64 + Enabled: false +Style/SuperArguments: # new in 1.64 + Enabled: false +Performance/StringBytesize: # new in 1.23 + Enabled: false diff --git a/config/rails_pending.yml b/config/rails_pending.yml index 3e9582d9..941a743c 100644 --- a/config/rails_pending.yml +++ b/config/rails_pending.yml @@ -96,3 +96,7 @@ Rails/ThreeStateBooleanColumn: # new in 2.19 Enabled: false Rails/UnusedRenderContent: # new in 2.21 Enabled: false +Rails/EnumSyntax: # new in 2.26 + Enabled: false +Rails/WhereRange: # new in 2.25 + Enabled: false From cfaa39dbe409f212fe9326a7a3177717edb05fa0 Mon Sep 17 00:00:00 2001 From: Issy Long Date: Thu, 16 Jan 2025 15:49:51 +0000 Subject: [PATCH 116/180] Bump to v0.22.0 --- CHANGELOG.md | 4 ++-- Gemfile.lock | 2 +- rubocop-github.gemspec | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b3297896..bf2db2f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,8 @@ # rubocop-github -## Unreleased +## v0.22.0 -- Update Gemspec `required_ruby_version` to `>= 3.0.0` +- Read the automatic release notes on [the /releases page for this gem](https://github.com/github/rubocop-github/releases). ## v0.21.0 diff --git a/Gemfile.lock b/Gemfile.lock index 86331506..5fe07b6d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - rubocop-github (0.21.0) + rubocop-github (0.22.0) rubocop (>= 1.37) rubocop-performance (>= 1.15) rubocop-rails (>= 2.17) diff --git a/rubocop-github.gemspec b/rubocop-github.gemspec index 66d16540..5edd7470 100644 --- a/rubocop-github.gemspec +++ b/rubocop-github.gemspec @@ -2,7 +2,7 @@ Gem::Specification.new do |s| s.name = "rubocop-github" - s.version = "0.21.0" + s.version = "0.22.0" s.summary = "RuboCop GitHub" s.description = "Code style checking for GitHub Ruby repositories " s.homepage = "https://github.com/github/rubocop-github" From 5096928b3558b1e5c0f8ba2ec8e4597651b3d857 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Jan 2025 19:36:24 +0000 Subject: [PATCH 117/180] Bump ruby/setup-ruby from 1.207.0 to 1.213.0 Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.207.0 to 1.213.0. - [Release notes](https://github.com/ruby/setup-ruby/releases) - [Changelog](https://github.com/ruby/setup-ruby/blob/master/release.rb) - [Commits](https://github.com/ruby/setup-ruby/compare/4a9ddd6f338a97768b8006bf671dfbad383215f4...28c4deda893d5a96a6b2d958c5b47fc18d65c9d3) --- updated-dependencies: - dependency-name: ruby/setup-ruby dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 746ca47e..df847934 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: - name: Update .ruby-version with matrix value run: echo "${{ matrix.ruby_version }}" >| .ruby-version - name: Set up Ruby - uses: ruby/setup-ruby@4a9ddd6f338a97768b8006bf671dfbad383215f4 + uses: ruby/setup-ruby@28c4deda893d5a96a6b2d958c5b47fc18d65c9d3 with: bundler-cache: true - name: Run tests From b1531ee7bad11509a4f7874b40143c3c4581d777 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Jan 2025 19:39:05 +0000 Subject: [PATCH 118/180] Bump rubocop-rails from 2.28.0 to 2.29.0 Bumps [rubocop-rails](https://github.com/rubocop/rubocop-rails) from 2.28.0 to 2.29.0. - [Release notes](https://github.com/rubocop/rubocop-rails/releases) - [Changelog](https://github.com/rubocop/rubocop-rails/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop-rails/compare/v2.28.0...v2.29.0) --- updated-dependencies: - dependency-name: rubocop-rails dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 5fe07b6d..005e603d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -38,7 +38,7 @@ GEM crass (1.0.6) drb (2.2.1) erubi (1.13.0) - i18n (1.14.6) + i18n (1.14.7) concurrent-ruby (~> 1.0) json (2.9.1) language_server-protocol (3.17.0.3) @@ -89,7 +89,7 @@ GEM rubocop-performance (1.23.1) rubocop (>= 1.48.1, < 2.0) rubocop-ast (>= 1.31.1, < 2.0) - rubocop-rails (2.28.0) + rubocop-rails (2.29.0) activesupport (>= 4.2.0) rack (>= 1.1) rubocop (>= 1.52.0, < 2.0) From 480923fc605d592e5e9c7ba4cd05718e4eadbe59 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Jan 2025 19:17:44 +0000 Subject: [PATCH 119/180] Bump rubocop from 1.70.0 to 1.71.0 Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.70.0 to 1.71.0. - [Release notes](https://github.com/rubocop/rubocop/releases) - [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop/compare/v1.70.0...v1.71.0) --- updated-dependencies: - dependency-name: rubocop dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 005e603d..6ce79196 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -41,7 +41,7 @@ GEM i18n (1.14.7) concurrent-ruby (~> 1.0) json (2.9.1) - language_server-protocol (3.17.0.3) + language_server-protocol (3.17.0.4) logger (1.6.5) loofah (2.23.1) crass (~> 1.0.2) @@ -74,7 +74,7 @@ GEM rainbow (3.1.1) rake (13.2.1) regexp_parser (2.10.0) - rubocop (1.70.0) + rubocop (1.71.0) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) @@ -84,7 +84,7 @@ GEM rubocop-ast (>= 1.36.2, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 4.0) - rubocop-ast (1.37.0) + rubocop-ast (1.38.0) parser (>= 3.3.1.0) rubocop-performance (1.23.1) rubocop (>= 1.48.1, < 2.0) From 9a3f0236dac6127c8a850262e1a47d4dbd316aea Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Jan 2025 19:23:36 +0000 Subject: [PATCH 120/180] Bump ruby/setup-ruby from 1.213.0 to 1.214.0 Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.213.0 to 1.214.0. - [Release notes](https://github.com/ruby/setup-ruby/releases) - [Changelog](https://github.com/ruby/setup-ruby/blob/master/release.rb) - [Commits](https://github.com/ruby/setup-ruby/compare/28c4deda893d5a96a6b2d958c5b47fc18d65c9d3...1287d2b408066abada82d5ad1c63652e758428d9) --- updated-dependencies: - dependency-name: ruby/setup-ruby dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index df847934..bdea9d5c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: - name: Update .ruby-version with matrix value run: echo "${{ matrix.ruby_version }}" >| .ruby-version - name: Set up Ruby - uses: ruby/setup-ruby@28c4deda893d5a96a6b2d958c5b47fc18d65c9d3 + uses: ruby/setup-ruby@1287d2b408066abada82d5ad1c63652e758428d9 with: bundler-cache: true - name: Run tests From 2db74f4e1d50482e3d79aa8da67a8d96adafac46 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Jan 2025 19:55:36 +0000 Subject: [PATCH 121/180] Bump rubocop-rails from 2.29.0 to 2.29.1 Bumps [rubocop-rails](https://github.com/rubocop/rubocop-rails) from 2.29.0 to 2.29.1. - [Release notes](https://github.com/rubocop/rubocop-rails/releases) - [Changelog](https://github.com/rubocop/rubocop-rails/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop-rails/compare/v2.29.0...v2.29.1) --- updated-dependencies: - dependency-name: rubocop-rails dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 6ce79196..3a46c864 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -89,7 +89,7 @@ GEM rubocop-performance (1.23.1) rubocop (>= 1.48.1, < 2.0) rubocop-ast (>= 1.31.1, < 2.0) - rubocop-rails (2.29.0) + rubocop-rails (2.29.1) activesupport (>= 4.2.0) rack (>= 1.1) rubocop (>= 1.52.0, < 2.0) From d72306d14854c39a74741a4c9f521885f964c4c1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 30 Jan 2025 13:43:19 -0800 Subject: [PATCH 122/180] Bump ruby/setup-ruby from 1.214.0 to 1.215.0 (#241) Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.214.0 to 1.215.0. - [Release notes](https://github.com/ruby/setup-ruby/releases) - [Changelog](https://github.com/ruby/setup-ruby/blob/master/release.rb) - [Commits](https://github.com/ruby/setup-ruby/compare/1287d2b408066abada82d5ad1c63652e758428d9...2654679fe7f7c29875c669398a8ec0791b8a64a1) --- updated-dependencies: - dependency-name: ruby/setup-ruby dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bdea9d5c..0cc5acc2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: - name: Update .ruby-version with matrix value run: echo "${{ matrix.ruby_version }}" >| .ruby-version - name: Set up Ruby - uses: ruby/setup-ruby@1287d2b408066abada82d5ad1c63652e758428d9 + uses: ruby/setup-ruby@2654679fe7f7c29875c669398a8ec0791b8a64a1 with: bundler-cache: true - name: Run tests From 7102696d38cc88edde679a45854e6a0238340de5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 5 Feb 2025 19:16:37 +0000 Subject: [PATCH 123/180] Bump ruby/setup-ruby from 1.215.0 to 1.217.0 Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.215.0 to 1.217.0. - [Release notes](https://github.com/ruby/setup-ruby/releases) - [Changelog](https://github.com/ruby/setup-ruby/blob/master/release.rb) - [Commits](https://github.com/ruby/setup-ruby/compare/2654679fe7f7c29875c669398a8ec0791b8a64a1...8711a86ab6f9aa72890da4123b2ef7283b6b22b6) --- updated-dependencies: - dependency-name: ruby/setup-ruby dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0cc5acc2..7ea71f56 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: - name: Update .ruby-version with matrix value run: echo "${{ matrix.ruby_version }}" >| .ruby-version - name: Set up Ruby - uses: ruby/setup-ruby@2654679fe7f7c29875c669398a8ec0791b8a64a1 + uses: ruby/setup-ruby@8711a86ab6f9aa72890da4123b2ef7283b6b22b6 with: bundler-cache: true - name: Run tests From 523d5a00b03b1627eed75430718d3c1c3e2375c2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 6 Feb 2025 19:34:22 +0000 Subject: [PATCH 124/180] Bump ruby/setup-ruby from 1.217.0 to 1.218.0 Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.217.0 to 1.218.0. - [Release notes](https://github.com/ruby/setup-ruby/releases) - [Changelog](https://github.com/ruby/setup-ruby/blob/master/release.rb) - [Commits](https://github.com/ruby/setup-ruby/compare/8711a86ab6f9aa72890da4123b2ef7283b6b22b6...d781c1b4ed31764801bfae177617bb0446f5ef8d) --- updated-dependencies: - dependency-name: ruby/setup-ruby dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7ea71f56..a102675b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: - name: Update .ruby-version with matrix value run: echo "${{ matrix.ruby_version }}" >| .ruby-version - name: Set up Ruby - uses: ruby/setup-ruby@8711a86ab6f9aa72890da4123b2ef7283b6b22b6 + uses: ruby/setup-ruby@d781c1b4ed31764801bfae177617bb0446f5ef8d with: bundler-cache: true - name: Run tests From 2a30b74f9733e9d95e4f70c79ee920de92b4ed36 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 13 Feb 2025 11:05:33 -0800 Subject: [PATCH 125/180] Bump rack from 3.1.8 to 3.1.10 in the bundler group (#246) Bumps the bundler group with 1 update: [rack](https://github.com/rack/rack). Updates `rack` from 3.1.8 to 3.1.10 - [Release notes](https://github.com/rack/rack/releases) - [Changelog](https://github.com/rack/rack/blob/main/CHANGELOG.md) - [Commits](https://github.com/rack/rack/compare/v3.1.8...v3.1.10) --- updated-dependencies: - dependency-name: rack dependency-type: indirect dependency-group: bundler ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 3a46c864..e1b5ed7e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -63,7 +63,7 @@ GEM ast (~> 2.4.1) racc racc (1.8.1) - rack (3.1.8) + rack (3.1.10) rails-dom-testing (2.2.0) activesupport (>= 5.0.0) minitest From f73303a4bd64d7dfd5f7028117702fdc6b270b03 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 13 Feb 2025 11:05:42 -0800 Subject: [PATCH 126/180] Bump ruby/setup-ruby from 1.218.0 to 1.219.0 (#247) Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.218.0 to 1.219.0. - [Release notes](https://github.com/ruby/setup-ruby/releases) - [Changelog](https://github.com/ruby/setup-ruby/blob/master/release.rb) - [Commits](https://github.com/ruby/setup-ruby/compare/d781c1b4ed31764801bfae177617bb0446f5ef8d...f2f42b7848feff522ffa488a5236ba0a73bccbdd) --- updated-dependencies: - dependency-name: ruby/setup-ruby dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a102675b..cb34c0f3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: - name: Update .ruby-version with matrix value run: echo "${{ matrix.ruby_version }}" >| .ruby-version - name: Set up Ruby - uses: ruby/setup-ruby@d781c1b4ed31764801bfae177617bb0446f5ef8d + uses: ruby/setup-ruby@f2f42b7848feff522ffa488a5236ba0a73bccbdd with: bundler-cache: true - name: Run tests From 996d11c1c1bb15c863ea4061ced00414ce965d4b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 13 Feb 2025 11:05:52 -0800 Subject: [PATCH 127/180] Bump rubocop from 1.71.0 to 1.71.2 (#245) Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.71.0 to 1.71.2. - [Release notes](https://github.com/rubocop/rubocop/releases) - [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop/compare/v1.71.0...v1.71.2) --- updated-dependencies: - dependency-name: rubocop dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Gemfile.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index e1b5ed7e..9063a4fd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -40,7 +40,7 @@ GEM erubi (1.13.0) i18n (1.14.7) concurrent-ruby (~> 1.0) - json (2.9.1) + json (2.10.0) language_server-protocol (3.17.0.4) logger (1.6.5) loofah (2.23.1) @@ -59,7 +59,7 @@ GEM nokogiri (1.17.2-x86_64-linux) racc (~> 1.4) parallel (1.26.3) - parser (3.3.7.0) + parser (3.3.7.1) ast (~> 2.4.1) racc racc (1.8.1) @@ -74,14 +74,14 @@ GEM rainbow (3.1.1) rake (13.2.1) regexp_parser (2.10.0) - rubocop (1.71.0) + rubocop (1.71.2) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 2.9.3, < 3.0) - rubocop-ast (>= 1.36.2, < 2.0) + rubocop-ast (>= 1.38.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 4.0) rubocop-ast (1.38.0) From 9807139da206957cd5ccfc744c3a2c0ad480070c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Feb 2025 19:54:00 +0000 Subject: [PATCH 128/180] Bump rubocop-rails from 2.29.1 to 2.30.1 Bumps [rubocop-rails](https://github.com/rubocop/rubocop-rails) from 2.29.1 to 2.30.1. - [Release notes](https://github.com/rubocop/rubocop-rails/releases) - [Changelog](https://github.com/rubocop/rubocop-rails/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop-rails/compare/v2.29.1...v2.30.1) --- updated-dependencies: - dependency-name: rubocop-rails dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 9063a4fd..9e02d7ea 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -40,9 +40,10 @@ GEM erubi (1.13.0) i18n (1.14.7) concurrent-ruby (~> 1.0) - json (2.10.0) + json (2.10.1) language_server-protocol (3.17.0.4) - logger (1.6.5) + lint_roller (1.1.0) + logger (1.6.6) loofah (2.23.1) crass (~> 1.0.2) nokogiri (>= 1.12.0) @@ -74,9 +75,10 @@ GEM rainbow (3.1.1) rake (13.2.1) regexp_parser (2.10.0) - rubocop (1.71.2) + rubocop (1.72.2) json (~> 2.3) - language_server-protocol (>= 3.17.0) + language_server-protocol (~> 3.17.0.2) + lint_roller (~> 1.1.0) parallel (~> 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) @@ -89,11 +91,12 @@ GEM rubocop-performance (1.23.1) rubocop (>= 1.48.1, < 2.0) rubocop-ast (>= 1.31.1, < 2.0) - rubocop-rails (2.29.1) + rubocop-rails (2.30.1) activesupport (>= 4.2.0) + lint_roller (~> 1.1) rack (>= 1.1) - rubocop (>= 1.52.0, < 2.0) - rubocop-ast (>= 1.31.1, < 2.0) + rubocop (>= 1.72.1, < 2.0) + rubocop-ast (>= 1.38.0, < 2.0) ruby-progressbar (1.13.0) securerandom (0.3.2) tzinfo (2.0.6) From 64d459f6e4afbefee0160bf5e7a0c18081dbb824 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 19 Feb 2025 12:54:22 -0800 Subject: [PATCH 129/180] Bump ruby/setup-ruby from 1.219.0 to 1.221.0 (#248) Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.219.0 to 1.221.0. - [Release notes](https://github.com/ruby/setup-ruby/releases) - [Changelog](https://github.com/ruby/setup-ruby/blob/master/release.rb) - [Commits](https://github.com/ruby/setup-ruby/compare/f2f42b7848feff522ffa488a5236ba0a73bccbdd...32110d4e311bd8996b2a82bf2a43b714ccc91777) --- updated-dependencies: - dependency-name: ruby/setup-ruby dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cb34c0f3..d3986798 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: - name: Update .ruby-version with matrix value run: echo "${{ matrix.ruby_version }}" >| .ruby-version - name: Set up Ruby - uses: ruby/setup-ruby@f2f42b7848feff522ffa488a5236ba0a73bccbdd + uses: ruby/setup-ruby@32110d4e311bd8996b2a82bf2a43b714ccc91777 with: bundler-cache: true - name: Run tests From a51f07d24ffe21429899de07ef76c9a23506fdc1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 19 Feb 2025 12:54:31 -0800 Subject: [PATCH 130/180] Bump rubocop-performance from 1.23.1 to 1.24.0 (#251) Bumps [rubocop-performance](https://github.com/rubocop/rubocop-performance) from 1.23.1 to 1.24.0. - [Release notes](https://github.com/rubocop/rubocop-performance/releases) - [Changelog](https://github.com/rubocop/rubocop-performance/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop-performance/compare/v1.23.1...v1.24.0) --- updated-dependencies: - dependency-name: rubocop-performance dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Gemfile.lock | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 9e02d7ea..46639226 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -88,9 +88,10 @@ GEM unicode-display_width (>= 2.4.0, < 4.0) rubocop-ast (1.38.0) parser (>= 3.3.1.0) - rubocop-performance (1.23.1) - rubocop (>= 1.48.1, < 2.0) - rubocop-ast (>= 1.31.1, < 2.0) + rubocop-performance (1.24.0) + lint_roller (~> 1.1) + rubocop (>= 1.72.1, < 2.0) + rubocop-ast (>= 1.38.0, < 2.0) rubocop-rails (2.30.1) activesupport (>= 4.2.0) lint_roller (~> 1.1) From 2aa67be21f6c7c0608d6e1ff92ff2df67d8f005e Mon Sep 17 00:00:00 2001 From: Grant Birkinbine Date: Fri, 21 Feb 2025 10:33:45 -0800 Subject: [PATCH 131/180] Automated Releases (#252) * add a new ci job to test builds * add a new ci job to run a linter * add a new ci job for automatically publishing new releases to RubyGems and GitHub Packages * use `lib/version.rb` for fetching the gem version to use * remove extra whitespace * add extra gem metadata * ensure that the CI job runs on PRs and pushes to `main` * update `ruby/setup-ruby` pins * move CODEOWNERS into `.github/` dir * fmt * update release docs * update status badges * add pin comment * only run on `workflow_dispatch` events for now * rename `ci` job to `test` * use "scripts to rule them all" pattern -> https://github.blog/engineering/scripts-to-rule-them-all/ * add missing bootstrap * add back push to main logic * only use `script/test` and `script/lint` for now --- CODEOWNERS => .github/CODEOWNERS | 0 .github/workflows/build.yml | 42 +++++++++++++++++++ .github/workflows/lint.yml | 26 ++++++++++++ .github/workflows/release.yml | 58 ++++++++++++++++++++++++++ .github/workflows/{ci.yml => test.yml} | 24 +++++++---- .gitignore | 1 + CONTRIBUTING.md | 15 +++---- README.md | 7 +++- lib/version.rb | 3 ++ rubocop-github.gemspec | 12 +++++- script/lint | 5 +++ script/test | 5 +++ 12 files changed, 177 insertions(+), 21 deletions(-) rename CODEOWNERS => .github/CODEOWNERS (100%) create mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/lint.yml create mode 100644 .github/workflows/release.yml rename .github/workflows/{ci.yml => test.yml} (65%) create mode 100644 lib/version.rb create mode 100755 script/lint create mode 100755 script/test diff --git a/CODEOWNERS b/.github/CODEOWNERS similarity index 100% rename from CODEOWNERS rename to .github/CODEOWNERS diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..1ae421c7 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,42 @@ +name: build + +on: + push: + branches: + - main + pull_request: + branches: + - main + workflow_call: + +permissions: + contents: read + +jobs: + build: + name: build + + strategy: + matrix: + os: [ubuntu-latest, macos-latest] + runs-on: ${{ matrix.os }} + + steps: + - name: checkout + uses: actions/checkout@v4 + + - uses: ruby/setup-ruby@32110d4e311bd8996b2a82bf2a43b714ccc91777 # pin@v1.221.0 + with: + bundler-cache: true + + - name: build + run: | + GEM_NAME=$(ls | grep gemspec | cut -d. -f1) + echo "Attempting to build gem $GEM_NAME..." + gem build $GEM_NAME + if [ $? -eq 0 ]; then + echo "Gem built successfully!" + else + echo "Gem build failed!" + exit 1 + fi diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 00000000..1df707db --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,26 @@ +name: lint + +on: + push: + branches: + - main + pull_request: + +permissions: + contents: read + +jobs: + lint: + name: lint + runs-on: ubuntu-latest + + steps: + - name: checkout + uses: actions/checkout@v4 + + - uses: ruby/setup-ruby@32110d4e311bd8996b2a82bf2a43b714ccc91777 # pin@v1.221.0 + with: + bundler-cache: true + + - name: lint + run: script/lint diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..513782d2 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,58 @@ +name: release + +on: + workflow_dispatch: + push: + branches: + - main + paths: + - lib/version.rb + +permissions: + contents: write + packages: write + +jobs: + release: + runs-on: ubuntu-latest + + steps: + - name: checkout + uses: actions/checkout@v4 + + - uses: ruby/setup-ruby@32110d4e311bd8996b2a82bf2a43b714ccc91777 # pin@v1.221.0 + with: + bundler-cache: true + + - name: lint + run: script/lint + + - name: test + run: script/test + + - name: set GEM_NAME from gemspec + run: echo "GEM_NAME=$(ls | grep gemspec | cut -d. -f1)" >> $GITHUB_ENV + + # builds the gem and saves the version to GITHUB_ENV + - name: build + run: echo "GEM_VERSION=$(gem build ${{ env.GEM_NAME }}.gemspec 2>&1 | grep Version | cut -d':' -f 2 | tr -d " \t\n\r")" >> $GITHUB_ENV + + - name: publish to GitHub packages + run: | + export OWNER=$( echo ${{ github.repository }} | cut -d "/" -f 1 ) + GEM_HOST_API_KEY=${{ secrets.GITHUB_TOKEN }} gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} ${{ env.GEM_NAME }}-${{ env.GEM_VERSION }}.gem + + - name: release + uses: ncipollo/release-action@2c591bcc8ecdcd2db72b97d6147f871fcd833ba5 # pin@v1.14.0 + with: + artifacts: "${{ env.GEM_NAME }}-${{ env.GEM_VERSION }}.gem" + tag: "v${{ env.GEM_VERSION }}" + generateReleaseNotes: true + + - name: publish to RubyGems + run: | + mkdir -p ~/.gem + echo -e "---\n:rubygems_api_key: ${{ secrets.RUBYGEMS_API_KEY }}" > ~/.gem/credentials + chmod 0600 ~/.gem/credentials + gem push ${{ env.GEM_NAME }}-${{ env.GEM_VERSION }}.gem + rm ~/.gem/credentials diff --git a/.github/workflows/ci.yml b/.github/workflows/test.yml similarity index 65% rename from .github/workflows/ci.yml rename to .github/workflows/test.yml index d3986798..7a95733d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/test.yml @@ -1,23 +1,31 @@ -name: CI +name: test + +on: + push: + branches: + - main + pull_request: + permissions: contents: read -on: pull_request - jobs: test: + runs-on: ubuntu-latest strategy: fail-fast: false matrix: ruby_version: ["3.0", "3.1", "3.2", "3.3"] - runs-on: ubuntu-latest + steps: - uses: actions/checkout@v4 + - name: Update .ruby-version with matrix value run: echo "${{ matrix.ruby_version }}" >| .ruby-version - - name: Set up Ruby - uses: ruby/setup-ruby@32110d4e311bd8996b2a82bf2a43b714ccc91777 + + - uses: ruby/setup-ruby@32110d4e311bd8996b2a82bf2a43b714ccc91777 # pin@v1.221.0 with: bundler-cache: true - - name: Run tests - run: bundle exec rake + + - name: test + run: script/test diff --git a/.gitignore b/.gitignore index fb280015..35b4f5bf 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ spec/reports test/tmp test/version_tmp tmp +bin/ # YARD artifacts .yardoc diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fcab75d4..72cf0a2c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,7 +4,6 @@ We welcome your contributions to the project. Thank you! Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms. - ## What to contribute This repository, `rubocop-github`, is part of a broader RuboCop ecosystem. @@ -50,12 +49,8 @@ Rubocop regularly releases new versions with new cops. We want to keep up to dat ### Releasing a new version -1. Update `rubocop-github.gemspec` with the next version number -1. Update the `CHANGELOG` with changes and contributor -1. Run `bundle` to update gem version contained in the lockfile -1. Make a commit: `Release v{VERSION}` -1. Tag the commit : `git tag v{VERSION}` -1. Create the package: `gem build rubocop-github.gemspec` -1. Push to GitHub: `git push origin && git push origin --tags` -1. Push to Rubygems: `gem push rubocop-github-{VERSION}.gem` -1. Publish a new release on GitHub: https://github.com/github/rubocop-github/releases/new +1. Update [`lib/version.rb`](lib/version.rb) with the next version number +2. Update the `CHANGELOG` with changes and contributor +3. Run `bundle` to update gem version contained in the lockfile +4. Commit your changes and open a pull request +5. When the pull request is approved and merged into `main`, the [`.github/workflows/release.yml`](.github/workflows/release.yml) workflow will automatically run to release the new version to RubyGems and GitHub Packages 🎉. diff --git a/README.md b/README.md index 678692b8..ed631b24 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,9 @@ -# RuboCop GitHub ![CI](https://github.com/github/rubocop-github/workflows/CI/badge.svg?event=push) +# RuboCop GitHub + +[![test](https://github.com/github/rubocop-github/actions/workflows/test.yml/badge.svg)](https://github.com/github/rubocop-github/actions/workflows/test.yml) +[![build](https://github.com/github/rubocop-github/actions/workflows/build.yml/badge.svg)](https://github.com/github/rubocop-github/actions/workflows/build.yml) +[![lint](https://github.com/github/rubocop-github/actions/workflows/lint.yml/badge.svg)](https://github.com/github/rubocop-github/actions/workflows/lint.yml) +[![release](https://github.com/github/rubocop-github/actions/workflows/release.yml/badge.svg)](https://github.com/github/rubocop-github/actions/workflows/release.yml) This repository provides recommended RuboCop configuration and additional Cops for use on GitHub open source and internal Ruby projects, and is the home of [GitHub's Ruby Style Guide](./STYLEGUIDE.md). diff --git a/lib/version.rb b/lib/version.rb new file mode 100644 index 00000000..3ed48bc6 --- /dev/null +++ b/lib/version.rb @@ -0,0 +1,3 @@ +# frozen_string_literal: true + +VERSION = "0.22.0" diff --git a/rubocop-github.gemspec b/rubocop-github.gemspec index 5edd7470..a7f53d19 100644 --- a/rubocop-github.gemspec +++ b/rubocop-github.gemspec @@ -1,13 +1,21 @@ # frozen_string_literal: true +require_relative "lib/version" + Gem::Specification.new do |s| s.name = "rubocop-github" - s.version = "0.22.0" + s.version = VERSION s.summary = "RuboCop GitHub" - s.description = "Code style checking for GitHub Ruby repositories " + s.description = "Code style checking for GitHub Ruby repositories" s.homepage = "https://github.com/github/rubocop-github" s.license = "MIT" + s.metadata = { + "source_code_uri" => "https://github.com/github/rubocop-github", + "documentation_uri" => "https://github.com/github/rubocop-github", + "bug_tracker_uri" => "https://github.com/github/rubocop-github/issues" + } + s.files = Dir["README.md", "STYLEGUIDE.md", "LICENSE", "config/*.yml", "lib/**/*.rb", "guides/*.md"] s.add_dependency "rubocop", ">= 1.37" diff --git a/script/lint b/script/lint new file mode 100755 index 00000000..4c06652f --- /dev/null +++ b/script/lint @@ -0,0 +1,5 @@ +#! /usr/bin/env bash + +set -e + +bundle exec rake rubocop diff --git a/script/test b/script/test new file mode 100755 index 00000000..05166157 --- /dev/null +++ b/script/test @@ -0,0 +1,5 @@ +#! /usr/bin/env bash + +set -e + +bundle exec rake test From a9f55586c803ed023b9f5beb05c21e61e53c15f2 Mon Sep 17 00:00:00 2001 From: GrantBirki Date: Fri, 21 Feb 2025 10:51:21 -0800 Subject: [PATCH 132/180] publish build attestations for the `rubocop-github` gem --- .github/workflows/release.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 513782d2..72db07ca 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,6 +11,8 @@ on: permissions: contents: write packages: write + id-token: write + attestations: write jobs: release: @@ -37,13 +39,17 @@ jobs: - name: build run: echo "GEM_VERSION=$(gem build ${{ env.GEM_NAME }}.gemspec 2>&1 | grep Version | cut -d':' -f 2 | tr -d " \t\n\r")" >> $GITHUB_ENV + - uses: actions/attest-build-provenance@520d128f165991a6c774bcb264f323e3d70747f4 # pin@v2 + with: + subject-path: "${{ env.GEM_NAME }}-${{ env.GEM_VERSION }}.gem" + - name: publish to GitHub packages run: | export OWNER=$( echo ${{ github.repository }} | cut -d "/" -f 1 ) GEM_HOST_API_KEY=${{ secrets.GITHUB_TOKEN }} gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} ${{ env.GEM_NAME }}-${{ env.GEM_VERSION }}.gem - name: release - uses: ncipollo/release-action@2c591bcc8ecdcd2db72b97d6147f871fcd833ba5 # pin@v1.14.0 + uses: ncipollo/release-action@cdcc88a9acf3ca41c16c37bb7d21b9ad48560d87 # pin@v1.15.0 with: artifacts: "${{ env.GEM_NAME }}-${{ env.GEM_VERSION }}.gem" tag: "v${{ env.GEM_VERSION }}" From 0ab8d3984ea627c9de7330db8fb8db69d5a2f1eb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2025 20:23:44 +0000 Subject: [PATCH 133/180] Bump rubocop-rails from 2.30.1 to 2.30.2 Bumps [rubocop-rails](https://github.com/rubocop/rubocop-rails) from 2.30.1 to 2.30.2. - [Release notes](https://github.com/rubocop/rubocop-rails/releases) - [Changelog](https://github.com/rubocop/rubocop-rails/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop-rails/compare/v2.30.1...v2.30.2) --- updated-dependencies: - dependency-name: rubocop-rails dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 46639226..9b458cd9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -92,7 +92,7 @@ GEM lint_roller (~> 1.1) rubocop (>= 1.72.1, < 2.0) rubocop-ast (>= 1.38.0, < 2.0) - rubocop-rails (2.30.1) + rubocop-rails (2.30.2) activesupport (>= 4.2.0) lint_roller (~> 1.1) rack (>= 1.1) From 7bacfb9723fde53161e0d82f110a25a1206a6afc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2025 21:15:01 +0000 Subject: [PATCH 134/180] Bump ncipollo/release-action from 1.14.0 to 1.16.0 Bumps [ncipollo/release-action](https://github.com/ncipollo/release-action) from 1.14.0 to 1.16.0. - [Release notes](https://github.com/ncipollo/release-action/releases) - [Commits](https://github.com/ncipollo/release-action/compare/2c591bcc8ecdcd2db72b97d6147f871fcd833ba5...440c8c1cb0ed28b9f43e4d1d670870f059653174) --- updated-dependencies: - dependency-name: ncipollo/release-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 72db07ca..89ccb6c1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -49,7 +49,7 @@ jobs: GEM_HOST_API_KEY=${{ secrets.GITHUB_TOKEN }} gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} ${{ env.GEM_NAME }}-${{ env.GEM_VERSION }}.gem - name: release - uses: ncipollo/release-action@cdcc88a9acf3ca41c16c37bb7d21b9ad48560d87 # pin@v1.15.0 + uses: ncipollo/release-action@440c8c1cb0ed28b9f43e4d1d670870f059653174 # pin@v1.16.0 with: artifacts: "${{ env.GEM_NAME }}-${{ env.GEM_VERSION }}.gem" tag: "v${{ env.GEM_VERSION }}" From 42c405a2d9b2e0809c4c45b9bfd9782e471f4365 Mon Sep 17 00:00:00 2001 From: GrantBirki Date: Mon, 24 Feb 2025 13:55:40 -0800 Subject: [PATCH 135/180] run `bundle update` to bump all the gems --- Gemfile.lock | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 9b458cd9..59dc2267 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -9,25 +9,25 @@ PATH GEM remote: https://rubygems.org/ specs: - actionview (7.1.5.1) - activesupport (= 7.1.5.1) + actionview (8.0.1) + activesupport (= 8.0.1) builder (~> 3.1) erubi (~> 1.11) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - activesupport (7.1.5.1) + activesupport (8.0.1) base64 benchmark (>= 0.3) bigdecimal - concurrent-ruby (~> 1.0, >= 1.0.2) + concurrent-ruby (~> 1.0, >= 1.3.1) connection_pool (>= 2.2.5) drb i18n (>= 1.6, < 2) logger (>= 1.4.2) minitest (>= 5.1) - mutex_m securerandom (>= 0.3) - tzinfo (~> 2.0) + tzinfo (~> 2.0, >= 2.0.5) + uri (>= 0.13.1) ast (2.4.2) base64 (0.2.0) benchmark (0.4.0) @@ -37,27 +37,26 @@ GEM connection_pool (2.5.0) crass (1.0.6) drb (2.2.1) - erubi (1.13.0) + erubi (1.13.1) i18n (1.14.7) concurrent-ruby (~> 1.0) json (2.10.1) language_server-protocol (3.17.0.4) lint_roller (1.1.0) logger (1.6.6) - loofah (2.23.1) + loofah (2.24.0) crass (~> 1.0.2) nokogiri (>= 1.12.0) mini_portile2 (2.8.8) minitest (5.25.4) - mutex_m (0.3.0) - nokogiri (1.17.2) + nokogiri (1.18.3) mini_portile2 (~> 2.8.2) racc (~> 1.4) - nokogiri (1.17.2-arm64-darwin) + nokogiri (1.18.3-arm64-darwin) racc (~> 1.4) - nokogiri (1.17.2-x86_64-darwin) + nokogiri (1.18.3-x86_64-darwin) racc (~> 1.4) - nokogiri (1.17.2-x86_64-linux) + nokogiri (1.18.3-x86_64-linux-gnu) racc (~> 1.4) parallel (1.26.3) parser (3.3.7.1) @@ -99,12 +98,13 @@ GEM rubocop (>= 1.72.1, < 2.0) rubocop-ast (>= 1.38.0, < 2.0) ruby-progressbar (1.13.0) - securerandom (0.3.2) + securerandom (0.4.1) tzinfo (2.0.6) concurrent-ruby (~> 1.0) unicode-display_width (3.1.4) unicode-emoji (~> 4.0, >= 4.0.4) unicode-emoji (4.0.4) + uri (1.0.2) PLATFORMS arm64-darwin-21 From a590c16465afee82fbbde4adc539363261804e03 Mon Sep 17 00:00:00 2001 From: GrantBirki Date: Mon, 24 Feb 2025 13:57:09 -0800 Subject: [PATCH 136/180] change order so ruby_version is on top --- rubocop-github.gemspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rubocop-github.gemspec b/rubocop-github.gemspec index a7f53d19..fad23002 100644 --- a/rubocop-github.gemspec +++ b/rubocop-github.gemspec @@ -18,6 +18,8 @@ Gem::Specification.new do |s| s.files = Dir["README.md", "STYLEGUIDE.md", "LICENSE", "config/*.yml", "lib/**/*.rb", "guides/*.md"] + s.required_ruby_version = ">= 3.0.0" + s.add_dependency "rubocop", ">= 1.37" s.add_dependency "rubocop-performance", ">= 1.15" s.add_dependency "rubocop-rails", ">= 2.17" @@ -26,8 +28,6 @@ Gem::Specification.new do |s| s.add_development_dependency "minitest" s.add_development_dependency "rake" - s.required_ruby_version = ">= 3.0.0" - s.email = "engineering@github.com" s.authors = "GitHub" end From e5574be60c8fdb4b542e3d0d6e86e75eed15f222 Mon Sep 17 00:00:00 2001 From: GrantBirki Date: Mon, 24 Feb 2025 14:06:50 -0800 Subject: [PATCH 137/180] change gem requirements so tests pass for Ruby 3.0 and 3.1 versions --- Gemfile.lock | 19 ++++++++++--------- rubocop-github.gemspec | 3 ++- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 59dc2267..ad5601d2 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -9,25 +9,25 @@ PATH GEM remote: https://rubygems.org/ specs: - actionview (8.0.1) - activesupport (= 8.0.1) + actionview (7.1.5.1) + activesupport (= 7.1.5.1) builder (~> 3.1) erubi (~> 1.11) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - activesupport (8.0.1) + activesupport (7.1.5.1) base64 benchmark (>= 0.3) bigdecimal - concurrent-ruby (~> 1.0, >= 1.3.1) + concurrent-ruby (~> 1.0, >= 1.0.2) connection_pool (>= 2.2.5) drb i18n (>= 1.6, < 2) logger (>= 1.4.2) minitest (>= 5.1) + mutex_m securerandom (>= 0.3) - tzinfo (~> 2.0, >= 2.0.5) - uri (>= 0.13.1) + tzinfo (~> 2.0) ast (2.4.2) base64 (0.2.0) benchmark (0.4.0) @@ -49,6 +49,7 @@ GEM nokogiri (>= 1.12.0) mini_portile2 (2.8.8) minitest (5.25.4) + mutex_m (0.3.0) nokogiri (1.18.3) mini_portile2 (~> 2.8.2) racc (~> 1.4) @@ -98,13 +99,12 @@ GEM rubocop (>= 1.72.1, < 2.0) rubocop-ast (>= 1.38.0, < 2.0) ruby-progressbar (1.13.0) - securerandom (0.4.1) + securerandom (0.3.2) tzinfo (2.0.6) concurrent-ruby (~> 1.0) unicode-display_width (3.1.4) unicode-emoji (~> 4.0, >= 4.0.4) unicode-emoji (4.0.4) - uri (1.0.2) PLATFORMS arm64-darwin-21 @@ -114,10 +114,11 @@ PLATFORMS x86_64-linux DEPENDENCIES - actionview + actionview (~> 7.1.5.1) minitest rake rubocop-github! + securerandom (~> 0.3.2) BUNDLED WITH 2.4.9 diff --git a/rubocop-github.gemspec b/rubocop-github.gemspec index fad23002..85c7a97a 100644 --- a/rubocop-github.gemspec +++ b/rubocop-github.gemspec @@ -24,9 +24,10 @@ Gem::Specification.new do |s| s.add_dependency "rubocop-performance", ">= 1.15" s.add_dependency "rubocop-rails", ">= 2.17" - s.add_development_dependency "actionview" + s.add_development_dependency "actionview", "~> 7.1.5.1" s.add_development_dependency "minitest" s.add_development_dependency "rake" + s.add_development_dependency "securerandom", "~> 0.3.2" s.email = "engineering@github.com" s.authors = "GitHub" From 59e951fe3c4874cc33103d227babb841d5a0013c Mon Sep 17 00:00:00 2001 From: GrantBirki Date: Mon, 24 Feb 2025 14:10:00 -0800 Subject: [PATCH 138/180] remove pin --- Gemfile.lock | 1 - rubocop-github.gemspec | 1 - 2 files changed, 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index ad5601d2..0605411d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -118,7 +118,6 @@ DEPENDENCIES minitest rake rubocop-github! - securerandom (~> 0.3.2) BUNDLED WITH 2.4.9 diff --git a/rubocop-github.gemspec b/rubocop-github.gemspec index 85c7a97a..8f0f0ef4 100644 --- a/rubocop-github.gemspec +++ b/rubocop-github.gemspec @@ -27,7 +27,6 @@ Gem::Specification.new do |s| s.add_development_dependency "actionview", "~> 7.1.5.1" s.add_development_dependency "minitest" s.add_development_dependency "rake" - s.add_development_dependency "securerandom", "~> 0.3.2" s.email = "engineering@github.com" s.authors = "GitHub" From 277e4add03c9b3f7fe473cf58b357844865004a7 Mon Sep 17 00:00:00 2001 From: GrantBirki Date: Mon, 24 Feb 2025 14:10:42 -0800 Subject: [PATCH 139/180] remove ruby 3.0 from test suite --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7a95733d..f9d43d38 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,7 +15,7 @@ jobs: strategy: fail-fast: false matrix: - ruby_version: ["3.0", "3.1", "3.2", "3.3"] + ruby_version: ["3.1", "3.2", "3.3"] steps: - uses: actions/checkout@v4 From 0bcb35056de17f859fa9fbfd67b36ff76c52197a Mon Sep 17 00:00:00 2001 From: GrantBirki Date: Mon, 24 Feb 2025 14:12:42 -0800 Subject: [PATCH 140/180] add Ruby 3.4 to the test suite --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f9d43d38..aebd3962 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,7 +15,7 @@ jobs: strategy: fail-fast: false matrix: - ruby_version: ["3.1", "3.2", "3.3"] + ruby_version: ["3.1", "3.2", "3.3", "3.4"] steps: - uses: actions/checkout@v4 From fe4e0d132751ec7460f506bbd527917836e9cf64 Mon Sep 17 00:00:00 2001 From: GrantBirki Date: Mon, 24 Feb 2025 14:17:40 -0800 Subject: [PATCH 141/180] bump securerandom --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 0605411d..e86d00ce 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -99,7 +99,7 @@ GEM rubocop (>= 1.72.1, < 2.0) rubocop-ast (>= 1.38.0, < 2.0) ruby-progressbar (1.13.0) - securerandom (0.3.2) + securerandom (0.4.1) tzinfo (2.0.6) concurrent-ruby (~> 1.0) unicode-display_width (3.1.4) From 74ffb61574a244453cc7ec30379b055dd1e96e71 Mon Sep 17 00:00:00 2001 From: GrantBirki Date: Mon, 24 Feb 2025 14:18:56 -0800 Subject: [PATCH 142/180] use the latest available version of ruby --- .ruby-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ruby-version b/.ruby-version index e4604e3a..4d9d11cf 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.2.1 +3.4.2 From d38437326a77bb00a0f586c398229ed82cde6522 Mon Sep 17 00:00:00 2001 From: GrantBirki Date: Mon, 24 Feb 2025 14:20:13 -0800 Subject: [PATCH 143/180] use the latest available version of bundler (`2.6.5`) --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index e86d00ce..d4bfa04e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -120,4 +120,4 @@ DEPENDENCIES rubocop-github! BUNDLED WITH - 2.4.9 + 2.6.5 From c971bc5c76bd68337aa0774ec5997b627bca8b67 Mon Sep 17 00:00:00 2001 From: GrantBirki Date: Mon, 24 Feb 2025 14:26:17 -0800 Subject: [PATCH 144/180] bump version to v0.23.0 --- CHANGELOG.md | 4 ++++ Gemfile.lock | 2 +- lib/version.rb | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bf2db2f4..2496c68f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # rubocop-github +## v0.23.0 + +- Read the automatic release notes on [the /releases page for this gem](https://github.com/github/rubocop-github/releases). + ## v0.22.0 - Read the automatic release notes on [the /releases page for this gem](https://github.com/github/rubocop-github/releases). diff --git a/Gemfile.lock b/Gemfile.lock index d4bfa04e..61b040cc 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - rubocop-github (0.22.0) + rubocop-github (0.23.0) rubocop (>= 1.37) rubocop-performance (>= 1.15) rubocop-rails (>= 2.17) diff --git a/lib/version.rb b/lib/version.rb index 3ed48bc6..fd3043d4 100644 --- a/lib/version.rb +++ b/lib/version.rb @@ -1,3 +1,3 @@ # frozen_string_literal: true -VERSION = "0.22.0" +VERSION = "0.23.0" From c760634e686a9c51e25110055b3bd92878b87a07 Mon Sep 17 00:00:00 2001 From: GrantBirki Date: Tue, 25 Feb 2025 09:12:01 -0800 Subject: [PATCH 145/180] remove version bump --- Gemfile.lock | 2 +- lib/version.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 61b040cc..d4bfa04e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - rubocop-github (0.23.0) + rubocop-github (0.22.0) rubocop (>= 1.37) rubocop-performance (>= 1.15) rubocop-rails (>= 2.17) diff --git a/lib/version.rb b/lib/version.rb index fd3043d4..3ed48bc6 100644 --- a/lib/version.rb +++ b/lib/version.rb @@ -1,3 +1,3 @@ # frozen_string_literal: true -VERSION = "0.23.0" +VERSION = "0.22.0" From 2ae67258663e15bc53f8f05fdf54dc457ba43dc7 Mon Sep 17 00:00:00 2001 From: GrantBirki Date: Tue, 25 Feb 2025 09:12:58 -0800 Subject: [PATCH 146/180] remove changelog changes --- CHANGELOG.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2496c68f..bf2db2f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,5 @@ # rubocop-github -## v0.23.0 - -- Read the automatic release notes on [the /releases page for this gem](https://github.com/github/rubocop-github/releases). - ## v0.22.0 - Read the automatic release notes on [the /releases page for this gem](https://github.com/github/rubocop-github/releases). From b4aafe48a0fd0f0c48fc7f81e1c05d3ad6f8001c Mon Sep 17 00:00:00 2001 From: GrantBirki Date: Wed, 26 Feb 2025 12:49:59 -0800 Subject: [PATCH 147/180] use `plugins` block for rubocop-performance and rubocop-rails --- config/default.yml | 2 ++ config/rails.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/config/default.yml b/config/default.yml index 52d44625..cf5d193e 100644 --- a/config/default.yml +++ b/config/default.yml @@ -3,6 +3,8 @@ inherit_from: require: - rubocop-github + +plugins: - rubocop-performance Bundler/DuplicatedGem: diff --git a/config/rails.yml b/config/rails.yml index b7b8d6ec..80458562 100644 --- a/config/rails.yml +++ b/config/rails.yml @@ -3,6 +3,8 @@ inherit_from: require: - rubocop-github-rails + +plugins: - rubocop-rails GitHub/RailsControllerRenderActionSymbol: From 0bdf2d7a020fb1290513ecf41aaf8e93d167d6af Mon Sep 17 00:00:00 2001 From: GrantBirki Date: Wed, 26 Feb 2025 13:35:04 -0800 Subject: [PATCH 148/180] bump the required version of rubocop to 1.72 or higher --- Gemfile.lock | 2 +- rubocop-github.gemspec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index d4bfa04e..970dabc1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,7 +2,7 @@ PATH remote: . specs: rubocop-github (0.22.0) - rubocop (>= 1.37) + rubocop (>= 1.72) rubocop-performance (>= 1.15) rubocop-rails (>= 2.17) diff --git a/rubocop-github.gemspec b/rubocop-github.gemspec index 8f0f0ef4..eaa7b09b 100644 --- a/rubocop-github.gemspec +++ b/rubocop-github.gemspec @@ -20,7 +20,7 @@ Gem::Specification.new do |s| s.required_ruby_version = ">= 3.0.0" - s.add_dependency "rubocop", ">= 1.37" + s.add_dependency "rubocop", ">= 1.72" s.add_dependency "rubocop-performance", ">= 1.15" s.add_dependency "rubocop-rails", ">= 2.17" From d24171b3857dd0b8ac19de6cf754abef87ea291c Mon Sep 17 00:00:00 2001 From: GrantBirki Date: Wed, 26 Feb 2025 13:35:44 -0800 Subject: [PATCH 149/180] bump version to 0.23.0 --- CHANGELOG.md | 4 ++++ Gemfile.lock | 2 +- lib/version.rb | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bf2db2f4..2496c68f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # rubocop-github +## v0.23.0 + +- Read the automatic release notes on [the /releases page for this gem](https://github.com/github/rubocop-github/releases). + ## v0.22.0 - Read the automatic release notes on [the /releases page for this gem](https://github.com/github/rubocop-github/releases). diff --git a/Gemfile.lock b/Gemfile.lock index 970dabc1..27f2dcb7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - rubocop-github (0.22.0) + rubocop-github (0.23.0) rubocop (>= 1.72) rubocop-performance (>= 1.15) rubocop-rails (>= 2.17) diff --git a/lib/version.rb b/lib/version.rb index 3ed48bc6..fd3043d4 100644 --- a/lib/version.rb +++ b/lib/version.rb @@ -1,3 +1,3 @@ # frozen_string_literal: true -VERSION = "0.22.0" +VERSION = "0.23.0" From 4a91e3523bd6d24afc7e9362e3a149e27c09d29c Mon Sep 17 00:00:00 2001 From: Grant Birkinbine Date: Wed, 26 Feb 2025 23:13:51 -0800 Subject: [PATCH 150/180] Update rubocop-github.gemspec Co-authored-by: Koichi ITO --- rubocop-github.gemspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rubocop-github.gemspec b/rubocop-github.gemspec index eaa7b09b..18b5aff9 100644 --- a/rubocop-github.gemspec +++ b/rubocop-github.gemspec @@ -21,8 +21,8 @@ Gem::Specification.new do |s| s.required_ruby_version = ">= 3.0.0" s.add_dependency "rubocop", ">= 1.72" - s.add_dependency "rubocop-performance", ">= 1.15" - s.add_dependency "rubocop-rails", ">= 2.17" + s.add_dependency "rubocop-performance", ">= 1.24" + s.add_dependency "rubocop-rails", ">= 2.23" s.add_development_dependency "actionview", "~> 7.1.5.1" s.add_development_dependency "minitest" From a841e05fb7fec8135599c68df6c0bff2ff4d12a1 Mon Sep 17 00:00:00 2001 From: GrantBirki Date: Wed, 26 Feb 2025 23:14:17 -0800 Subject: [PATCH 151/180] run bundle install --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 27f2dcb7..3f465d14 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -3,8 +3,8 @@ PATH specs: rubocop-github (0.23.0) rubocop (>= 1.72) - rubocop-performance (>= 1.15) - rubocop-rails (>= 2.17) + rubocop-performance (>= 1.24) + rubocop-rails (>= 2.23) GEM remote: https://rubygems.org/ From 26fee530f96260296891dafe1d0b8d0c09d3d63f Mon Sep 17 00:00:00 2001 From: GrantBirki Date: Wed, 26 Feb 2025 23:14:36 -0800 Subject: [PATCH 152/180] run bundle update --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 3f465d14..8c60f672 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -75,7 +75,7 @@ GEM rainbow (3.1.1) rake (13.2.1) regexp_parser (2.10.0) - rubocop (1.72.2) + rubocop (1.73.0) json (~> 2.3) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.1.0) @@ -86,7 +86,7 @@ GEM rubocop-ast (>= 1.38.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 4.0) - rubocop-ast (1.38.0) + rubocop-ast (1.38.1) parser (>= 3.3.1.0) rubocop-performance (1.24.0) lint_roller (~> 1.1) From e5d9a788dcf140fc9f3a8603cea06732e9e7cd27 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 5 Mar 2025 19:10:58 +0000 Subject: [PATCH 153/180] Bump rack from 3.1.10 to 3.1.11 in the bundler group Bumps the bundler group with 1 update: [rack](https://github.com/rack/rack). Updates `rack` from 3.1.10 to 3.1.11 - [Release notes](https://github.com/rack/rack/releases) - [Changelog](https://github.com/rack/rack/blob/main/CHANGELOG.md) - [Commits](https://github.com/rack/rack/compare/v3.1.10...v3.1.11) --- updated-dependencies: - dependency-name: rack dependency-type: indirect dependency-group: bundler ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 8c60f672..e08d90d4 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -64,7 +64,7 @@ GEM ast (~> 2.4.1) racc racc (1.8.1) - rack (3.1.10) + rack (3.1.11) rails-dom-testing (2.2.0) activesupport (>= 5.0.0) minitest From bb46793a4bffcc354a597ceb3f3977177f489b20 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 5 Mar 2025 19:54:52 +0000 Subject: [PATCH 154/180] Bump actions/attest-build-provenance from 2.2.0 to 2.2.3 Bumps [actions/attest-build-provenance](https://github.com/actions/attest-build-provenance) from 2.2.0 to 2.2.3. - [Release notes](https://github.com/actions/attest-build-provenance/releases) - [Changelog](https://github.com/actions/attest-build-provenance/blob/main/RELEASE.md) - [Commits](https://github.com/actions/attest-build-provenance/compare/520d128f165991a6c774bcb264f323e3d70747f4...c074443f1aee8d4aeeae555aebba3282517141b2) --- updated-dependencies: - dependency-name: actions/attest-build-provenance dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 89ccb6c1..6f3dd98d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -39,7 +39,7 @@ jobs: - name: build run: echo "GEM_VERSION=$(gem build ${{ env.GEM_NAME }}.gemspec 2>&1 | grep Version | cut -d':' -f 2 | tr -d " \t\n\r")" >> $GITHUB_ENV - - uses: actions/attest-build-provenance@520d128f165991a6c774bcb264f323e3d70747f4 # pin@v2 + - uses: actions/attest-build-provenance@c074443f1aee8d4aeeae555aebba3282517141b2 # pin@v2 with: subject-path: "${{ env.GEM_NAME }}-${{ env.GEM_VERSION }}.gem" From 4a757fd07fb10095010f3867d1347df857d0e963 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 5 Mar 2025 19:54:58 +0000 Subject: [PATCH 155/180] Bump ruby/setup-ruby from 1.221.0 to 1.222.0 Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.221.0 to 1.222.0. - [Release notes](https://github.com/ruby/setup-ruby/releases) - [Changelog](https://github.com/ruby/setup-ruby/blob/master/release.rb) - [Commits](https://github.com/ruby/setup-ruby/compare/32110d4e311bd8996b2a82bf2a43b714ccc91777...277ba2a127aba66d45bad0fa2dc56f80dbfedffa) --- updated-dependencies: - dependency-name: ruby/setup-ruby dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/build.yml | 2 +- .github/workflows/lint.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/test.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1ae421c7..25fc680d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,7 +25,7 @@ jobs: - name: checkout uses: actions/checkout@v4 - - uses: ruby/setup-ruby@32110d4e311bd8996b2a82bf2a43b714ccc91777 # pin@v1.221.0 + - uses: ruby/setup-ruby@277ba2a127aba66d45bad0fa2dc56f80dbfedffa # pin@v1.222.0 with: bundler-cache: true diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 1df707db..ad56c808 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -18,7 +18,7 @@ jobs: - name: checkout uses: actions/checkout@v4 - - uses: ruby/setup-ruby@32110d4e311bd8996b2a82bf2a43b714ccc91777 # pin@v1.221.0 + - uses: ruby/setup-ruby@277ba2a127aba66d45bad0fa2dc56f80dbfedffa # pin@v1.222.0 with: bundler-cache: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 89ccb6c1..edfc45bc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,7 +22,7 @@ jobs: - name: checkout uses: actions/checkout@v4 - - uses: ruby/setup-ruby@32110d4e311bd8996b2a82bf2a43b714ccc91777 # pin@v1.221.0 + - uses: ruby/setup-ruby@277ba2a127aba66d45bad0fa2dc56f80dbfedffa # pin@v1.222.0 with: bundler-cache: true diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index aebd3962..5f897f2e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,7 +23,7 @@ jobs: - name: Update .ruby-version with matrix value run: echo "${{ matrix.ruby_version }}" >| .ruby-version - - uses: ruby/setup-ruby@32110d4e311bd8996b2a82bf2a43b714ccc91777 # pin@v1.221.0 + - uses: ruby/setup-ruby@277ba2a127aba66d45bad0fa2dc56f80dbfedffa # pin@v1.222.0 with: bundler-cache: true From ab69ac0f0860aaaeeb4e7e9b4d90c18f2599ff40 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 11 Mar 2025 12:03:42 -0700 Subject: [PATCH 156/180] Bump rack from 3.1.11 to 3.1.12 in the bundler group (#266) Bumps the bundler group with 1 update: [rack](https://github.com/rack/rack). Updates `rack` from 3.1.11 to 3.1.12 - [Release notes](https://github.com/rack/rack/releases) - [Changelog](https://github.com/rack/rack/blob/main/CHANGELOG.md) - [Commits](https://github.com/rack/rack/compare/v3.1.11...v3.1.12) --- updated-dependencies: - dependency-name: rack dependency-type: indirect dependency-group: bundler ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index e08d90d4..682a6a99 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -64,7 +64,7 @@ GEM ast (~> 2.4.1) racc racc (1.8.1) - rack (3.1.11) + rack (3.1.12) rails-dom-testing (2.2.0) activesupport (>= 5.0.0) minitest From b1fd61cdd15b2c948c0224d19fca61ee05f585cd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 11 Mar 2025 12:03:58 -0700 Subject: [PATCH 157/180] Bump rubocop-rails from 2.30.2 to 2.30.3 (#265) Bumps [rubocop-rails](https://github.com/rubocop/rubocop-rails) from 2.30.2 to 2.30.3. - [Release notes](https://github.com/rubocop/rubocop-rails/releases) - [Changelog](https://github.com/rubocop/rubocop-rails/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop-rails/compare/v2.30.2...v2.30.3) --- updated-dependencies: - dependency-name: rubocop-rails dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Gemfile.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 682a6a99..c78dc2db 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -75,7 +75,7 @@ GEM rainbow (3.1.1) rake (13.2.1) regexp_parser (2.10.0) - rubocop (1.73.0) + rubocop (1.73.2) json (~> 2.3) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.1.0) @@ -92,14 +92,14 @@ GEM lint_roller (~> 1.1) rubocop (>= 1.72.1, < 2.0) rubocop-ast (>= 1.38.0, < 2.0) - rubocop-rails (2.30.2) + rubocop-rails (2.30.3) activesupport (>= 4.2.0) lint_roller (~> 1.1) rack (>= 1.1) rubocop (>= 1.72.1, < 2.0) rubocop-ast (>= 1.38.0, < 2.0) ruby-progressbar (1.13.0) - securerandom (0.4.1) + securerandom (0.3.2) tzinfo (2.0.6) concurrent-ruby (~> 1.0) unicode-display_width (3.1.4) From a9f99a0dcf9bd25701d3b12c4565ccabf312ccfa Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 11 Mar 2025 12:04:17 -0700 Subject: [PATCH 158/180] Bump rubocop from 1.73.0 to 1.73.2 (#264) Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.73.0 to 1.73.2. - [Release notes](https://github.com/rubocop/rubocop/releases) - [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop/compare/v1.73.0...v1.73.2) --- updated-dependencies: - dependency-name: rubocop dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> From 9ab738c680a5ee7d57a8206b2c17931dbfde1f14 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Mar 2025 09:06:00 -0700 Subject: [PATCH 159/180] Bump json from 2.10.1 to 2.10.2 in the bundler group (#268) Bumps the bundler group with 1 update: [json](https://github.com/ruby/json). Updates `json` from 2.10.1 to 2.10.2 - [Release notes](https://github.com/ruby/json/releases) - [Changelog](https://github.com/ruby/json/blob/master/CHANGES.md) - [Commits](https://github.com/ruby/json/compare/v2.10.1...v2.10.2) --- updated-dependencies: - dependency-name: json dependency-type: indirect dependency-group: bundler ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index c78dc2db..6207182f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -40,7 +40,7 @@ GEM erubi (1.13.1) i18n (1.14.7) concurrent-ruby (~> 1.0) - json (2.10.1) + json (2.10.2) language_server-protocol (3.17.0.4) lint_roller (1.1.0) logger (1.6.6) From 8aa75b819d6f3a98b1c8fccb47e9d8c43b3590fa Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Mar 2025 20:29:55 +0000 Subject: [PATCH 160/180] Bump rubocop from 1.73.2 to 1.74.0 Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.73.2 to 1.74.0. - [Release notes](https://github.com/rubocop/rubocop/releases) - [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop/compare/v1.73.2...v1.74.0) --- updated-dependencies: - dependency-name: rubocop dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 6207182f..d43c1050 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -75,7 +75,7 @@ GEM rainbow (3.1.1) rake (13.2.1) regexp_parser (2.10.0) - rubocop (1.73.2) + rubocop (1.74.0) json (~> 2.3) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.1.0) @@ -86,7 +86,7 @@ GEM rubocop-ast (>= 1.38.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 4.0) - rubocop-ast (1.38.1) + rubocop-ast (1.39.0) parser (>= 3.3.1.0) rubocop-performance (1.24.0) lint_roller (~> 1.1) From 8d3e24f45957b5c29ac95ba4d8ebc45f9b85d762 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Mar 2025 20:30:22 +0000 Subject: [PATCH 161/180] Bump minitest from 5.25.4 to 5.25.5 Bumps [minitest](https://github.com/minitest/minitest) from 5.25.4 to 5.25.5. - [Changelog](https://github.com/minitest/minitest/blob/master/History.rdoc) - [Commits](https://github.com/minitest/minitest/compare/v5.25.4...v5.25.5) --- updated-dependencies: - dependency-name: minitest dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 6207182f..76172031 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -48,7 +48,7 @@ GEM crass (~> 1.0.2) nokogiri (>= 1.12.0) mini_portile2 (2.8.8) - minitest (5.25.4) + minitest (5.25.5) mutex_m (0.3.0) nokogiri (1.18.3) mini_portile2 (~> 2.8.2) From 07fa16d2d4730490d3f211c1fa603d024bb7f106 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 18 Mar 2025 19:44:40 +0000 Subject: [PATCH 162/180] Bump ruby/setup-ruby from 1.222.0 to 1.227.0 Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.222.0 to 1.227.0. - [Release notes](https://github.com/ruby/setup-ruby/releases) - [Changelog](https://github.com/ruby/setup-ruby/blob/master/release.rb) - [Commits](https://github.com/ruby/setup-ruby/compare/277ba2a127aba66d45bad0fa2dc56f80dbfedffa...1a615958ad9d422dd932dc1d5823942ee002799f) --- updated-dependencies: - dependency-name: ruby/setup-ruby dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/build.yml | 2 +- .github/workflows/lint.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/test.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 25fc680d..e3e76439 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,7 +25,7 @@ jobs: - name: checkout uses: actions/checkout@v4 - - uses: ruby/setup-ruby@277ba2a127aba66d45bad0fa2dc56f80dbfedffa # pin@v1.222.0 + - uses: ruby/setup-ruby@1a615958ad9d422dd932dc1d5823942ee002799f # pin@v1.227.0 with: bundler-cache: true diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index ad56c808..f48ca5a4 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -18,7 +18,7 @@ jobs: - name: checkout uses: actions/checkout@v4 - - uses: ruby/setup-ruby@277ba2a127aba66d45bad0fa2dc56f80dbfedffa # pin@v1.222.0 + - uses: ruby/setup-ruby@1a615958ad9d422dd932dc1d5823942ee002799f # pin@v1.227.0 with: bundler-cache: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ab4ff316..438b2753 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,7 +22,7 @@ jobs: - name: checkout uses: actions/checkout@v4 - - uses: ruby/setup-ruby@277ba2a127aba66d45bad0fa2dc56f80dbfedffa # pin@v1.222.0 + - uses: ruby/setup-ruby@1a615958ad9d422dd932dc1d5823942ee002799f # pin@v1.227.0 with: bundler-cache: true diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5f897f2e..ed04e702 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,7 +23,7 @@ jobs: - name: Update .ruby-version with matrix value run: echo "${{ matrix.ruby_version }}" >| .ruby-version - - uses: ruby/setup-ruby@277ba2a127aba66d45bad0fa2dc56f80dbfedffa # pin@v1.222.0 + - uses: ruby/setup-ruby@1a615958ad9d422dd932dc1d5823942ee002799f # pin@v1.227.0 with: bundler-cache: true From 7c4df38b8e1641232e65381aac3ee658b051ba56 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 26 Mar 2025 19:46:28 +0000 Subject: [PATCH 163/180] Bump ruby/setup-ruby from 1.227.0 to 1.228.0 Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.227.0 to 1.228.0. - [Release notes](https://github.com/ruby/setup-ruby/releases) - [Changelog](https://github.com/ruby/setup-ruby/blob/master/release.rb) - [Commits](https://github.com/ruby/setup-ruby/compare/1a615958ad9d422dd932dc1d5823942ee002799f...7886c6653556e1164c58a7603d88286b5f708293) --- updated-dependencies: - dependency-name: ruby/setup-ruby dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/build.yml | 2 +- .github/workflows/lint.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/test.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e3e76439..9e643d94 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,7 +25,7 @@ jobs: - name: checkout uses: actions/checkout@v4 - - uses: ruby/setup-ruby@1a615958ad9d422dd932dc1d5823942ee002799f # pin@v1.227.0 + - uses: ruby/setup-ruby@7886c6653556e1164c58a7603d88286b5f708293 # pin@v1.228.0 with: bundler-cache: true diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index f48ca5a4..ed41536a 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -18,7 +18,7 @@ jobs: - name: checkout uses: actions/checkout@v4 - - uses: ruby/setup-ruby@1a615958ad9d422dd932dc1d5823942ee002799f # pin@v1.227.0 + - uses: ruby/setup-ruby@7886c6653556e1164c58a7603d88286b5f708293 # pin@v1.228.0 with: bundler-cache: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 438b2753..4c19c1f3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,7 +22,7 @@ jobs: - name: checkout uses: actions/checkout@v4 - - uses: ruby/setup-ruby@1a615958ad9d422dd932dc1d5823942ee002799f # pin@v1.227.0 + - uses: ruby/setup-ruby@7886c6653556e1164c58a7603d88286b5f708293 # pin@v1.228.0 with: bundler-cache: true diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ed04e702..2aedbd2f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,7 +23,7 @@ jobs: - name: Update .ruby-version with matrix value run: echo "${{ matrix.ruby_version }}" >| .ruby-version - - uses: ruby/setup-ruby@1a615958ad9d422dd932dc1d5823942ee002799f # pin@v1.227.0 + - uses: ruby/setup-ruby@7886c6653556e1164c58a7603d88286b5f708293 # pin@v1.228.0 with: bundler-cache: true From 2c5b1056a98dbf390f51dd59abe037d867356a6f Mon Sep 17 00:00:00 2001 From: Issy Long Date: Thu, 24 Apr 2025 12:14:15 +0100 Subject: [PATCH 164/180] Seeing `unless !thing` breaks my brain - If not not thing, so it's actually yes thing! - Enable the RuboCop rule and add justification to the style guide. --- STYLEGUIDE.md | 17 +++++++++++++++++ config/default.yml | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/STYLEGUIDE.md b/STYLEGUIDE.md index 6cb942d1..31f33664 100644 --- a/STYLEGUIDE.md +++ b/STYLEGUIDE.md @@ -3,6 +3,7 @@ This is GitHub's Ruby Style Guide, inspired by [RuboCop's guide][rubocop-guide]. ## Table of Contents + 1. [Layout](#layout) 1. [Indentation](#indentation) 2. [Inline](#inline) @@ -763,6 +764,22 @@ if x > 10 end ``` +* Don't use `unless` with a negated condition. + [[link](#no-unless-negation)] + * RuboCop rule: Style/NegatedUnless + +```ruby +# bad +unless !condition? + do_something +end + +# good +if condition? + do_something +end +``` + ### Ternary operator * Avoid the ternary operator (`?:`) except in cases where all expressions are extremely diff --git a/config/default.yml b/config/default.yml index cf5d193e..115d24d6 100644 --- a/config/default.yml +++ b/config/default.yml @@ -1370,7 +1370,7 @@ Style/NegatedIfElseCondition: Enabled: false Style/NegatedUnless: - Enabled: false + Enabled: true Style/NegatedWhile: Enabled: false From c44be760a9a3c7a39bf93cec8fdf1d80109fb5f3 Mon Sep 17 00:00:00 2001 From: Issy Long Date: Thu, 24 Apr 2025 20:32:17 +0000 Subject: [PATCH 165/180] Bump `nokogiri` and the minimum required Ruby version - Fixes https://github.com/github/rubocop-github/security/dependabot/49 and https://github.com/github/rubocop-github/security/dependabot/50. - Dependabot couldn't do this itself because `nokogiri >= 1.18.8` is not compatible with Ruby 3.0, so the minimum required Ruby version in the gemspec needed bumping. --- Gemfile.lock | 8 ++++---- rubocop-github.gemspec | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 1c4e8aaf..2cba1403 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -50,14 +50,14 @@ GEM mini_portile2 (2.8.8) minitest (5.25.5) mutex_m (0.3.0) - nokogiri (1.18.3) + nokogiri (1.18.8) mini_portile2 (~> 2.8.2) racc (~> 1.4) - nokogiri (1.18.3-arm64-darwin) + nokogiri (1.18.8-arm64-darwin) racc (~> 1.4) - nokogiri (1.18.3-x86_64-darwin) + nokogiri (1.18.8-x86_64-darwin) racc (~> 1.4) - nokogiri (1.18.3-x86_64-linux-gnu) + nokogiri (1.18.8-x86_64-linux-gnu) racc (~> 1.4) parallel (1.26.3) parser (3.3.7.1) diff --git a/rubocop-github.gemspec b/rubocop-github.gemspec index 18b5aff9..efc3b000 100644 --- a/rubocop-github.gemspec +++ b/rubocop-github.gemspec @@ -18,7 +18,7 @@ Gem::Specification.new do |s| s.files = Dir["README.md", "STYLEGUIDE.md", "LICENSE", "config/*.yml", "lib/**/*.rb", "guides/*.md"] - s.required_ruby_version = ">= 3.0.0" + s.required_ruby_version = ">= 3.1.0" s.add_dependency "rubocop", ">= 1.72" s.add_dependency "rubocop-performance", ">= 1.24" From dd2a5ce446dfadbdf733346956ed6a200d603d6f Mon Sep 17 00:00:00 2001 From: Issy Long Date: Mon, 28 Apr 2025 14:13:42 +0100 Subject: [PATCH 166/180] Bump version to 0.24.0 --- lib/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/version.rb b/lib/version.rb index fd3043d4..ae89f765 100644 --- a/lib/version.rb +++ b/lib/version.rb @@ -1,3 +1,3 @@ # frozen_string_literal: true -VERSION = "0.23.0" +VERSION = "0.24.0" From d5444cd0fbac08605c34cea7ae716ead8652c8bb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Apr 2025 20:38:10 +0000 Subject: [PATCH 167/180] Update actionview requirement from ~> 7.1.5.1 to ~> 7.2.2.1 Updates the requirements on [actionview](https://github.com/rails/rails) to permit the latest version. - [Release notes](https://github.com/rails/rails/releases) - [Changelog](https://github.com/rails/rails/blob/v8.0.2/actionview/CHANGELOG.md) - [Commits](https://github.com/rails/rails/compare/v7.1.5.1...v7.2.2.1) --- updated-dependencies: - dependency-name: actionview dependency-version: 7.2.2.1 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 20 +++++++++----------- rubocop-github.gemspec | 2 +- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 2cba1403..083c78f0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -9,32 +9,31 @@ PATH GEM remote: https://rubygems.org/ specs: - actionview (7.1.5.1) - activesupport (= 7.1.5.1) + actionview (7.2.2.1) + activesupport (= 7.2.2.1) builder (~> 3.1) erubi (~> 1.11) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - activesupport (7.1.5.1) + activesupport (7.2.2.1) base64 benchmark (>= 0.3) bigdecimal - concurrent-ruby (~> 1.0, >= 1.0.2) + concurrent-ruby (~> 1.0, >= 1.3.1) connection_pool (>= 2.2.5) drb i18n (>= 1.6, < 2) logger (>= 1.4.2) minitest (>= 5.1) - mutex_m securerandom (>= 0.3) - tzinfo (~> 2.0) + tzinfo (~> 2.0, >= 2.0.5) ast (2.4.2) base64 (0.2.0) benchmark (0.4.0) bigdecimal (3.1.9) builder (3.3.0) concurrent-ruby (1.3.5) - connection_pool (2.5.0) + connection_pool (2.5.3) crass (1.0.6) drb (2.2.1) erubi (1.13.1) @@ -43,13 +42,12 @@ GEM json (2.10.2) language_server-protocol (3.17.0.4) lint_roller (1.1.0) - logger (1.6.6) + logger (1.7.0) loofah (2.24.0) crass (~> 1.0.2) nokogiri (>= 1.12.0) mini_portile2 (2.8.8) minitest (5.25.5) - mutex_m (0.3.0) nokogiri (1.18.8) mini_portile2 (~> 2.8.2) racc (~> 1.4) @@ -99,7 +97,7 @@ GEM rubocop (>= 1.72.1, < 2.0) rubocop-ast (>= 1.38.0, < 2.0) ruby-progressbar (1.13.0) - securerandom (0.3.2) + securerandom (0.4.1) tzinfo (2.0.6) concurrent-ruby (~> 1.0) unicode-display_width (3.1.4) @@ -114,7 +112,7 @@ PLATFORMS x86_64-linux DEPENDENCIES - actionview (~> 7.1.5.1) + actionview (~> 7.2.2.1) minitest rake rubocop-github! diff --git a/rubocop-github.gemspec b/rubocop-github.gemspec index efc3b000..43cb7e3d 100644 --- a/rubocop-github.gemspec +++ b/rubocop-github.gemspec @@ -24,7 +24,7 @@ Gem::Specification.new do |s| s.add_dependency "rubocop-performance", ">= 1.24" s.add_dependency "rubocop-rails", ">= 2.23" - s.add_development_dependency "actionview", "~> 7.1.5.1" + s.add_development_dependency "actionview", "~> 7.2.2.1" s.add_development_dependency "minitest" s.add_development_dependency "rake" From 14e8c1f74f7d8cf92b6d9c80875c804c2ae66b58 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Apr 2025 20:56:31 +0000 Subject: [PATCH 168/180] Bump actions/attest-build-provenance from 2.2.3 to 2.3.0 Bumps [actions/attest-build-provenance](https://github.com/actions/attest-build-provenance) from 2.2.3 to 2.3.0. - [Release notes](https://github.com/actions/attest-build-provenance/releases) - [Changelog](https://github.com/actions/attest-build-provenance/blob/main/RELEASE.md) - [Commits](https://github.com/actions/attest-build-provenance/compare/c074443f1aee8d4aeeae555aebba3282517141b2...db473fddc028af60658334401dc6fa3ffd8669fd) --- updated-dependencies: - dependency-name: actions/attest-build-provenance dependency-version: 2.3.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4c19c1f3..a48f7d7b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -39,7 +39,7 @@ jobs: - name: build run: echo "GEM_VERSION=$(gem build ${{ env.GEM_NAME }}.gemspec 2>&1 | grep Version | cut -d':' -f 2 | tr -d " \t\n\r")" >> $GITHUB_ENV - - uses: actions/attest-build-provenance@c074443f1aee8d4aeeae555aebba3282517141b2 # pin@v2 + - uses: actions/attest-build-provenance@db473fddc028af60658334401dc6fa3ffd8669fd # pin@v2 with: subject-path: "${{ env.GEM_NAME }}-${{ env.GEM_VERSION }}.gem" From b4ce745e44b0c6ac83917de07c4d7e3bba7f86d3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 8 May 2025 14:51:05 +0000 Subject: [PATCH 169/180] Bump rack from 3.1.12 to 3.1.14 in the bundler group Bumps the bundler group with 1 update: [rack](https://github.com/rack/rack). Updates `rack` from 3.1.12 to 3.1.14 - [Release notes](https://github.com/rack/rack/releases) - [Changelog](https://github.com/rack/rack/blob/main/CHANGELOG.md) - [Commits](https://github.com/rack/rack/compare/v3.1.12...v3.1.14) --- updated-dependencies: - dependency-name: rack dependency-version: 3.1.14 dependency-type: indirect dependency-group: bundler ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 2cba1403..16f2121d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -64,7 +64,7 @@ GEM ast (~> 2.4.1) racc racc (1.8.1) - rack (3.1.12) + rack (3.1.14) rails-dom-testing (2.2.0) activesupport (>= 5.0.0) minitest From 2c73d2f76720ab5c029c75c49da9194f52917a9d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 8 May 2025 19:11:47 +0000 Subject: [PATCH 170/180] Bump ruby/setup-ruby from 1.228.0 to 1.238.0 Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.228.0 to 1.238.0. - [Release notes](https://github.com/ruby/setup-ruby/releases) - [Changelog](https://github.com/ruby/setup-ruby/blob/master/release.rb) - [Commits](https://github.com/ruby/setup-ruby/compare/7886c6653556e1164c58a7603d88286b5f708293...e34163cd15f4bb403dcd72d98e295997e6a55798) --- updated-dependencies: - dependency-name: ruby/setup-ruby dependency-version: 1.238.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/build.yml | 2 +- .github/workflows/lint.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/test.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9e643d94..2e596c5b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,7 +25,7 @@ jobs: - name: checkout uses: actions/checkout@v4 - - uses: ruby/setup-ruby@7886c6653556e1164c58a7603d88286b5f708293 # pin@v1.228.0 + - uses: ruby/setup-ruby@e34163cd15f4bb403dcd72d98e295997e6a55798 # pin@v1.238.0 with: bundler-cache: true diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index ed41536a..5c9c67d3 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -18,7 +18,7 @@ jobs: - name: checkout uses: actions/checkout@v4 - - uses: ruby/setup-ruby@7886c6653556e1164c58a7603d88286b5f708293 # pin@v1.228.0 + - uses: ruby/setup-ruby@e34163cd15f4bb403dcd72d98e295997e6a55798 # pin@v1.238.0 with: bundler-cache: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4c19c1f3..b025eeb9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,7 +22,7 @@ jobs: - name: checkout uses: actions/checkout@v4 - - uses: ruby/setup-ruby@7886c6653556e1164c58a7603d88286b5f708293 # pin@v1.228.0 + - uses: ruby/setup-ruby@e34163cd15f4bb403dcd72d98e295997e6a55798 # pin@v1.238.0 with: bundler-cache: true diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2aedbd2f..4a29ce21 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,7 +23,7 @@ jobs: - name: Update .ruby-version with matrix value run: echo "${{ matrix.ruby_version }}" >| .ruby-version - - uses: ruby/setup-ruby@7886c6653556e1164c58a7603d88286b5f708293 # pin@v1.228.0 + - uses: ruby/setup-ruby@e34163cd15f4bb403dcd72d98e295997e6a55798 # pin@v1.238.0 with: bundler-cache: true From 344c76613f0966df357e79d4c07742b5a6036a22 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 May 2025 15:21:14 +0000 Subject: [PATCH 171/180] Bump rubocop-performance from 1.24.0 to 1.25.0 Bumps [rubocop-performance](https://github.com/rubocop/rubocop-performance) from 1.24.0 to 1.25.0. - [Release notes](https://github.com/rubocop/rubocop-performance/releases) - [Changelog](https://github.com/rubocop/rubocop-performance/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop-performance/compare/v1.24.0...v1.25.0) --- updated-dependencies: - dependency-name: rubocop-performance dependency-version: 1.25.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index ebdeef2e..4c9f7d55 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -27,7 +27,7 @@ GEM minitest (>= 5.1) securerandom (>= 0.3) tzinfo (~> 2.0, >= 2.0.5) - ast (2.4.2) + ast (2.4.3) base64 (0.2.0) benchmark (0.4.0) bigdecimal (3.1.9) @@ -39,8 +39,8 @@ GEM erubi (1.13.1) i18n (1.14.7) concurrent-ruby (~> 1.0) - json (2.10.2) - language_server-protocol (3.17.0.4) + json (2.12.0) + language_server-protocol (3.17.0.5) lint_roller (1.1.0) logger (1.7.0) loofah (2.24.0) @@ -57,10 +57,11 @@ GEM racc (~> 1.4) nokogiri (1.18.8-x86_64-linux-gnu) racc (~> 1.4) - parallel (1.26.3) - parser (3.3.7.1) + parallel (1.27.0) + parser (3.3.8.0) ast (~> 2.4.1) racc + prism (1.4.0) racc (1.8.1) rack (3.1.14) rails-dom-testing (2.2.0) @@ -73,7 +74,7 @@ GEM rainbow (3.1.1) rake (13.2.1) regexp_parser (2.10.0) - rubocop (1.74.0) + rubocop (1.75.5) json (~> 2.3) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.1.0) @@ -81,14 +82,15 @@ GEM parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 2.9.3, < 3.0) - rubocop-ast (>= 1.38.0, < 2.0) + rubocop-ast (>= 1.44.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 4.0) - rubocop-ast (1.39.0) - parser (>= 3.3.1.0) - rubocop-performance (1.24.0) + rubocop-ast (1.44.1) + parser (>= 3.3.7.2) + prism (~> 1.4) + rubocop-performance (1.25.0) lint_roller (~> 1.1) - rubocop (>= 1.72.1, < 2.0) + rubocop (>= 1.75.0, < 2.0) rubocop-ast (>= 1.38.0, < 2.0) rubocop-rails (2.30.3) activesupport (>= 4.2.0) From d9b9239b8b090e55b622a0aeb6010dc679f41d72 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 May 2025 15:25:17 +0000 Subject: [PATCH 172/180] Bump rubocop-rails from 2.30.3 to 2.31.0 Bumps [rubocop-rails](https://github.com/rubocop/rubocop-rails) from 2.30.3 to 2.31.0. - [Release notes](https://github.com/rubocop/rubocop-rails/releases) - [Changelog](https://github.com/rubocop/rubocop-rails/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop-rails/compare/v2.30.3...v2.31.0) --- updated-dependencies: - dependency-name: rubocop-rails dependency-version: 2.31.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 4c9f7d55..ae551f3a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -92,11 +92,11 @@ GEM lint_roller (~> 1.1) rubocop (>= 1.75.0, < 2.0) rubocop-ast (>= 1.38.0, < 2.0) - rubocop-rails (2.30.3) + rubocop-rails (2.31.0) activesupport (>= 4.2.0) lint_roller (~> 1.1) rack (>= 1.1) - rubocop (>= 1.72.1, < 2.0) + rubocop (>= 1.75.0, < 2.0) rubocop-ast (>= 1.38.0, < 2.0) ruby-progressbar (1.13.0) securerandom (0.4.1) From 5ad0f6690492ae4af2a188ec2de42a03357fbb46 Mon Sep 17 00:00:00 2001 From: Issy Long Date: Mon, 12 May 2025 16:30:29 +0100 Subject: [PATCH 173/180] Fix variable naming in `Rails/ViewRenderLiteral` - Fixes https://github.com/github/rubocop-github/security/code-scanning/4 and https://github.com/github/rubocop-github/security/code-scanning/5 by fixing the typo for singular vs. plural `option_pairs` vs. `options_pairs`. --- lib/rubocop/cop/github/rails_view_render_literal.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rubocop/cop/github/rails_view_render_literal.rb b/lib/rubocop/cop/github/rails_view_render_literal.rb index c8563868..357b2ee1 100644 --- a/lib/rubocop/cop/github/rails_view_render_literal.rb +++ b/lib/rubocop/cop/github/rails_view_render_literal.rb @@ -54,7 +54,7 @@ def on_send(node) if render_literal?(node) && node.arguments.count > 1 locals = node.arguments[1] - elsif options_pairs = render_with_options?(node) + elsif option_pairs = render_with_options?(node) locals = option_pairs.map { |pair| locals_key?(pair) }.compact.first end From 6bc1412cec56ebc6371e7d5e3d13e1a05d50141f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 21 May 2025 19:27:54 +0000 Subject: [PATCH 174/180] Bump ruby/setup-ruby from 1.238.0 to 1.244.0 Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.238.0 to 1.244.0. - [Release notes](https://github.com/ruby/setup-ruby/releases) - [Changelog](https://github.com/ruby/setup-ruby/blob/master/release.rb) - [Commits](https://github.com/ruby/setup-ruby/compare/e34163cd15f4bb403dcd72d98e295997e6a55798...13e7a03dc3ac6c3798f4570bfead2aed4d96abfb) --- updated-dependencies: - dependency-name: ruby/setup-ruby dependency-version: 1.244.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/build.yml | 2 +- .github/workflows/lint.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/test.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2e596c5b..86059b7c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,7 +25,7 @@ jobs: - name: checkout uses: actions/checkout@v4 - - uses: ruby/setup-ruby@e34163cd15f4bb403dcd72d98e295997e6a55798 # pin@v1.238.0 + - uses: ruby/setup-ruby@13e7a03dc3ac6c3798f4570bfead2aed4d96abfb # pin@v1.244.0 with: bundler-cache: true diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 5c9c67d3..24ca871b 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -18,7 +18,7 @@ jobs: - name: checkout uses: actions/checkout@v4 - - uses: ruby/setup-ruby@e34163cd15f4bb403dcd72d98e295997e6a55798 # pin@v1.238.0 + - uses: ruby/setup-ruby@13e7a03dc3ac6c3798f4570bfead2aed4d96abfb # pin@v1.244.0 with: bundler-cache: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e3db4c81..84778eda 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,7 +22,7 @@ jobs: - name: checkout uses: actions/checkout@v4 - - uses: ruby/setup-ruby@e34163cd15f4bb403dcd72d98e295997e6a55798 # pin@v1.238.0 + - uses: ruby/setup-ruby@13e7a03dc3ac6c3798f4570bfead2aed4d96abfb # pin@v1.244.0 with: bundler-cache: true diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4a29ce21..af449019 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,7 +23,7 @@ jobs: - name: Update .ruby-version with matrix value run: echo "${{ matrix.ruby_version }}" >| .ruby-version - - uses: ruby/setup-ruby@e34163cd15f4bb403dcd72d98e295997e6a55798 # pin@v1.238.0 + - uses: ruby/setup-ruby@13e7a03dc3ac6c3798f4570bfead2aed4d96abfb # pin@v1.244.0 with: bundler-cache: true From 84762bbf7fbf2c5a0a05889d5bd6da426e2b6fbe Mon Sep 17 00:00:00 2001 From: Mike Griffin Date: Tue, 27 May 2025 16:03:04 +0100 Subject: [PATCH 175/180] Specify the plugin class name explicitly This allows rubocop to be run in bundler standalone mode. Without specifying the plugin class name, rubocop errors out with: > Error: Failed to load plugin `rubocop-performance` because the corresponding plugin class could not be determined for instantiation. This is because it's trying to load the gem to find the name, but is unable to. Setting the class name doesn't affect running rubocop through bundler, it will still work properly --- config/default.yml | 3 ++- config/rails.yml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/config/default.yml b/config/default.yml index 115d24d6..ff7eec81 100644 --- a/config/default.yml +++ b/config/default.yml @@ -5,7 +5,8 @@ require: - rubocop-github plugins: - - rubocop-performance + - rubocop-performance: + plugin_class_name: RuboCop::Performance::Plugin Bundler/DuplicatedGem: Enabled: true diff --git a/config/rails.yml b/config/rails.yml index 80458562..cba38c11 100644 --- a/config/rails.yml +++ b/config/rails.yml @@ -5,7 +5,8 @@ require: - rubocop-github-rails plugins: - - rubocop-rails + - rubocop-rails: + plugin_class_name: RuboCop::Rails::Plugin GitHub/RailsControllerRenderActionSymbol: Enabled: true From d41cdb15b49184bbb324c72f88181b6f4eec5075 Mon Sep 17 00:00:00 2001 From: GrantBirki Date: Tue, 27 May 2025 09:45:59 -0700 Subject: [PATCH 176/180] commit changes from `bundle install` --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index ae551f3a..7a13033a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - rubocop-github (0.23.0) + rubocop-github (0.24.0) rubocop (>= 1.72) rubocop-performance (>= 1.24) rubocop-rails (>= 2.23) From 5bc2937c51015743844f89b1b2d59378f52f934a Mon Sep 17 00:00:00 2001 From: GrantBirki Date: Tue, 27 May 2025 09:46:22 -0700 Subject: [PATCH 177/180] docs --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 72cf0a2c..e5ef656b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -51,6 +51,6 @@ Rubocop regularly releases new versions with new cops. We want to keep up to dat 1. Update [`lib/version.rb`](lib/version.rb) with the next version number 2. Update the `CHANGELOG` with changes and contributor -3. Run `bundle` to update gem version contained in the lockfile +3. Run `bundle install` to update gem version contained in the lockfile 4. Commit your changes and open a pull request 5. When the pull request is approved and merged into `main`, the [`.github/workflows/release.yml`](.github/workflows/release.yml) workflow will automatically run to release the new version to RubyGems and GitHub Packages 🎉. From 5a69181ff75aed885e575ea3d409027254ccef72 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 27 May 2025 16:49:34 +0000 Subject: [PATCH 178/180] Bump rubocop from 1.75.5 to 1.75.7 Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.75.5 to 1.75.7. - [Release notes](https://github.com/rubocop/rubocop/releases) - [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop/compare/v1.75.5...v1.75.7) --- updated-dependencies: - dependency-name: rubocop dependency-version: 1.75.7 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 7a13033a..cf35c017 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -39,7 +39,7 @@ GEM erubi (1.13.1) i18n (1.14.7) concurrent-ruby (~> 1.0) - json (2.12.0) + json (2.12.2) language_server-protocol (3.17.0.5) lint_roller (1.1.0) logger (1.7.0) @@ -74,7 +74,7 @@ GEM rainbow (3.1.1) rake (13.2.1) regexp_parser (2.10.0) - rubocop (1.75.5) + rubocop (1.75.7) json (~> 2.3) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.1.0) From 1fab623ae3f97ebcef0e22a503e3c4a45180d505 Mon Sep 17 00:00:00 2001 From: Mike Griffin Date: Tue, 27 May 2025 18:21:18 +0100 Subject: [PATCH 179/180] Bump to version 0.25.0 --- CHANGELOG.md | 10 ++++++++++ Gemfile.lock | 2 +- lib/version.rb | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2496c68f..f89036a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # rubocop-github +## v0.25.0 + +- Read the automatic release notes on [the /releases page for this gem](https://github.com/github/rubocop-github/releases). +- Updated related gems +- Specify plugin class names for included rubocop plugins + +## v0.24.0 + +- Read the automatic release notes on [the /releases page for this gem](https://github.com/github/rubocop-github/releases). + ## v0.23.0 - Read the automatic release notes on [the /releases page for this gem](https://github.com/github/rubocop-github/releases). diff --git a/Gemfile.lock b/Gemfile.lock index cf35c017..e858888a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - rubocop-github (0.24.0) + rubocop-github (0.25.0) rubocop (>= 1.72) rubocop-performance (>= 1.24) rubocop-rails (>= 2.23) diff --git a/lib/version.rb b/lib/version.rb index ae89f765..a9f2b951 100644 --- a/lib/version.rb +++ b/lib/version.rb @@ -1,3 +1,3 @@ # frozen_string_literal: true -VERSION = "0.24.0" +VERSION = "0.25.0" From 2c40fb3ce5f356f0c4f3db003dc75003712601a0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 27 May 2025 18:12:26 +0000 Subject: [PATCH 180/180] Bump rubocop-rails from 2.31.0 to 2.32.0 Bumps [rubocop-rails](https://github.com/rubocop/rubocop-rails) from 2.31.0 to 2.32.0. - [Release notes](https://github.com/rubocop/rubocop-rails/releases) - [Changelog](https://github.com/rubocop/rubocop-rails/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop-rails/compare/v2.31.0...v2.32.0) --- updated-dependencies: - dependency-name: rubocop-rails dependency-version: 2.32.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index e858888a..d4d29779 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -35,7 +35,7 @@ GEM concurrent-ruby (1.3.5) connection_pool (2.5.3) crass (1.0.6) - drb (2.2.1) + drb (2.2.3) erubi (1.13.1) i18n (1.14.7) concurrent-ruby (~> 1.0) @@ -63,7 +63,7 @@ GEM racc prism (1.4.0) racc (1.8.1) - rack (3.1.14) + rack (3.1.15) rails-dom-testing (2.2.0) activesupport (>= 5.0.0) minitest @@ -92,12 +92,12 @@ GEM lint_roller (~> 1.1) rubocop (>= 1.75.0, < 2.0) rubocop-ast (>= 1.38.0, < 2.0) - rubocop-rails (2.31.0) + rubocop-rails (2.32.0) activesupport (>= 4.2.0) lint_roller (~> 1.1) rack (>= 1.1) rubocop (>= 1.75.0, < 2.0) - rubocop-ast (>= 1.38.0, < 2.0) + rubocop-ast (>= 1.44.0, < 2.0) ruby-progressbar (1.13.0) securerandom (0.4.1) tzinfo (2.0.6)