- 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
```
Originally we were going to try and load the *flight blocks from the API
but we ended up going with downloading the caskfile for the subset of
casks that need this functionality for consisty's sake.
This reverts the following commits from most recent to oldest:
- ffc74a51fb32b66a4cd8bc41dbd076dd23d9100e
- e5616e94fe42505434c330be35eeafef2739944f
- d1490c3d5c087d00f2bca1787cce331202b195c5
- 7ca5a5d9a71a73f21bbb8555a38048f027bee89b
- 2d5d132713d0701d02d5ff33e9918812d13d2a83
It also changes how *flight blocks are handled in `.to_h`.
Essentially, when *flight blocks exist they are just included
as a hash of the artifact to nil to indicate that they exist.
More information isn't necessary since we don't evaluate
the current source code in the *flight artifacts that
we get from the API.