124 Commits

Author SHA1 Message Date
Lukas Oberhuber
c442250304 Increase Metrics/BlockLength limit for install_args
Instead of disabling the cop for that block
2022-07-26 19:27:23 +01:00
Bo Anderson
3e75b165ae
utils/github: rewrite get_workflow_run using GraphQL 2022-04-11 20:35:03 +01:00
Bob Lail
26ea79e1e6 Increase Metrics/BlockLength limit instead of disabling the cop for the block in install_args 2022-01-11 08:34:51 -06:00
Bo Anderson
6e37c67fba
Fix disabled args appearing in documentation. 2021-12-17 02:02:45 +00:00
Mike McQuaid
11c5f8f05a
Improve discovery of some environment variables
There's a few bits of functionality that Homebrew has changed over the
years, makes sense as a sensible default but some people find really
annoying:

- automatically running `brew update`
- automatically running `brew cleanup`
- automatically upgrading outdated dependents
- automatically reinstalling broken dependents

For each of these: let's improve the documentation of the commands
whose behaviour is changed and the environment variables themselves.
2021-11-25 09:10:59 +00:00
Rylan Polster
d04beed361
style: exclude utils/gems.rb from Bundler/GemFilename cop 2021-08-26 23:29:47 -04:00
Mike McQuaid
d44d686cd5
dev-cmd: avoid uploading identical bottles.
If the `rebuild`, `root_url`, `cellar` and checksums are all identical
between an old and new bottle block: we don't need a new bottle at
all. Handle this by deleting the relevant files with
`brew bottle --merge --write` and gracefully notifying the caller of
`brew pr-upload`.

This should avoid e.g.
39340a11ea
occurring in future.
2021-04-29 14:48:45 +01:00
Mike McQuaid
16d5472e4b
dev-cmd/bottle: improve filename handling.
Rely more heavily on the `Bottle::Filename` class rather than hacking
around things manually.

Without this the rebuilding bottles workflow is broken for `all:`
bottles.
2021-04-28 17:10:46 +01:00
Mike McQuaid
8800b85f64
More GitHub Packages bulk upload fixes
- replace invalid non-ASCII characters from the descriptions
- handle invalid macOS versions on attempting to load old formulae from
  old bottles
- let `rubocop` auto-remove a no-longer needed `rubocop:disable`
- fix `skopeo` credentials argument
2021-04-07 17:03:44 +01:00
Mike McQuaid
d8a2cf9efc
Write tabs to bottle JSON, optionally not bottle
- Write a subset of the tab required for bottles as an annotation.
- Add option on new bottle creation to skip writing tab into bottle
  and instead add it (and other useful metadata) to bottle JSON.
- Read formula information and tab from bottle JSON.
- Write prettier JSON to disk.
- Don't write `HEAD` to tab; this duplicates `HOMEBREW_VERSION`.
- Allow `brew bottle` to use `--json` to generate JSON files from a
  local bottle file.
2021-03-31 09:43:37 +01:00
nandahkrishna
9d8a5827a3
utils/github: split module 2021-02-15 21:08:10 +05:30
nandahkrishna
8e5451df2f
style: use parentheses for assignment in conditions 2021-02-12 18:33:37 +05:30
nandahkrishna
15f936a22a
dev-cmd/update-maintainers: implement suggestions from code review 2021-02-08 23:33:26 +05:30
nandahkrishna
6026c7c74d
brew update-maintainers: dev-cmd to update maintainers in README 2021-02-08 23:33:25 +05:30
Mike McQuaid
92d107d666
Autoformat YAML files
Extracted the `.rubocop_todo.yml` change from #10397 so thought I'd do
this to all committed (non-vendor) YAML files.
2021-01-26 10:16:32 +00:00
Seeker
fbafaff4fe rubocop: require braces for Sorbet sig 2021-01-18 16:52:45 -08:00
Markus Reiter
b1000952b1 Make LazyObject type-checkable. 2021-01-13 10:46:28 +01:00
Markus Reiter
73dc98d1c7 Adjust RuboCop rules for Sorbet. 2020-10-11 00:30:09 +02:00
Markus Reiter
21d57a0c44 Move RuboCop rules into top-level .rubocop.yml. 2020-09-01 12:52:59 +02:00
Markus Reiter
097ef39bab Add .rubocop_todo.yml for documentation. 2020-08-26 03:13:59 +02:00
Rylan Polster
60ec30d41e formula: update license specification 2020-08-19 12:48:50 -04:00
Mike McQuaid
3a91c37e66
Fix RuboCop checks. 2020-08-19 17:12:32 +01:00
Jonathan Chang
fa80b484f1
license: style fixes
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2020-08-05 20:26:13 +10:00
Jonathan Chang
839f52006c rubocop: let test/dev-cmd/audit_spec be longer 2020-08-05 12:53:58 +10:00
Mike McQuaid
754beb64fc
rubocop: exclude formula.rb from ClassLength.
We want to allow this class to grow larger still while still enforcing
this on other classes.
2020-08-04 14:03:11 +01:00
Mike McQuaid
25db60ebbb
Unify (mostly) Homebrew code style
Make the Homebrew/cask and Homebrew/homebrew-core style more closely
match the rest of Homebrew.

