112 Commits

Author SHA1 Message Date
Mike McQuaid
4132ccbf66
rubocop.yml: remove formula exclusions.
These have now been fixed so are no longer needed.
2020-04-18 14:53:32 +01:00
Mike McQuaid
bc96428207
rubocop.yml: enable new rules. 2020-04-17 11:04:33 +01:00
Mike McQuaid
d52e870b07
rubocop: remove NewFormulaAudit.
This is no longer used anywhere.
2020-04-13 16:01:26 +01:00
Mike McQuaid
845c71270e
rubocop.yml: enable non-default checks.
Closes https://github.com/Homebrew/brew/pull/7258
2020-04-03 14:54:50 +01:00
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
c7c9f83ff6
rubocop.yml: reduce Max LineLength.
Fixed the formulae in homebrew/core. Slowly but surely...
2020-03-05 12:22:40 +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
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
e095da4d01
rubocop: enable Layout/EmptyLineAfterGuardClause. 2019-02-21 12:55:49 +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
Mike McQuaid
b34994b085
.rubocop.yml: brew style fixes.
- uncomment `ModuleLength` disable.
- don't enforce hash rockets for external commands
2018-12-03 13:23:20 +01:00
Markus Reiter
f858a17e96 Deduplicate RuboCop config. 2018-11-13 05:01:13 +01:00
Markus Reiter
04908dcb19 Fix RuboCop for Casks. 2018-11-12 05:01:33 +01:00
Mike McQuaid
ec3e7b2ae5
.rubocop.yml: merge rubocop-cask configuration. 2018-11-08 15:54:47 +00:00
Mike McQuaid
acd7f5714e
rubocop.yml: configure Hash alignment. 2018-11-02 17:28:44 +00:00
Mike McQuaid
800853a28d
Vendor rubocop-rspec
We aren't going to vendor its dependencies because we already require
a systemwide installation of `rubocop` to work in your editor. This
avoids requiring users to manually do another
`gem install rubocop-rspec` to have their editor integration behave as
expected.
2018-10-14 12:11:54 -07:00
Mike McQuaid
960207295b
rubocop.yml: reduce linelength. 2018-10-13 18:45:39 -07:00
Jan Viljanen
ce530fd0f5 move rspec pattern 2018-10-09 22:10:25 +02:00
Jan Viljanen
aa6912425e rubocop: move rspec include to root config file
To avoid confusion and bugs in rubocop robucop-spec should be required
from the root config.
2018-10-08 20:08:38 +02:00
commitay
737c9ad816 Library/.rubocop.yml: disable RescueEnsureAlignment 2018-09-18 10:30:59 +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
Mike McQuaid
bcb1ec5499
Improve Homebrew/brew line length.
Use 124 max line length everywhere. Also, reduce tap max line length to
189 as Homebrew/homebrew-core has that as a maximum now. In future
Homebrew/homebrew-core will also be reduced to 124 maximum line length.
2018-09-02 16:15:09 +01:00
Mike McQuaid
718a2112d7 rubocop.yml: adjust rules for 0.53.0. 2018-03-08 14:10:02 +00:00
ilovezfs
da77f23bc7 rubocop: don't always display cop names. 2018-01-21 07:23:53 -08:00
Mike McQuaid
8cd0d85afb rubocop 0.52.1 2018-01-15 16:17:32 +00:00
Mike McQuaid
5a8d2352c2 rubocop.yml: reduce tap maximum line length. 2017-10-27 14:20:33 +01:00
Mike McQuaid
1f259c2777 rubocop: disable length checks.
We should keep these enabled for Homebrew/brew but for taps these just
end up being annoying and making `brew style` fail for little benefit
2017-10-26 15:52:14 +01:00
Markus Reiter
f0a512ace4 Don’t use Style/StderrPuts. 2017-10-24 19:39:40 +02:00
Gautham Goli
7b2fab8ec5 Merge branch 'master' into audit_line_rubocop_part_4_rebase_attempt_1 2017-10-21 13:53:44 +05:30
Gautham Goli
bdc7eba4b3 Merge branch 'master' into audit_line_rubocop_part_4_rebase_attempt_1 2017-10-21 01:48:00 +05:30
Mike McQuaid
76cd7c7949 Merge pull request #3319 from reitermarkus/squiggly-heredocs
Use “squiggly” heredocs.
2017-10-20 14:10:50 +01:00
Markus Reiter
9bee9ca575 Use “squiggly” heredocs. 2017-10-18 14:39:09 +02:00
Mike McQuaid
558299b039 rubocop.yml: ignore length of manpage comments. 2017-10-18 10:29:36 +01:00
Gautham Goli
7fa51f71f1 Merge branch 'master' into audit_line_rubocop_part_4_rebase_attempt_1 2017-10-13 19:50:46 +05:30
Markus Reiter
30b84ac6f3 Merge pull request #3303 from reitermarkus/special-file-names
Properly handle special characters in file names.
2017-10-12 19:56:06 +02:00
Markus Reiter
04363b25a3 Properly handle special characters in file names. 2017-10-11 17:43:54 +02:00
Markus Reiter
71b6e239d7 Set RuboCop maximum to current maximum. 2017-10-10 17:00:04 +02:00
Mike McQuaid
9eb51db400 Rubocop 0.50 and target 2.3. 2017-09-24 21:23:59 +01:00
Gautham Goli
4295a4ca78 audit: Port rules from line_problems to rubocop part 4(WIP-2) 2017-08-10 19:57:53 +05:30
Gautham Goli
086e540231 Add a rubocop config file to control cops' execution in audit and style 2017-07-18 20:23:03 +05:30
Gautham Goli
5b3231ea0a style: disable NewFormulaAudit cops' execution by default unless specified 2017-07-15 22:40:26 +05:30
Mike McQuaid
207ffd6d4f rubocop: disable NewFormulaAudit/Options.
This is activated on every formula otherwise.
2017-07-15 17:09:35 +01:00
Gautham Goli
a8f1b02be9 audit: Port audit_options rules for new formulae to rubocop and add test 2017-07-15 17:35:10 +05:30
Gautham Goli
f3923f23ef audit: Port audit_options strict rules to rubocop and add tests 2017-07-14 21:43:16 +05:30
Gautham Goli
b8adc1a8aa audit: Port audit_options non-strict rules to rubocop and add tests 2017-07-13 12:41:43 +05:30