334 Commits

Author SHA1 Message Date
Douglas Eichelberger
5ed25c4329
Enable Sorbet/Refinement 2025-08-25 07:40:22 -07:00
Mike McQuaid
8ef6814dd1
rubocop.yml: temporarily disable Layout/EmptyLinesAfterModuleInclusion 2025-08-14 09:56:07 +01:00
Patrick Linnane
4513a43d53
Fix RuboCop failures.
Co-authored-by: Patrick Linnane <patrick@linnane.io>
Co-authored-by: Carlo Cabrera <github@carlo.cab>
Co-authored-by: Thierry Moisan <thierry.moisan@gmail.com>
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2025-07-14 19:12:38 +01:00
Issy Long
990c1efc16
bundle: Rename "brews" to "formulae" for consistency
- Homebrew Bundle referred to formulae as "brews". But it referred to
  casks as "casks" and taps as "taps".
- Let's use the same terminology everywhere.
- (I know that `brew "hello"` is the formula syntax in the Brewfile, so
  I'm not changing that (though would be up for it, in a backwards
  compatible manner), just making the code more consistent.)
2025-07-04 21:08:37 +01:00
Douglas Eichelberger
cd86e43fb1
Add rubocop exclusion 2025-05-20 20:59:24 -07:00
Mike McQuaid
5f29ab8c89
docs/Brew-Bundle-and-Brewfile: improve docs.
The `brew bundle` documentation isn't great at explaining what the tool
is and why you should care. Let's improve that.
2025-04-25 10:59:32 +01:00
Patrick Linnane
2f67c29db6
Exclude parser again
Signed-off-by: Patrick Linnane <patrick@linnane.io>
2025-04-22 13:00:19 -07:00
Patrick Linnane
5d8d453a90
Portable Ruby 3.4.3 2025-04-22 11:50:08 -07:00
Patrick Linnane
e8f7d02e37
Disable RSpec/IncludeExamples
Signed-off-by: Patrick Linnane <patrick@linnane.io>
2025-04-18 19:54:16 -07:00
Douglas Eichelberger
b3b6c147fb
perf: rubocop/tapioca parser optimizations 2025-04-01 21:26:09 -07:00
Patrick Linnane
c1f98de96b
rubocop-sorbet: convert to plugin
Signed-off-by: Patrick Linnane <patrick@linnane.io>
2025-04-01 18:00:11 -07:00
Mike McQuaid
bdeca530ff
Migrate Homebrew/bundle to Homebrew/brew
Co-authored-by: Bo Anderson <mail@boanderson.me>
2025-03-19 06:47:01 +00:00
Douglas Eichelberger
9627edd407
Convert rubocop-performance to plugin 2025-03-04 13:10:48 -08:00
Douglas Eichelberger
e898337b85
Convert rubocop-md to plugin 2025-03-04 12:35:53 -08:00
Douglas Eichelberger
6f616a416b
Update per https://github.com/rubocop/rubocop-rspec/issues/2048\#issuecomment-2694423765 2025-03-04 11:36:01 -08:00
Douglas Eichelberger
9515714b44
Add interface for livecheck strategies 2025-02-26 16:45:39 -08:00
Issy Long
268f801038
Bump more files to Sorbet typed: strict 2025-01-11 00:11:27 +00:00
Douglas Eichelberger
3a4243742f Remove OpenStruct from CLI::Args 2024-12-08 10:27:49 -08:00
Mike McQuaid
24d3b46f42
Library/.rubocop.yml: temporarily disable buggy cop. 2024-11-05 16:44:12 +00:00
Bo Anderson
bce46628b0
.rubocop.yml: disable Sorbet/Refinement 2024-10-16 04:12:23 +01:00
Douglas Eichelberger
ced4a3a91f Migrate Parlour extensions to Tapioca compilers 2024-10-14 19:50:09 -07:00
Bo Anderson
99ce3094e9
Invalidate Bootsnap cache on Gemfile.lock changes 2024-09-04 04:05:10 +01:00
Carlo Cabrera
cb9b469dfc
.rubocop.yml: add respond_to_missing? to OptionalBooleanParameter exemptions
This fixes a CI failure on `master`.[^1]

[^1]: https://github.com/Homebrew/brew/actions/runs/10469292764/job/28991992536
2024-08-20 18:27:07 +08:00
Douglas Eichelberger
791ff3ac75 Add rubocop exclusion 2024-08-19 09:56:50 -07:00
Issy Long
45978435e7
rubocop: Use Sorbet/StrictSigil as it's better than comments
- Previously I thought that comments were fine to discourage people from
  wasting their time trying to bump things that used `undef` that Sorbet
  didn't support. But RuboCop is better at this since it'll complain if
  the comments are unnecessary.

- Suggested in https://github.com/Homebrew/brew/pull/18018#issuecomment-2283369501.

- I've gone for a mixture of `rubocop:disable` for the files that can't
  be `typed: strict` (use of undef, required before everything else, etc)
  and `rubocop:todo` for everything else that should be tried to make
  strictly typed. There's no functional difference between the two as
  `rubocop:todo` is `rubocop:disable` with a different name.

- And I entirely disabled the cop for the docs/ directory since
  `typed: strict` isn't going to gain us anything for some Markdown
  linting config files.

