17 Commits

Author SHA1 Message Date
Issy Long
268f801038
Bump more files to Sorbet typed: strict 2025-01-11 00:11:27 +00: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
Bo Anderson
ea44c21822
cask_dependent: fix incorrect requirement logic 2022-08-31 19:17:52 +01:00
Rylan Polster
e53ccbc3cd
Remove unnecessary code 2022-06-14 16:06:05 -04:00
hyuraku
9f50a95203 change deps.to_formula.runtime_dependencies to variable length arguments 2022-02-16 18:59:58 +09:00
hyuraku
8aa4cfb155 repair style 2022-02-15 23:24:33 +09:00
hyuraku
e3f42e6f89 repair CaskDependent#runtime_dependencies 2022-02-10 00:29:39 +09:00
fn ⌃ ⌥
87e9a495d1 deps: add --graph and --dot switches 2021-11-16 08:50:39 -08:00
hyuraku
2888d050f7 reject build and test dependency 2021-07-16 21:02:38 +09:00
hyuraku
a61d1a7072 repair CaskDependent#runtime_dependencies 2021-07-15 23:49:41 +09:00
Rylan Polster
b096bf1fed
dependency::expand: only prune missing deps with flag 2021-06-18 12:03:22 -04:00
Mike McQuaid
d73351251c
Deprecate, disable, delete code for next major/minor version.
Do the usual dance for bumping our major/minor version.
2021-04-09 09:30:36 +01:00
Bo Anderson
450bc4ab33
Fix brew style 2021-03-26 14:11:03 +00:00
EricFromCanada
3768b7a6e9 apidoc: update comment wording, punctuation, formatting 2020-11-06 00:21:02 -05:00
Markus Reiter
24ae318a3d Move type annotations into files. 2020-10-10 14:59:39 +02:00
William Ma
f96240eec7 deps: Add tests for CaskDependent 2020-07-29 13:37:38 -04:00
William Ma
4216da7629 deps: Move CaskDependencies to its own file 2020-07-29 09:38:07 -04:00