justisb Github contribution chart
justisb Github Stats
justisb Most Used Languages

Activity

27 Sep 2022

Justisb

Add query_string to error message

Pushed On 27 Sep 2022 at 06:42:30

Justisb

Shuffle args

Pushed On 27 Sep 2022 at 06:42:30

Justisb

Shuffle args

Pushed On 27 Sep 2022 at 06:37:09

Justisb

Add query_string to error message

Pushed On 27 Sep 2022 at 06:08:25
Create Branch
Justisb In Popmenu/graphql-ruby Create Branch1.13-fix-kw-args

Justisb

Ruby implementation of GraphQL

On 26 Sep 2022 at 09:19:18

Justisb

started

Started On 31 Aug 2022 at 06:16:10

Justisb

An example of Rails 7 and Vue 3 app which is using Vite and includes some of the useful tools to start your projects

Forked On 20 Aug 2022 at 03:44:35
Issue Comment

Justisb

[Fix #10883] Fix `Style/RedundantParentheses` to be able to detect offenses and properly correct when the end parentheses and comma are on their own line

Previously in #2874 / #3078, Style/RedundantParentheses was updated to ignore parentheses in arrays when the comma is on a separate line with the end parenthesis, as that would leave a comma on a line by itself, which is a syntax error.

Additionally, this trailing comma problem shows up in method argument lists, hashes, etc.

This change removes the false negative for this situation, and instead updates ParenthesesCorrector to be able to handle commas that are orphaned onto their own line after removing parentheses. Note that this corrector is also used by Style/ParenthesesAroundCondition and Style/RescueModifier but all tests are passing without change.

Fixes #10883.


Before submitting the PR make sure the following are checked:

  • [x] The PR relates to only one subject with a clear title and description in grammatically correct, complete sentences.
  • [x] Wrote good commit messages.
  • [x] Commit message starts with [Fix #issue-number] (if the related issue exists).
  • [x] Feature branch is up-to-date with master (if not - rebase it).
  • [x] Squashed related commits together.
  • [x] Added tests.
  • [x] Ran bundle exec rake default. It executes all tests and runs RuboCop on its own code.
  • [x] Added an entry (file) to the changelog folder named {change_type}_{change_description}.md if the new code introduces user-observable changes. See changelog entry format for details.

Forked On 09 Aug 2022 at 03:57:13

Justisb

FYI this update causes invalid syntax for a heredoc string used in an array or hash, as the autocorrect adds the comma to the end of the heredoc end marker, breaking the marker. In that scenario we'll want to leave the dangling parentheses + comma.

Example:

 [
      (
        <<-'HEREDOC'
          Foo
        HEREDOC
      ),
      (
        <<-'HEREDOC'
          Bar
        HEREDOC
      ),
    ] 

Is improperly autocorrected to:

 [
      
        <<-'HEREDOC'
          Foo
        HEREDOC,
      
        <<-'HEREDOC'
          Bar
        HEREDOC,
    ] 

Commented On 09 Aug 2022 at 03:57:13