Mike McQuaid
44c85c4683
Merge pull request #2801 from apjanke/formula-cop-uniform-_body_node-param
...
rubocops: refactor to use consistent _body_node parameter name
2017-06-21 08:08:49 +01:00
Andrew Janke
b5a0cfd861
rubocops: use consistent (_)body_node parameter name
2017-06-19 23:37:32 -04:00
Gautham Goli
0e1c88e7ae
Refactor Checksum cop to add autocorrect method
2017-06-16 19:45:16 +05:30
Gautham Goli
77da75e7d6
Simplify Checksum cop by auditing all checksums
2017-06-16 19:45:16 +05:30
Gautham Goli
4d7a983415
audit: Port audit_checksum method to rubocop and add tests
2017-06-16 19:45:16 +05:30
Isabell Long
b2f2fbfa63
format_desc_cop: whitelist more lowercase words
...
- From `homebrew-core` PR 14229, we decided to whitelist more words so
that reordering to appease "description must start with a capital
letter" wasn't so clunky.
2017-06-13 12:37:22 +01:00
Mike McQuaid
7a0aff1080
Autocorrect Rubocop Style/PerlBackrefs.
2017-06-10 20:23:20 +03:00
Mike McQuaid
113a7a81d0
Revert "audit: Port audit_checksum method to rubocop and add tests"
2017-06-09 11:16:11 +03:00
Gautham Goli
d09d5ecc55
audit: Port audit_checksum method to rubocop and add tests
2017-06-08 21:53:46 +05:30
Gautham Goli
134da5b8c2
Add methods in FormulaCop to find block nodes
2017-06-08 19:50:04 +05:30
Mike McQuaid
c572081f8b
formula_desc_cop: tweak some rules.
...
Allow some specific lowercase words and provide an autocorrect for some
of these rules.
2017-06-08 15:13:10 +03:00
Mike McQuaid
b7d007fb50
Merge pull request #2724 from MikeMcQuaid/capital-desc
...
formula_desc_cop: desc should be capitalised.
2017-06-03 09:57:26 +01:00
Mike McQuaid
82b113cdd0
formula_desc_cop: desc should be capitalised.
...
Note that the formula description field should start with a capital
letter.
2017-06-02 22:25:07 +01:00
Markus Reiter
2d6ae61314
Re-revert "Fix operator spacing."
2017-06-02 19:22:05 +02:00
Gautham Goli
cf848a14d2
audit: Port audit_caveats method to rubocop and add tests
2017-05-31 22:59:48 +05:30
Gautham Goli
cfbdc17cb7
Use relevant methods to consolidate logic in text_cop.rb
2017-05-30 15:28:05 +05:30
Gautham Goli
88f21b84f4
Refactor and add more methods in formula_cop.rb
2017-05-30 15:28:05 +05:30
Gautham Goli
51f2338dd5
audit: Port audit_text method to rubocop and add tests
2017-05-30 15:28:05 +05:30
Gautham Goli
5b97a8f2e1
Add methods in FormulaCop to find method nodes, dependency nodes
2017-05-30 15:28:05 +05:30
Mike McQuaid
7a38bab333
Fixup all RuboCop warnings.
2017-05-29 18:43:18 +01:00
Isabell Long
279a4df6c3
Match the "formula name in description" on word boundaries
...
- The regexp for the "check if formula name is used in formula's
description" cop matches every instance of the formula name if it
exists, whether it's in a word or not.
- For example, the formula `mon` has the description "Monitor
hosts/services/whatever and alert about problems". This makes
`brew audit --strict` complain because it matches "Monitor",
which isn't the formula name! The formula `pass` has the description
"Password manager". Again, the strict audit matches "Password",
which isn't an issue.
- Instead, this change matches on a word boundary, so it will match
`mon:`, or `mon `, but not "Monitor", or, for example, "harmony".
- I've changed the tests to account for this change.
2017-05-29 00:26:47 +01:00
Mike McQuaid
ea8be174f6
Merge pull request #2631 from GauthamGoli/audit_homepage_rubocop
...
audit: Port audit_homepage method to rubocop and add tests
2017-05-15 10:02:47 +01:00
Mike McQuaid
9889b42ec4
Merge pull request #2628 from GauthamGoli/formula_desc_cop_fix
...
audit: Detect multiline and interpolated strings in formula desc cop
2017-05-15 10:01:38 +01:00
Gautham Goli
91efcb045e
Port audit_homepage method to rubocop and add tests
2017-05-14 22:05:46 +05:30
Gautham Goli
80572939b4
Update string_content method to support multiline strings, add test for same
2017-05-13 18:48:40 +05:30
Gautham Goli
d04f295de3
Add autocorrect method for ComponentsOrder rubocop and tests
2017-05-13 03:09:55 +05:30
Gautham Goli
fed668b330
Add --only-cops
,--except-cops
options for brew style and simplify cop names
2017-05-03 14:49:23 +05:30
Gautham Goli
c3330c289d
Add --only-cops
,--except-cops
options for brew audit
...
Also refactor audit cops into two "departments"
- FormulaAudit
- FormulaAuditStrict
2017-05-02 23:26:12 +05:30
Gautham Goli
413a7e5dae
Port audit_components method to rubocops and add corresponding tests
2017-04-22 21:53:16 +05:30
Gautham Goli
a693ca332e
Wrap rubocop specific code into methods inside FormulaCop
2017-03-26 15:26:41 +05:30
Gautham Goli
febc108598
Encapsulate formula desc offense checking logic into methods
2017-03-26 15:26:41 +05:30
Gautham Goli
d32978b859
Create FormulaCop base class to reuse helper functions in custom cops
2017-03-08 11:44:35 +05:30
Gautham Goli
19f693d25b
Port audit_desc rules to cop
2017-03-02 12:50:05 +05:30
Gautham Goli
5dc358c1b7
Update rubocop config
2017-02-12 14:52:13 +05:30
Gautham Goli
1f5cf4fd40
Update docs and manpages to include --fix option
2017-02-06 12:46:26 +05:30
Gautham Goli
0b3d9031e2
Add --fix option to brew audit command
2017-01-18 22:35:37 +05:30
Gautham Goli
483c40fb03
Add custom cop to refactor revision to rebuild in bottle block
2017-01-18 15:54:47 +05:30