68 Commits

Author SHA1 Message Date
Mike McQuaid
892d0ac5fe
style: don’t run shellcheck on specified ruby file. 2019-04-18 21:42:42 +09:00
Mike McQuaid
d64429a736
rubocop: enable Style/IfUnlessModifier. 2019-02-21 12:55:49 +00:00
Mike McQuaid
02a70496b6
style: better handle file arguments.
Fixes #5588.
2019-01-23 15:46:03 +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
efc3c0c4c0
Use bundle install in more places.
This provides a more consistent version for `rubocop` than relying on
`Homebrew.install_gem_setup_path!` (and we really want `brew style` to
provide consistent output).
2019-01-08 15:08:21 +00:00
Mike McQuaid
109e974c38
Cleanup rubocop-cask references. 2018-11-08 15:54:47 +00:00
Jan Viljanen
bca922fd5b rubocop: only use config if style is testing specified file(s) 2018-10-08 20:08:37 +02:00
Mike McQuaid
96504ec9dc
style: check Bash style with shellcheck 2018-10-07 22:08:43 +01:00
Jan Viljanen
25b9a7d35b rubocop: move requirement to configuration file
If you are using en external rubocop binary you will encounter the
following error.

.rubocop_todo.yml: RSpec/FilePath has the wrong namespace - should be Rails

By moving the option to the config file an external rubocop would be
treated equally to  brew style  without having to supply additional
command line options.
2018-09-27 04:33:11 +02:00
Mike McQuaid
da404fcb4e
Install and use RuboCop RSpec by default. 2018-09-20 13:36:41 +01:00
Markus Reiter
e9b9ea49a1 Update to RuboCop 0.59.1. 2018-09-17 03:45:59 +02: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
Gautham Goli
32bc5535b6
style: Fix npe and add test for corrected offense results 2018-08-28 23:31:35 +05:30
Gautham Goli
b82dbdcfa8
audit: Show RuboCop offense correction status in output when --fix is passed 2018-08-26 19:33:19 +05:30
Markus Reiter
bf856117ba Allow unused keyword arguments. 2018-07-12 10:39:27 +02:00
Andrew Janke
c0b7aa00e4 brew style: assume files under Library are no-formulae 2018-06-13 14:06:23 -04:00
Markus Reiter
aaddce4743 Add stderr output to exception. 2018-06-11 03:18:47 +02:00
Andrew Janke
8b55cb5ecb Refactor commands to remove "require cmd/help" 2018-06-07 04:59:59 -04:00