Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

build(deps): bump rubocop from 0.81.0 to 0.82.0 in /Library/Homebrew #7377

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 13 additions & 6 deletions Library/.rubocop.yml
Expand Up @@ -8,6 +8,19 @@ FormulaAudit:
FormulaAuditStrict:
Enabled: true

# enable all pending rubocops
AllCops:
NewCops: enable

# don't allow cops to be disabled in formulae
Style/DisableCopsWithinSourceCodeDirective:
Enabled: true
Exclude:
# TODO: really long lines but hard to resolve (but would be nice to do).
- '**/Formula/libgraphqlparser.rb'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could convert those long lines to json:

{
  "kind": "Document",
  "loc": {
    "start": {
      "line": 1,
      "column": 1
    },
    "end": {
      "line": 1,
      "column": 9
    }
  },
  "definitions": [
    {
      "kind": "OperationDefinition",
      "loc": {
        "start": {
          "line": 1,
          "column": 1
        },
        "end": {
          "line": 1,
          "column": 9
        }
      },
      "operation": "query",
      "name": null,
      "variableDefinitions": null,
      "directives": null,
      "selectionSet": {
        "kind": "SelectionSet",
        "loc": {
          "start": {
            "line": 1,
            "column": 1
          },
          "end": {
            "line": 1,
            "column": 9
          }
        },
        "selections": [
          {
            "kind": "Field",
            "loc": {
              "start": {
                "line": 1,
                "column": 3
              },
              "end": {
                "line": 1,
                "column": 7
              }
            },
            "alias": null,
            "name": {
              "kind": "Name",
              "loc": {
                "start": {
                  "line": 1,
                  "column": 3
                },
                "end": {
                  "line": 1,
                  "column": 7
                }
              },
              "value": "user"
            },
            "arguments": null,
            "directives": null,
            "selectionSet": null
          }
        ]
      }
    }
  ]
}

If it's ok, I'll create a PR

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it's ok, I'll create a PR

Yes, please do ❤️

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

# TODO: false positive in RuboCop, see if it can be worked around/fixed.
- '**/Formula/rpm.rb'
Comment on lines +21 to +22
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know is it reported to rubocop?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not really a bug on RuboCop's end because it is a formatting character it's just not being used as one in this context.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May have found a fix: Homebrew/homebrew-core#53261


# make our hashes consistent
Layout/HashAlignment:
EnforcedHashRocketStyle: table
Expand Down Expand Up @@ -46,12 +59,6 @@ Lint/AmbiguousRegexpLiteral:
Lint/ParenthesesAsGroupedExpression:
Enabled: false

# not enabled by default but nice to have
Lint/RaiseException:
Enabled: true
Lint/StructNewOverride:
Enabled: true

# most metrics don't make sense to apply for formulae/taps
Metrics/AbcSize:
Enabled: false
Expand Down
4 changes: 4 additions & 0 deletions Library/.rubocop_rspec.yml
Expand Up @@ -8,6 +8,10 @@ AllCops:
Exclude:
- '**/vendor/**/*'

# allow style to be disabled in non-formulae code
Style/DisableCopsWithinSourceCodeDirective:
Enabled: false

# Intentionally disabled as it doesn't fit with our code style.
RSpec/AnyInstance:
Enabled: false
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/Gemfile.lock
Expand Up @@ -81,7 +81,7 @@ GEM
rspec-support (3.9.2)
rspec-wait (0.0.9)
rspec (>= 3, < 4)
rubocop (0.81.0)
rubocop (0.82.0)
jaro_winkler (~> 1.5.1)
parallel (~> 1.10)
parser (>= 2.7.0.1)
Expand Down