Mike McQuaid
872bd4f703
Merge pull request #3395 from GauthamGoli/parameters-audit-regex-fix
...
lines_cop: Update regex patterns to prevent false positives
2017-11-03 17:48:09 +00:00
Isabell Long
5cbb414797
formula_desc_cop: Fix the 'full stop at end of description' autocorrect
...
- It wasn't working because desc strings end in quotes, not just full
stops.
2017-11-01 19:50:56 +00:00
Isabell Long
0786d41693
formula_desc_cop: If desc ends with 'etc.', it's not a violation
2017-11-01 19:50:56 +00:00
Dominyk Tiller
883fee78ad
text_cop: warn against go_resource usage for strict audit
2017-10-31 00:55:00 +00:00
Dominyk Tiller
8fd18eab21
text_cop: drop go_resource recommendation
2017-10-31 00:47:57 +00:00
Gautham Goli
f648dd03ff
lines_cop: Update regex patterns to prevent false positives
2017-10-29 23:40:04 +05:30
Isabell Long
640b1e9dcb
formula_desc_cop: ensure no full stops at the end of desc
...
- This was a suggestion by Mike McQuaid in my `homebrew-core` audit
description PR. Based on ilovezfs's incantation `grep -r -E 'desc
".*\."' *.rb`, some formulae descriptions do end in full stops. (My
initial assessment of this failed to account for the fact that
descriptions are strings and so end in `"`.)
- Add an autocorrect for this cop, too.
2017-10-29 15:19:31 +00:00
Mike McQuaid
d985838428
lines_cop: add missing e.g. clang++ regex SOL.
...
You need a start of line check in this regex (like was added in the
others) to allow things like `#{bin}/clang++`.
2017-10-27 14:58:07 +01:00
Gautham Goli
09326909af
lines_cop: Fix detection of negated expression
2017-10-26 15:35:14 +05:30
Mike McQuaid
0cec599b28
Merge pull request #3361 from MikeMcQuaid/lines_cop_clang
...
lines_cop: fix clang detection.
2017-10-25 08:02:33 +01:00
Markus Reiter
7e970216a3
Refactor and fix RuboCop specs.
2017-10-24 19:39:40 +02:00
Mike McQuaid
d067b5f434
lines_cop: fix clang detection.
...
We only care about e.g. `gcc`/`llvm-gcc`/`clang` being at the beginning
of a `system` call and not anywhere within the string.
2017-10-24 16:03:13 +01: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
ee35d65867
lines_cop: Refactor to multiple cops and fix style violations
2017-10-21 12:50:49 +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
Markus Reiter
9bee9ca575
Use “squiggly” heredocs.
2017-10-18 14:39:09 +02:00
Mike McQuaid
1d40061c69
Merge pull request #3291 from JCount/lines-cop-fix-wine-universal-binary
...
lines_cop: add ENV.universal_binary audit exemption for wine
2017-10-18 10:32:34 +01:00
JCount
e882ce1919
lines_cop: add ENV.universal_binary audit exemption for wine
2017-10-15 10:25:35 -04:00
Dominyk Tiller
075f818118
formula_desc_cop: empty string is not a valid desc
...
Just a slightly tweaked version of https://github.com/Homebrew/brew/issues/3286#issuecomment-334983011
2017-10-14 02:48:55 +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
9795195726
Fix RuboCop tests.
2017-10-07 23:30:47 +02:00
Mike McQuaid
cf5fdeef1d
Rubocop: manual rule fixes.
2017-09-24 21:23:59 +01:00
Mike McQuaid
bf0ab938e7
Merge pull request #3091 from GauthamGoli/audit_line_rubocop_part_3
...
audit: Port line_problems to rubocop and add tests part 3
2017-09-05 18:10:02 +01:00
Gautham Goli
4ec26aea40
audit: Port audit_class to rubocop, add tests and autocorrect
2017-09-04 23:43:42 +05:30
Gautham Goli
337d5c6470
audit: Fetch formula name from file path rather than class name in cops
2017-09-04 15:05:43 +05:30
Gautham Goli
b582ed513b
audit: Add tests for rubocop methods in line_cop.rb
2017-09-04 15:05:43 +05:30
Gautham Goli
267def28fa
audit: Port rules from line_problems to rubocop part 3
2017-09-04 15:05:43 +05:30
Gautham Goli
d00c515dd8
audit: Add previously unported GH patch audit rule in Patches cop
2017-08-26 18:06:00 +05:30
JCount
6023e408da
Merge pull request #2995 from GauthamGoli/audit_line_rubocop_part_2
...
audit: Port line_problems to rubocop and add tests part 2
2017-08-23 16:16:07 -04:00
Gautham Goli
db20b0c281
audit: In Cops and their tests convert all multiline strings to heredocs
2017-08-17 11:41:58 +05:30
Gautham Goli
afdd0e2437
add tests for condition dependencies
2017-08-15 16:09:32 +05:30
Gautham Goli
efabd4b5c2
Add tests for MACOS version consts usage
2017-08-15 00:42:56 +05:30
Gautham Goli
2f94d5f499
add test for ARGV.include?
2017-08-15 00:36:37 +05:30
Gautham Goli
3fc6cc1a3a
add test for ENV.fortran
2017-08-15 00:32:34 +05:30
Gautham Goli
5744cd9066
add test for inspecting version
2017-08-15 00:29:58 +05:30
Gautham Goli
cfc423e183
add tests for dependencies
2017-08-15 00:27:09 +05:30
Gautham Goli
d2a7314f53
add test for env mod through system call
2017-08-14 23:32:06 +05:30
Gautham Goli
64a929184a
add tests for vendored deps
2017-08-14 23:05:00 +05:30
Gautham Goli
063cbe7acd
add tests for formula path shortucut 3
2017-08-14 22:44:28 +05:30
Gautham Goli
9c9c280c8a
add tests for formula path string 1
2017-08-14 21:45:01 +05:30
Gautham Goli
65ae6bacd8
add tests for hardcoded compilers in ENV
2017-08-14 20:10:45 +05:30
Gautham Goli
77468fdae3
add tests for hard coded compilers in system calls
2017-08-14 19:58:39 +05:30
Gautham Goli
af5cd1a1da
add tests for man+'man[1-8]'
2017-08-14 15:41:03 +05:30
Gautham Goli
76f4eccdce
add test for using ARGV to check options
2017-08-14 15:22:44 +05:30
Gautham Goli
dc4d10ff6a
add test for build.include? having dashed args
2017-08-14 02:49:52 +05:30
Gautham Goli
3ff8be1216
add test for build.include?
2017-08-14 02:47:29 +05:30
Gautham Goli
5a7cbb762f
add test for build.with? "--with-foo"
2017-08-14 02:43:54 +05:30
Gautham Goli
02a1406a2e
add test for build.without --without-foo
2017-08-14 02:32:29 +05:30
Gautham Goli
3efba57cd9
Add negated? method to formula cop and add tests for negated build.without?
2017-08-14 02:18:46 +05:30
Gautham Goli
e14fedd1b3
Add test for negated build.with?
2017-08-14 02:14:20 +05:30