37 Commits

Author SHA1 Message Date
Rylan Polster
5d13ce9280
Remove unused cask url do code 2025-08-23 15:02:23 -04:00
Mike McQuaid
d661cffc1f
Switch to using main as the default branch
Homebrew/brew has moved to a `main` default branch so we can more move
references from `master` to `main`.
2025-06-24 11:14:57 +01:00
Sam Ford
9c69859f99
Add Cask::Config RBI compiler
This is a naive attempt at creating an RBI compiler for the
`Cask::Config` class. `Config` contains methods like `appdir` that
are defined dynamically using the class's default values and Sorbet
doesn't understand that these methods exist or what their return
types are. This compiler works as expected and gets the job done but
I know basically nothing about Tapioca, so there may be a better way
of doing this.

For what it's worth, this isn't an issue right now but Sorbet will
surface an error once `Cask::DSL` is updated to `typed: strict` (i.e.,
`Method appdir does not exist on Cask::Config`). That's something
I've been working on and this compiler is intended as a way of
preemptively resolving that Sorbet error, so I can move forward with
the `Cask::DSL` type signature work.
2025-06-16 23:49:01 -04:00
Douglas Eichelberger
fcf18912fe
Inline use of attr_predicate 2025-03-02 21:36:03 -08:00
Douglas Eichelberger
3ef22f3181
Inline use of attr_rw 2025-02-23 13:18:49 -08:00
Douglas Eichelberger
d8c790dddc Use delegation to create Cask DSL methods 2025-02-11 08:33:04 -08:00
Issy Long
9a97456767
Bump more Cask RuboCops to Sorbet typed: strict
- This includes a new Tapioca compiler for
  `RuboCop::Cask::AST::Stanza` dynamic methods like
  `caveats?`.
2025-01-25 18:45:24 +00:00
Douglas Eichelberger
3a4243742f Remove OpenStruct from CLI::Args 2024-12-08 10:27:49 -08:00
Douglas Eichelberger
70641dcb58 Remove casts 2024-10-14 21:45:50 -07:00
Douglas Eichelberger
ced4a3a91f Migrate Parlour extensions to Tapioca compilers 2024-10-14 19:50:09 -07:00
Douglas Eichelberger
6eaf122144 Add a Delegator DSL compiler 2024-10-05 19:36:54 -07:00
Douglas Eichelberger
eeb31d3050 Fix violations 2024-09-20 11:07:00 -07:00
Douglas Eichelberger
df2fcfdfb0 Add missing sigs 2024-08-15 09:21:43 -07:00
Douglas Eichelberger
70b072a7d0 Suppress sorbet type errors when using `undef' 2024-08-15 08:03:45 -07:00
Bo Anderson
05d6c06c84
tapioca/compilers/args: remove non-AbstractCommand handling 2024-07-31 17:30:31 +01:00
Douglas Eichelberger
7bfa552702 Individually namespace args for each command 2024-04-21 16:51:31 -07:00
Issy Long
75db3b8e21
Apply suggestions from code review
Co-authored-by: Douglas Eichelberger <697964+dduugg@users.noreply.github.com>
2024-03-30 19:54:51 +00:00
Issy Long
9dfe11870e
Convert the EnvConfig RBI generator to a Tapioca compiler 2024-03-30 18:30:20 +00:00
Issy Long
db39e939b0
Apply suggestions from code review 2024-03-30 18:00:39 +00:00
Issy Long
e4a1f3319c
Tty methods are class methods 2024-03-29 00:41:56 +00:00
Issy Long
bbf5825d54
Appease RuboCop 2024-03-29 00:41:56 +00:00
Douglas Eichelberger
769547e7e3
Use create_module instead 2024-03-29 00:41:56 +00:00
Issy Long
05b716613b
Convert the utils/tty RBI generator to a Tapioca compiler
- The preferred way of doing RBI generation is via Tapioca. So I am
  trying to stop being intimidated by it, by learning how it works.
- This is very WIP still, currently failing with the following message
  because the `module` name is missing in the generated RBI file.

```
There are parse errors in the generated RBI files.

Errors:
  sorbet/rbi/dsl/tty.rbi:8: unexpected token tNL (2001)
  sorbet/rbi/dsl/tty.rbi:64: unexpected token "end" (2001)
```
2024-03-29 00:41:56 +00:00
Douglas Eichelberger
a2492c25a2 Remove NON_PARSER_ARGS_METHODS 2024-03-22 09:33:28 -07:00
Douglas Eichelberger
cae62e0175 Update Command API 2024-03-20 10:16:17 -07:00
Douglas Eichelberger
133b9382f0 Improve readability 2024-03-17 09:29:40 -07:00
Douglas Eichelberger
4b358fc713 Extract global args 2024-03-16 11:15:03 -07:00
Douglas Eichelberger
625206b0bd Avoid duplicating global options 2024-03-15 16:30:09 -07:00
Douglas Eichelberger
dfa01a5a84 Update args compiler 2024-03-15 14:24:26 -07:00
Douglas Eichelberger
68cce23e15 Add tests 2024-03-13 22:02:03 -07:00
Douglas Eichelberger
5888cd8607 Fix root namespace 2024-03-12 16:34:04 -07:00
Douglas Eichelberger
76932fdf7e Add tapioca compiler for Homebrew::CLI::Args 2024-03-12 16:34:04 -07:00
Douglas Eichelberger
439c8c1819 Tighten up the types 2024-02-11 20:47:22 -08:00
Douglas Eichelberger
aab04229d1 Code review fixes 2024-02-11 20:27:39 -08:00
Douglas Eichelberger
791ca27896 Add rubocop exclusion 2024-02-11 20:27:38 -08:00
Douglas Eichelberger
adfec16871 Make gather_constants dynamic 2024-02-11 20:27:38 -08:00
Douglas Eichelberger
b2dc842238 wip 2024-02-11 20:27:38 -08:00