35 Commits

Author SHA1 Message Date
Thierry Moisan
9de0395c3b
patches audit: add tests for patches corrector 2025-08-10 15:33:35 -04:00
Eric Knibbe
cd6777fc73
audits: quote and reword problem description text 2025-05-30 23:49:26 -04:00
Thierry Moisan
84704c5587
patches audit: bitbucket patches should use api 2025-05-01 22:53:42 -04:00
Issy Long
6ada9a9665
Add clarifying comments to rubocop:disables
- Needed for PR 18842 that adds a `DisableComment` RuboCop to ensure that all RuboCop disables have comments.
2025-01-12 16:59:07 +00:00
Mike McQuaid
ea2892f8ee
brew.rb: handle missing args. 2024-03-07 16:20:20 +00:00
Douglas Eichelberger
26eda5a303
git grep -l '^describe' | xargs gsed -i 's|^describe|RSpec.describe|g' 2024-02-19 13:57:27 +00:00
Douglas Eichelberger
9075cbae62 brew style --fix 2023-04-21 09:58:50 -07:00
Douglas Eichelberger
ac1e6ded9a git grep -l '# typed: false' | xargs gsed -i 's|# typed: false||g' 2023-04-21 09:57:47 -07:00
Issy Long
da734a30c2
Say yes to RuboCop's DisplayCopNames; fix test expectations
- Fixing the test expected output was unbelievably tedious.
- There's been debate about this setting being `false` but in
  https://github.com/Homebrew/brew/pull/15136#issuecomment-1500063225
  we decided that it was worth using the default since RuboCop behaviour changed
  so we'd have had to do some horrible things to keep it as `false` -
  https://github.com/Homebrew/brew/pull/15136#issuecomment-1500037278 -
  and multiple maintainers specify the `--display-cop-names` option to
  `brew style` themselves since it's clearer what's gone wrong.
2023-04-07 19:14:07 +01:00
Bo Anderson
d0e4af8fb5
test/rubocops/patches: silence CodeQL alert 2022-05-20 01:44:05 +01:00
Rylan Polster
ae89577b26
style: re-enable GitLab patch URL check 2021-04-19 11:19:35 -04:00
Rylan Polster
b5dec5fdbd
style: temporarily disable GitLab patch URL check 2021-04-19 09:13:06 -04:00
Jonathan Chang
ef1e07b88b
rubocops/patches: GitLab patches should use .diff
Only `.diff` URLs return output comparable to the diffs from
`git diff --full-index`. While the extra metadata from `.patch` is
nice, the instability of the patch contents is undesirable.

Co-Authored-By: Carlo Cabrera <30379873+carlocab@users.noreply.github.com>
2021-04-19 09:08:14 -04:00
nandahkrishna
d68452f232
rubocops/patches: autocorrect some offenses 2021-03-04 12:36:18 +05:30
Rylan Polster
3e00b3ea28
style: remove RSpec/ExampleLength violations 2021-02-01 20:30:51 -05:00
Seeker
1d8372cbc8 rubocops/*: improve test descriptions 2021-01-14 19:06:37 -08:00
Jonathan Chang
df8e030174 rubocops/patches: use rubocop v1 API 2021-01-12 19:11:43 +11:00
Seeker
ea10192f8b rubocops/patches: GitHub/GitLab patches should end with .patch 2020-10-21 00:03:47 +11:00
Markus Reiter
24ae318a3d Move type annotations into files. 2020-10-10 14:59:39 +02:00
Dustin Rodrigues
de8cc4106a style: don't allow PR/MR urls for patches 2020-08-01 16:20:46 -04:00
Dustin Rodrigues
af3ea7d5aa Revert "style: don't allow PR/MR urls for patches"
This reverts commit 7a2483728c18e9cfb45e4b3f079687ec5a8e1503.
2020-07-28 21:20:46 -04:00
Dustin Rodrigues
7a2483728c style: don't allow PR/MR urls for patches 2020-07-28 10:18:26 -04:00
Mike McQuaid
fa760a2f26
Fix brew style. 2020-07-07 13:12:37 +01:00
Frank Lam
ffb1cc8e19
Find patch nodes nested inside blocks 2020-06-27 03:13:50 +08:00
Frank Lam
644ae115f5
Prepare inline patch specs 2020-06-25 22:29:34 +08:00
Mike McQuaid
ca47992a6c
Fix rubocop-performance brew style. 2020-05-22 08:52:26 +01:00
Alexander Bayandin
b37c3e9cb2 rubocops/patches: suggest url with full_index=1 2020-03-15 11:24:38 +00:00
Mike McQuaid
76711e3222
Fix Rubocop 0.78.0 failures. 2019-12-19 12:01:51 +00:00
Issy Long
1f6168fe8a
Change regexp.match?(string) to string.match?(regexp) everywhere
- Only try to call `.match?` on strings that aren't nil.
2019-10-13 23:22:51 +01:00
Issy Long
fed1bbe029
Disable Metrics/LineLength for long URL lines in patches_spec.rb
- The final two `brew style` offenses were for Metrics/LineLength where
  parsing the GitHub diff URL as a regex took 119/118 lines.
- This disables the cop for each of those long, problematic lines, and
  re-enables them straight afterwards, else they'd apply to the whole file
  from the first occurrence onwards, which we probably don't want?
- I wondered about increasing the LineLength limit to 119 or 120, but
  it appears to have been set for a justifiable reason in 80d75bc0d8.
2019-10-13 16:04:37 +01:00
Issy Long
b78028b9c2
Auto-fix Performance/RegexpMatch offenses 2019-10-13 16:04:26 +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
Claudia
5be80a78f6
Use Homebrew-controlled domain for Cask dummy URLs
In a number of Cask specs, the value of the `homepage` stanza is currently set
to https://example.com. As of 2018-11-28, the TLS certificate served by
example.com seems to be expired, possibly due to an oversight on ICANN’s side.

While the certificate is certainly going to be renewed soon, it would be
desirable for Homebrew’s test result to be less dependent on ICANN’s actions.
This commit changes the homepages of all test Casks to http://brew.sh, whose
domain and TLS certificate are both controlled by Homebrew.
2018-11-28 20:51:55 +01:00
Mike McQuaid
376eac2b8d
rubocops: rename files for consistency.
Make the filenames consistent with the class names.
2018-11-08 14:42:55 +00:00