To accomplish this:
- Run `brew cask style` to ensure we don't break style there when
  making changes or upgrading RuboCop in Homebrew/brew.
- Fix the HomepageMatchesUrl cop to better handle weird input.
- Remove the now unneeded `.rubocop_shared.yml`
- Fix the cask fixtures with `brew cask style --fix`.
- Share more style between Homebrew/brew, casks and formulae.
2020-07-27 12:57:40 +01:00
Mike McQuaid
f951ea83d4
Fix brew style. 2020-07-07 12:23:29 +01:00
Mike McQuaid
dd50714d1e
Fix RuboCop failures. 2020-06-22 14:09:33 +01:00
Issy Long
0041ea21f5
Change occurrences of "whitelist" to "allowlist" 2020-06-06 22:38:32 +01:00
nandahkrishna
77e74e7e69
Adding livecheck Formula DSL 2020-05-11 09:41:13 +05:30
Mike McQuaid
c040331468
rubocop: enable Style/TrailingBodyOnMethodDefinition.
This is default, more consistent with Ruby style and autocorrectable.

I have updated the usage in Homebrew/core to be consistent.
2020-03-14 19:46:23 +00:00
Mike McQuaid
4498303f9a
rubocop: adjust rules. 2020-03-13 21:16:18 +00:00
Mike McQuaid
cd3ced48e9
rubocop: set LineLength to 118.
GitHub diff UI wraps beyond 118 characters. This also allows enabling
`Style/IfUnlessModifier` (which autocorrects).
2020-03-12 20:39:53 +00:00
Mike McQuaid
76711e3222
Fix Rubocop 0.78.0 failures. 2019-12-19 12:01:51 +00:00
Mike McQuaid
766fc4b301
Fix RuboCop 0.77.0 failures. 2019-11-28 15:10:50 +00:00
Sean Molenaar
0cca6cb8bd
Audit gitlab.com repositories 2019-09-05 12:14:33 +02:00
Mike McQuaid
a4f86ba973
Don’t require aligned arguments for taps. 2019-04-30 09:19:29 +01:00
Mike McQuaid
f76b083b91
Use FrozenStringLiteralComment instead of flag.
Unfortunately we cannot use `--frozen-string-literal` with Ruby 2.3 due
to https://bugs.ruby-lang.org/issues/12031 and our usage of ERB.
2019-04-20 13:25:33 +09:00
Mike McQuaid
420e63ebcd
Freeze more mutable constants.
This rule adjustment is experimental in RuboCop as it may double-freeze
objects but this isn't an error (and freezing too much is better than
too little).
2019-04-19 18:08:05 +09:00
Mike McQuaid
d64429a736
rubocop: enable Style/IfUnlessModifier. 2019-02-21 12:55:49 +00:00
Mike McQuaid
eed1444d61
Update deprecations and cleanup
- Move `odeprecated` to `odisabled`
- Remove `odisabled`
- Enable automatic cleanup on install/reinstall/upgrade.
2019-01-23 21:57:40 +00:00
Mike McQuaid
5c7fbaf259
Update RuboCop RSpec rules
Create a new, seperate RuboCop file that uses our RSpec rule
configuration if a specified tap has a `spec` directory.

Also, while we're here, fix up the various rules so that we don't have
any outdated TODOs, disable some rules for good and fix `brew style`
for Homebrew/bundle.
2019-01-21 13:39:11 +00:00
Markus Reiter
04908dcb19 Fix RuboCop for Casks. 2018-11-12 05:01:33 +01:00
Jan Viljanen
3a73c6c9b2 remove exclusions 2018-09-30 16:40:20 +02:00
Jan Viljanen
e5b3b7e326 further updates 2018-09-30 15:35:49 +02:00
Jan Viljanen
53109455b8 move requirement 2018-09-28 18:09:03 +02:00
Mike McQuaid
79c2ccd0bc
Generate rubocop_todo.yml for RuboCop RSpec 2018-09-20 13:36:42 +01:00
commitay
b3e39014c9 Library/Homebrew/.rubocop.yml: remove RescueEnsureAlignment 2018-09-18 13:21:17 +10:00
Markus Reiter
e9b9ea49a1 Update to RuboCop 0.59.1. 2018-09-17 03:45:59 +02:00
Mike McQuaid
80d75bc0d8
Homebrew/.rubocop: tweak rules.
Adjust the rules based on the current codebase. Remove various enable,
disables and default values that are unnecessary. Add more comments
explaining why. Make minor changes needed to enable a few more rules.
2018-09-02 20:15:09 +01:00