23 Commits

Author SHA1 Message Date
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
Markus Reiter
480e264d9a
Lint Ruby docs. 2024-05-01 11:35:21 +02:00
Mike McQuaid
aa6ea4be83
Call Homebrew.install_bundler_gems! more consistently.
- Call `Homebrew.install_bundler_gems!` as early as possible
- Always call `Homebrew.install_bundler_gems!` in `dev-cmd` rather than
  in `Library/Homebrew` helpers method (to ensure we don't accidentally
  call this for non-dev-cmd commands)
2024-04-30 10:39:35 +01:00
Markus Reiter
0f0055ede4
Make documentation @api private by default. 2024-04-26 19:04:20 +02:00
Mike McQuaid
56fc9a1fb2
Merge pull request #17047 from Homebrew/block-params
Prefer numbered block params over proc conversion, cont'd
2024-04-08 19:13:01 +01:00
Douglas Eichelberger
c59d9fa833 Prefer numbered block params over proc conversion, cont'd 2024-04-08 09:47:27 -07:00
Michael Cho
8a90d5a51d
manpages: move requires after install_bundler_gems!
Signed-off-by: Michael Cho <michael@michaelcho.dev>
2024-04-05 12:16:36 -04:00
Bo Anderson
754d580a91
Replace ronn with Kramdown's converter 2024-03-10 22:31:38 +00:00
Mike McQuaid
ea2892f8ee
brew.rb: handle missing args. 2024-03-07 16:20:20 +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
Bo Anderson
fa5ca71749
manpages: fix error under Ruby 3 2023-11-05 00:54:59 +00:00
Bo Anderson
3b1c171184
Further split up Gemfile into groups 2023-09-27 17:33:44 +01:00
Eric Knibbe
931f762598
docs+rubydoc: various grammar/wording fixes 2023-09-11 02:26:37 -04:00
Douglas Eichelberger
24cf6076e8 brew style --fix 2023-04-24 20:42:39 -07:00
Douglas Eichelberger
09c679e75f Refactor module_function to reduce rbi need 2023-04-17 10:37:59 -07:00
Douglas Eichelberger
05d8d51a81 Remove i18n direct dependency 2023-03-11 17:27:53 -08:00
Douglas Eichelberger
13b6825c2d Fix invalid locale error 2023-03-11 17:27:53 -08:00
Douglas Eichelberger
1943132cf6 Move i18n out of global 2023-03-11 17:27:53 -08:00
Douglas Eichelberger
719f1d6c6e Refactor some use of OpenStruct 2023-02-28 13:05:43 -08:00
Mike McQuaid
41ad2eba15
update-maintainers/manpages: not all PLC are maintainers.
So list all maintainers separately.
2023-02-02 17:09:25 +00:00
hyuraku
20c67b1b20 repair style 2022-11-08 21:11:10 +09:00
hyuraku
55de5deb0b fix typo 2022-11-08 21:03:20 +09:00
hyuraku
d89344b41d add manpage.rb to generating homebrew manual 2022-11-08 20:33:30 +09:00