39 Commits

Author SHA1 Message Date
Mike McQuaid
fe59fde8f8 style: improve Rubocop error handling.
- Check if the JSON is definitely invalid (< 2 characters)
- Output the arguments that were passed to Rubocop
2017-03-08 09:26:07 +00:00
Markus Reiter
f48857d246 Use constants for RuboCop version. 2017-02-12 23:06:35 +01:00
Dominyk Tiller
c2b3f1db27
style: update rubocop to 0.47.1 2017-01-27 21:32:50 +00:00
William Woodruff
d07b9ed7f2
Replace Utils::JSON with corelib JSON calls. 2016-11-20 20:06:25 -05:00
Markus Reiter
e9391481a8 Update RuboCop to 0.45.0. 2016-11-13 23:18:08 +01:00
Mike McQuaid
1f963267b6 Update Rubocop style.
Another look at the current Rubocop rules and how they fit with our
existing and desired future style. Almost all of these changes were
automatic. Split some rules between formulae/brew where brew doesn't
have millions of cases that need fixed.
2016-10-22 13:32:46 +01:00
Markus Reiter
0ab750bf24 Use module_function for commands. 2016-10-02 00:24:47 +02:00
Mike McQuaid
84c29fcf1f Fix JSON output handling. 2016-10-01 17:04:44 +01:00
Mike McQuaid
5b31507fda Use Library/.rubocop.yml file.
This allows having a shared style that’s use for Homebrew/brew and taps
which can be overridden by Homebrew/brew.
2016-10-01 12:13:09 +01:00
Markus Reiter
18a9945ad8 cd to HOMEBREW_LIBRARY is not needed anymore for RuboCop. 2016-09-29 22:58:41 +02:00
Markus Reiter
5800f2f084 Use separate .rubocop.yml in Library/Taps and Library/Homebrew. 2016-09-29 22:58:41 +02:00
Markus Reiter
70fc825787 Use separate RuboCop configs for formulae and core code. 2016-09-29 22:58:41 +02:00
Markus Reiter
ce6994b001 RuboCop has to be run inside HOMEBREW_LIBRARY. 2016-09-23 15:30:06 +02:00
Markus Reiter
21e0a7efb9 Update rubocop dependency to 0.43.0. 2016-09-23 15:30:06 +02:00
Mike McQuaid
263a8a0b73 style: no args default to Library/Homebrew. 2016-09-19 11:18:10 +01:00
Mike McQuaid
3686243e5a style: don't require HOMEBREW_DEVELOPER to fix. 2016-09-19 11:18:09 +01:00
Mike McQuaid
e79f62b2ea style: allow passing taps as arguments. 2016-09-19 11:18:09 +01:00
Mike McQuaid
3982950e61 rubocop --auto-correct all hash-rocket usage. 2016-09-17 16:14:13 +01:00
Margaret Lewicka
b512834243 audit: prevent crash from nil exitstatus (#532)
If rubocop invocation from brew audit exits with nil exitstatus,
brew audit fails with 'undefined method `>' for nil:NilClass'.
2016-07-16 22:58:47 +02:00
Martin Afanasjew
768ba34b14 style: use RuboCop 0.41.2, adjust defaults (#489)
Changes to our style configuration:

- Consolidate all rules related to Ruby 1.8 compatibility in one place.
- Codify our de-facto preference for `alias_method` over `alias` (drops
  offense count by 54 after turning this on).
- Drop `Style/SignalException` as `only_raise` has been the new default
  for quite a while (since RuboCop 0.37.0).
2016-07-12 07:49:55 +02:00
Martin Afanasjew
a49f3a8e91 style: use RuboCop 0.41.1 (#433)
Tweak `Style/NumericLiteralPrefix` cop settings as we're using octal
literals a lot (both in formulae and the package manager) for file
permissions and aren't ready just yet to transition them to the more
beginner-friendly `0o` prefix (instead of the more obscure `0` prefix).
2016-07-04 07:19:44 +02:00
Martin Afanasjew
8b97a00036 style: use RuboCop 0.40 2016-06-01 09:34:58 +02:00
Andrew Janke
a3b70d38a7 brew-audit: pull style checks in to main audit output
This collects all violations for each formula in a single place, instead
of doing `brew style` outputs for all formulae first, and then the other
audit checks.

Closes #112.

Signed-off-by: Andrew Janke <andrew@apjanke.net>
2016-04-21 14:45:33 -04:00
Dominyk Tiller
b70e4341fe style: use rubocop 0.39
(#85)
2016-04-14 14:44:23 +01:00
Dominyk Tiller
b389953f5b style: update rubocop to 0.37.2
Closes Homebrew/homebrew#49084.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
2016-02-13 02:16:17 +00:00
Bob W. Hogg
3e0828c29a Rubocop: upgrade to version 0.36.0
Stop using Style/TrailingComma as it is no longer recognized and start using
Style/TrailingCommaInArguments and Style/TrailingCommaInLiteral instead.

Closes Homebrew/homebrew#48144.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-01-17 16:26:49 +08:00
Dominyk Tiller
4296ec63eb rubocop: update to 0.35.1 2015-11-10 19:21:37 +00:00
Dominyk Tiller
87769ee970 style: update rubocop to 0.34.2 2015-09-24 02:18:50 +01:00
Dominyk Tiller
9dc461cb9f style: update rubocop 2015-09-09 15:58:33 +01:00
Tomasz Pajor
c4ceaabfc1 style: update to rubocop 0.34.0.
Closes Homebrew/homebrew#43650.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-09-08 15:08:46 +01:00
Xu Cheng
3f8ce5f1a9 update rubocop to 0.33.0 2015-08-06 17:23:55 +08:00
Xu Cheng
2c3084a0a2 style: allow passing arbitrary file paths 2015-08-06 17:23:55 +08:00
Mike McQuaid
e4ef7f8cb7 Don't try to Rubocop vendored files. 2015-08-03 18:47:23 +08:00
Dominyk Tiller
83d6c946af style: bump rubocop to 0.32.1
Closes Homebrew/homebrew#41049.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
2015-06-25 00:12:18 +01:00
Dominyk Tiller
1cc6fa2e05 style: bump rubocop to 0.32.0
Closes Homebrew/homebrew#40506.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-06-09 09:20:57 +01:00
Mike McQuaid
0a2dd832b9 Install specific Rubocop version.
Closes Homebrew/homebrew#39620.
2015-05-14 16:05:00 +01:00
Baptiste Fontaine
04508b0c4d brew style: --fix to auto-correct issues.
Closes Homebrew/homebrew#37670.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-03-13 13:21:15 +00:00
Mike McQuaid
3821c190f9 style: explicitly point to config file.
Closes Homebrew/homebrew#35556.
2015-01-05 08:01:20 +00:00
Mike McQuaid
e0cacd3008 style: run Rubocop on formulae (new command) 2015-01-04 11:05:34 +00:00