31 Commits

Author SHA1 Message Date
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
Eric Knibbe
cd6777fc73
audits: quote and reword problem description text 2025-05-30 23:49:26 -04:00
Colin Dean
d5b3ae095c
Prohibit non-ASCII characters in URLs, nudge toward punycode
Inspired by curl's blog post, [Detecting malicious Unicode][1], this likely captures most if not all cases and nudges the user toward supplying IDNs with punycode.

A possible improvement would be telling the user exactly what punycode domain to use instead, but that may require another library as I can't quickly find something built into the Ruby stdlib that handles punycode encoding.

[1]: https://daniel.haxx.se/blog/2025/05/16/detecting-malicious-unicode/

Co-authored-by: Štefan Baebler <319826+stefanb@users.noreply.github.com>
2025-05-21 12:42:07 +01:00
Eric Knibbe
4932fb7fd0
rubocops/urls: remove dead link 2024-05-06 22:57:23 -04: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
Issy Long
3a83b5492c
rubocop: Clean up Style/BlockDelimiters excludes and autofix offenses
- The defaults of using "do ... end" for multi-line blocks everywhere is
  good, better than switching everything to braces everywhere.
2023-03-08 23:54:22 +00:00
Rylan Polster
d5d7b6c3db
style: remove RSpec/MultipleDescribes violations
Co-authored-by: Nanda H Krishna <nanda.harishankar@gmail.com>
2021-02-01 20:30:51 -05:00
EricFromCanada
a427de5bee capitalization fixes
"curl" is the binary, while "cURL" is the umbrella project.
2021-01-26 15:36:44 -05:00
Seeker
7e75d8342b rubocops/urls: rename formulae to offense_list 2021-01-15 08:26:50 -08:00
Seeker
1d8372cbc8 rubocops/*: improve test descriptions 2021-01-14 19:06:37 -08:00
Jonathan Chang
098ade1319 rubocops/urls: use rubocop v1 API 2021-01-12 19:11:43 +11:00
souleater7
e50e3e4b22 Delete references to devel 2021-01-01 10:16:31 -08:00
Rylan Polster
7a8dd36003 Migrate BINARY_BOOTSTRAP_FORMULA_URLS_ALLOWLIST 2020-11-30 18:18:50 -05:00
Markus Reiter
24ae318a3d Move type annotations into files. 2020-10-10 14:59:39 +02:00
Rylan Polster
a91730316c style: only require tag for git urls with --strict 2020-10-03 15:51:30 -04:00
Rylan Polster
c84b5f985f style: require tag and revision for git urls 2020-10-03 12:27:01 -04:00
Rylan Polster
70dfaf3b42 Add link to pypi downloads page to problem message 2020-07-18 14:22:05 -04:00
Rylan Polster
5f3f7d010b Require long urls for pypi and pythonhosted urls 2020-07-18 14:05:46 -04:00
Issy Long
0041ea21f5
Change occurrences of "whitelist" to "allowlist" 2020-06-06 22:38:32 +01:00
Mathäus Zingerle
bb9665ced8 Migrate scheme checks for cvs, bzr, hg, fossil, and svn+http to Rubocop 2020-05-20 20:52:00 -05:00
Mike McQuaid
56c02485e0
rubocops: test whitelists. 2020-04-12 14:17:05 +01:00
EricFromCanada
29006396dd audit: check apache.org URLs 2020-02-24 13:07:46 -05:00
Jonathan Chang
779304df68 audit: add "homebrew/core" for relevant checks 2020-01-08 15:38:48 -05:00
Mike McQuaid
4add1d1cb3
Check binary URL resources with RuboCop
- Migrate the existing binary URL audit to a RuboCop.
- Check resources as well as main URLs
- Also check for "macos" and "osx" in URLs
- Add whitelists for URLs and formulae
2019-09-02 10:50:49 +01:00
Mike McQuaid
36dbad3922
Add frozen_string_literal to all files. 2019-04-20 13:27:36 +09:00
Mike McQuaid
75257886f2
Cleanup some RSpec tests
Fix some Rubocop RSpec checks, update some values and improve
documentation.
2019-03-28 19:16:56 +00: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