- This means that now it's easier to track what needs to be done rather
  than relying on checklists of files in our big Sorbet issue:

```shell
$ git grep 'typed: true # rubocop:todo Sorbet/StrictSigil' | wc -l
    268
```

- And this is confirmed working for new files:

```shell
$ git status
On branch use-rubocop-for-sorbet-strict-sigils
Untracked files:
  (use "git add <file>..." to include in what will be committed)
        Library/Homebrew/bad.rb
        Library/Homebrew/good.rb

nothing added to commit but untracked files present (use "git add" to track)

$ brew style
Offenses:

bad.rb:1:1: C: Sorbet/StrictSigil: Sorbet sigil should be at least strict got true.
^^^^^^^^^^^^^

1340 files inspected, 1 offense detected
```
2024-08-12 15:24:27 +01:00
Issy Long
99c5cc99b5
rubocop/no_fileutils_rmrf: Scope to just formulae and casks 2024-08-01 18:28:00 +01:00
Bo Anderson
1de1be8937
style: chdir before running rubocop 2024-06-30 01:51:56 +01:00
Sean Molenaar
bbd73a7243 feat: add shared checks for casks and formulae 2024-06-16 17:24:31 +02:00
Patrick Linnane
e151f78add
rubocop: remove SpecFilePathSuffix
Signed-off-by: Patrick Linnane <patrick@linnane.io>
2024-06-11 09:21:15 -07:00
Patrick Linnane
75359a483b
rubocop: remove obsolete config
Signed-off-by: Patrick Linnane <patrick@linnane.io>
2024-06-11 08:31:29 -07:00
Patrick Linnane
bfa6181ee1
rubocop: enable Style/SendWithLiteralMethodName
Signed-off-by: Patrick Linnane <patrick@linnane.io>
2024-05-31 11:37:31 -07:00
Mike McQuaid
d780bd7734
rubocop.yml: disable broken rule for now. 2024-05-23 17:15:43 +01:00
Mike McQuaid
a92e6fc1c8
extend/pathname: import rmtree again.
The separate file is no longer required now that
https://github.com/sorbet/sorbet/pull/7895 was merged.
2024-05-18 18:02:31 +02:00
Mike McQuaid
ddf9426faf
rubocop: target Ruby 3.3.
Portable Ruby is at 3.3.1 now so may as well bump RuboCop too.
2024-05-17 13:21:30 +09:00
Bo Anderson
727cf5e917
extend/pathname: restore old rmtree behaviour 2024-05-17 12:32:29 +09:00
Mike McQuaid
222fe8ef0b
Homebrew 4.3.0 deprecation/disable/removals.
The usual pass of deprecating/disabling/removing code for the next
minor Homebrew release.
2024-05-07 12:18:04 +01:00
Douglas Eichelberger
f664433b5c Enable RSpec/DescribeClass 2024-04-03 09:12:47 -07:00
Douglas Eichelberger
1a95bb3b03 Enable RSpec/FilePath at SpecSuffixOnly 2024-03-30 11:29:34 -07:00
Douglas Eichelberger
03b815df82 Enable and fix RSpec/DescribedClassModuleWrapping 2024-03-30 11:29:34 -07:00
Mike McQuaid
3840d7145c
rubocop: default hash syntax.
As-of 3.1: this mean that you omit the hash value if the name is the
same as the key.

We're allowing this already and it didn't make sense to land until the
bulk of the other RuboCop 3.1 changes did but, now we're ready, it is
more concise and a pattern that people will need to understand anyway.
2024-03-07 15:56:21 +00:00
Issy Long
e654af3e15
Disable RuboCop Naming/BlockForwarding and Style/ArgumentsForwarding
- These break Sorbet type signatures:

```
      RuntimeError:
        The declaration for  is missing parameter(s): &
```
2024-02-25 23:00:07 +00:00
Issy Long
c11a07db5b
Alphabetize Style/HashSyntax RuboCop rule and keep it the same 2024-02-25 23:00:07 +00:00
Issy Long
921753cf84
Fix RuboCop Performance/BindCall offenses 2024-02-25 23:00:07 +00:00
Issy Long
f4218a6316
Fix RuboCop Performance/MapCompact offenses
- Rename an iterator variable since it would make the line too long.
2024-02-25 22:59:59 +00:00
Issy Long
c86a402110
Fix RuboCop Lint/RedundantDirGlobSort offenses 2024-02-24 23:59:31 +00:00
Douglas Eichelberger
fb192ed46d Exclude parlour.rbi from rubocop 2024-02-20 15:31:25 -08:00
Mike McQuaid
e5f0795e20
Update Library/.rubocop.yml
Co-authored-by: Markus Reiter <me@reitermark.us>
2024-02-19 13:57:54 +00:00
Douglas Eichelberger
46a0a50774 Update config 2024-02-18 15:47:51 -08:00
Douglas Eichelberger
979974fa38 Update Library/.rubocop.yml
Co-authored-by: Issy Long <issyl0@github.com>
2024-02-18 15:40:02 -08:00
Douglas Eichelberger
a5a4c39841 Fix rubocop .rbi exclusion 2024-02-18 15:40:02 -08:00