Markus Reiter
480e264d9a
Lint Ruby docs.
2024-05-01 11:35:21 +02:00
Markus Reiter
caf87c0336
Warn about undocumented non-private APIs.
2024-05-01 11:35:20 +02:00
Douglas Eichelberger
08af78a2a5
brew style --fix
2023-04-25 09:26:24 -07:00
Issy Long
7bb20a3b83
Skip if the URL stanza has only two path components
...
https://github.com/Homebrew/homebrew-cask-fonts/pull/7336#discussion_r1156325651
2023-04-04 16:11:44 +01:00
Issy Long
28f8cbe8da
Handle when the URL has interpolation: use source
not str_content
...
- We see this a lot in real Casks.
2023-04-02 23:39:43 +01:00
Issy Long
41c35986f8
Simplify the 'should not start with https?://' message wording
...
Co-authored-by: Markus Reiter <me@reitermark.us>
2023-04-02 22:43:57 +01:00
Issy Long
21da074346
Only 'verified' stanzas with 0 or >1 path components should end with "/"
...
Handle good things like:
```ruby
url "https://example.org/download ",
verified: "example.org/download" # This is fine.
```
And bad things like:
```ruby
url "https://example.org/ ",
verified: "example.org" # This should end with a slash.
```
2023-04-02 22:26:23 +01:00
Issy Long
17c0eaab25
Fix indentation of verified
in url
stanza examples
2023-04-02 16:41:29 +01:00
Issy Long
b586d97f84
rubocops/cask: Ensure that "verified" URLs with paths end with "/"
...
- These were being fixed manually[1], so let's make a RuboCop for any
further occurrences since this is a good rule to enforce[2].
[1] - https://github.com/Homebrew/homebrew-cask/pull/144179#issuecomment-1489857249
[2] - https://github.com/Homebrew/homebrew-cask/pull/80965#issuecomment-616232313
2023-04-02 15:29:53 +01:00
Issy Long
4e067565dd
rubocops/cask/url: Fix test expectations; regexp for starts_with?
2023-03-05 16:55:47 +00:00
Issy Long
4791224acf
rubocops/cask/url: Remove unnecessary require "forwardable"
2023-03-05 16:38:10 +00:00
Issy Long
79db987215
rubocops/cask: Disallow protocol in cask URL verified stanza
...
- Apparently the "verified" parameter in the URL (present when a Cask's
download URL is not the same as its homepage) shouldn't have the
protocol (`https`, `http`) at the front.
- Removing this has happened manually in the past, so here's an
autocorrecting RuboCop for it.
2023-03-04 23:00:04 +00:00