128 Commits

Author SHA1 Message Date
Douglas Eichelberger
fcf18912fe
Inline use of attr_predicate 2025-03-02 21:36:03 -08:00
Douglas Eichelberger
7880490f85
Update Library/Homebrew/formula.rb
Co-authored-by: Markus Reiter <me@reitermark.us>
2025-02-23 15:09:34 -08:00
Douglas Eichelberger
3ef22f3181
Inline use of attr_rw 2025-02-23 13:18:49 -08:00
Douglas Eichelberger
ccfc8bfbe6 Remove :final from Requirement#satisfied? sig 2024-11-24 15:49:49 -08:00
Douglas Eichelberger
33d9267d7d Enforce finalized sorbet methods 2024-11-21 18:34:11 -08: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
Markus Reiter
caf87c0336
Warn about undocumented non-private APIs. 2024-05-01 11:35:20 +02:00
Markus Reiter
0f0055ede4
Make documentation @api private by default. 2024-04-26 19:04:20 +02:00
Markus Reiter
fe4ef62aa9
Hide #inspect in docs. 2024-04-26 13:20:05 +02:00
Mike McQuaid
ea2892f8ee
brew.rb: handle missing args. 2024-03-07 16:20:20 +00:00
Douglas Eichelberger
e7e4ecc405 Change return type 2024-02-19 13:29:49 -08:00
Douglas Eichelberger
b5d07dd7d6 Finalize methods that do not support overrides 2024-02-19 13:23:45 -08:00
Douglas Eichelberger
ffd761d2e9 Create dedicated Attrable mixin for attr_ methods 2023-12-28 11:46:27 -08:00
Max schwenk
db19e99095 Add a comment to that effect 2023-09-05 22:40:23 -04:00
Max schwenk
f4f18acf88 Fix bad cache setting 2023-09-05 16:30:30 -04:00
Patrick Linnane
c56669e9cd
various: fix miscellaneous typos 2023-07-18 08:52:49 -07:00
Douglas Eichelberger
24cf6076e8 brew style --fix 2023-04-24 20:42:39 -07:00
Douglas Eichelberger
89c7117b30 Resolve dependable_spec violation 2023-01-22 17:26:44 -08:00
Bo Anderson
9eac310468
Allow multiple macOS requirements 2022-11-09 01:19:46 +00:00
Bo Anderson
93647e5c98
requirement: require instances to use a subclass 2022-08-31 19:17:55 +01:00
Bo Anderson
f12442cce6
requirement: improve name detection of anonymous subclasses 2022-08-31 18:40:30 +01:00
Bo Anderson
02164a35db
Use ORIGINAL_PATHS over envs; reject nil PATH 2022-06-17 19:47:57 +01:00
Bo Anderson
2ea7454efa
Fix Security/CompoundHash offences 2022-06-17 19:47:55 +01:00
Mike McQuaid
8b28731d33
requirement: tweak syntax. 2021-06-15 12:52:39 +01:00
Kid
a998c364f4
Reduce potential modifications to frozen string 2021-06-14 23:19:21 +08:00
Rylan Polster
70d020b6b3
requirement: don't merge formula and cask cache in ::expand 2021-05-31 02:46:45 -04:00
Bo Anderson
e49a338896
Implement caching for dependency expansion 2021-03-20 16:56:00 +00:00
Markus Reiter
5be4c9b5e0 Upgrade typed sigils. 2020-11-25 17:04:19 +01:00
Markus Reiter
3c2ec1c60f Deprecate remaining cask commands. 2020-11-21 19:56:12 +01:00
Markus Reiter
0184e271d8 Fix RuboCop offenses. 2020-11-17 11:09:55 +01:00
Markus Reiter
da9289eff0 Add more type signatures. 2020-11-13 12:26:36 +01:00
EricFromCanada
212367c1c0 requirements: reword error messages for consistency
also add formatting to download URLs
2020-11-01 15:20:02 -05:00
EricFromCanada
635233b37e requirements: reword inspect() to place tags at end
This more closely matches requirements' display in the DSL.
2020-11-01 15:20:02 -05:00
EricFromCanada
a232ac8b1e requirements: improve display in brew info 2020-11-01 15:20:02 -05:00
Markus Reiter
24ae318a3d Move type annotations into files. 2020-10-10 14:59:39 +02:00
Markus Reiter
c975ff98a0 Document Requirement. 2020-08-26 03:13:59 +02:00
Mike McQuaid
3a91c37e66
Fix RuboCop checks. 2020-08-19 17:12:32 +01:00
Markus Reiter
8d97029b03
Merge pull request #8084 from reitermarkus/cli-parser
Refactor usage of global `Homebrew.args`.
2020-07-30 11:44:12 +02:00
Mike McQuaid
4888a677c7
Merge pull request #8126 from MLH-Fellowship/integrate-deps
deps: Print cask dependencies
2020-07-30 10:20:30 +01:00
Markus Reiter
05365b5542 Pass args more explicitly in FormulaInstaller. 2020-07-30 03:21:12 +02:00
William Ma
cc63cece76 deps: print cask dependencies
* Allow references to commands when using `brew deps`, e.g. `brew deps
cellery`
* Fix crash when using `brew deps <formula> --installed
--include-requirements`
* Do not include runtime dependencies as direct dependencies when using
`--tree`
2020-07-28 20:24:19 -04:00
Markus Reiter
276c570c16 Pass individual args explicitly to ENV extensions. 2020-07-28 02:52:45 +02:00
Markus Reiter
25b3632c4c Pass args to ENV instead of using global args. 2020-07-25 03:57:43 +02:00
Mike McQuaid
12bdb38663
rubocop: brew style --fix autocorrections. 2020-05-12 08:32:27 +01:00
Mike McQuaid
36dbad3922
Add frozen_string_literal to all files. 2019-04-20 13:27:36 +09:00
EricFromCanada
89f0fcedbe whitespace fixes 2019-04-13 21:32:04 -04:00
EricFromCanada
f97f7b615e deps: allow passing both --installed & --include-requirements
And update docs.
2019-03-14 21:00:21 -04:00
Mike McQuaid
ad1acdc1ad
requirement: fix new RuboCop failures. 2019-01-17 09:57:50 +00:00
Mike McQuaid
fc418fd333
More deprecated/disabled updates
- remove odisabled
- move odeprecated to odisabled
2018-10-24 10:40:39 +01:00
EricFromCanada
20167e5f1b Adjust comments to tidy API docs output. 2018-10-18 21:42:43 -04:00