Sijawusz Pur Rahnama
7c617b5a7b
Make spec helper methods private
2022-12-21 17:34:05 +01:00
Sijawusz Pur Rahnama
4e3caf2986
Few tweaks and readability refactors
2022-12-20 03:26:13 +01:00
Sijawusz Pur Rahnama
70078cf77f
Synchronize properties context names in rules’ specs
2022-12-20 03:25:10 +01:00
Sijawusz Pur Rahnama
8112dddc8f
Specs cleanup
2022-12-20 03:25:06 +01:00
Sijawusz Pur Rahnama
7d88455b7f
Add corrector to the Style/IsANil
rule
2022-12-08 13:58:35 +01:00
Sijawusz Pur Rahnama
e18da84ede
Add requested spec
2022-12-08 02:16:16 +01:00
Sijawusz Pur Rahnama
1524aad299
Add Style/QueryBoolMethods
rule
2022-12-08 02:16:16 +01:00
Sijawusz Pur Rahnama
5ee4074c1b
Rename RedundantParentheses
-> ParenthesesAroundCondition
...
Also rename the option: `parenthesized_assignments` -> `allow_safe_assignment`
2022-11-18 21:06:51 +01:00
Sijawusz Pur Rahnama
0b0a815c31
Add additional test case
2022-11-18 07:04:51 +01:00
Sijawusz Pur Rahnama
eabe463386
Instead of adding the new rule to support enforcing parens around assignments, refactor existing RedundantParentheses
rule
2022-11-18 05:27:05 +01:00
Sijawusz Pur Rahnama
95d68114c7
Fix typos throughout the code
2022-11-16 16:55:32 +01:00
Sijawusz Pur Rahnama
935296b041
Refactor ternary handling in Style/RedundantParentheses
rule
2022-11-16 03:54:31 +01:00
Sijawusz Pur Rahnama
cbf5d3de74
Add Style/RedundantParentheses
rule
2022-11-15 15:17:32 +01:00
Sijawusz Pur Rahnama
52bf0a5be4
Refactor Style/PredicateName
rule
...
Do not report `has_<name>?` method names
2022-11-13 20:12:23 +01:00
Vitalii Elenhaupt
60bf8e13ce
fix(style): properly tokenize in RedundantBegin rule
2022-10-14 21:09:30 +03:00
Sijawusz Pur Rahnama
1795bd2959
Bump default value of LargeNumbers#int_min_digits
to 6
...
As most of the error codes are smaller than 6 digits
2022-03-08 14:42:32 +01:00
fn ⌃ ⌥
f288cc3c4f
Add Style/GuardClause
rule ( #254 )
2021-12-09 21:33:47 +01:00
fn ⌃ ⌥
63a6c73dc0
Autocorrect various rules ( #253 )
2021-11-16 22:30:33 +01:00
fn ⌃ ⌥
d06812ea8e
Add VariableNames
test for method with multiple instance vars
2021-11-09 11:52:31 -08:00
fn ⌃ ⌥
c9ba487373
Add custom NodeVisitor
subclass for Style/VariableNames
2021-11-09 09:26:00 -08:00
fn ⌃ ⌥
bd1a1a1fd4
Shorten long line in Stye/VerboseBlock
spec
2021-11-09 09:07:19 -08:00
fn ⌃ ⌥
b32b00adad
Convert remaining Style
specs
2021-11-08 14:24:11 -08:00
fn ⌃ ⌥
72a3487bb6
Autocorrect Stye/WhileTrue
2021-11-08 14:24:11 -08:00
fn ⌃ ⌥
571969265f
Convert Style/VerboseBlock
spec
2021-11-08 14:24:11 -08:00
fn ⌃ ⌥
e93dfe9cdc
Convert Style/VariableNames
spec
2021-11-08 14:24:11 -08:00
fn ⌃ ⌥
265bc51481
Convert Style/UnlessElse
spec
2021-11-08 14:07:35 -08:00
fn ⌃ ⌥
06c0887136
Convert Style/TypeNames
spec
2021-11-08 14:07:35 -08:00
fn ⌃ ⌥
e7cfe387d6
Autocorrect Stye/RedundantNext
and Style/RedundantReturn
2021-11-08 14:07:35 -08:00
fn ⌃ ⌥
7b437fbd2f
Remove normalize
parameter from expect_issue
( #249 )
...
* Add `normalize` parameter to `expect_correction`
* Convert Style/IsAFilter spec
* Revert "Add `normalize` parameter to `expect_correction`"
This reverts commit 4b67e4b900
.
* Remove `normalize` parameter from `expect_issue`
* Require indentation if multiple issues on a single line
* Update `Style/IsAFilter` spec
* Update `ExpectIssue` documentation
* Add missing `expect_no_corrections`
* Use carets and space with issues at column 1 or 2
* Update `expect_issue` docs
2021-11-06 15:15:19 +02:00
fn ⌃ ⌥
78071722c4
Rename s
to source
2021-11-01 08:55:48 -07:00
fn ⌃ ⌥
c2aa2fedb6
Return source
from expect_issue
2021-10-31 22:44:48 -07:00
fn ⌃ ⌥
1d5f554e88
Apply suggestions from code review
2021-10-26 12:06:24 -07:00
fn ⌃ ⌥
e5fb0526e0
Autocorrect Style/LargeNumbers
2021-10-25 12:38:29 -07:00
fn ⌃ ⌥
9f0b9a709e
Allow named replacements in expect_issue
2021-10-23 01:37:24 -07:00
Vitalii Elenhaupt
58d7775d65
Merge branch 'master' into develop
2021-04-04 21:08:02 +03:00
Sijawusz Pur Rahnama
8d21733b10
Skip macro code in Style/IsAFilter rule
2021-04-04 11:19:45 +02:00
Stephen Dolan
04ba9cd57a
Change Style/VerboseBlock - ExcludeOperators - setting default ( #218 )
2021-03-24 21:16:51 +01:00
Vitalii Elenhaupt
13605afe4a
Do not report IsAFilter if there is a block with multiple args
2021-03-23 20:57:50 +02:00
Sijawusz Pur Rahnama
56110b3883
Default to exclude_multiple_line_blocks in Style/VerboseBlock rule
2021-03-03 00:31:53 +01:00
Sijawusz Pur Rahnama
8f308e73e5
Add ~ as the prefix operator
2021-03-02 12:40:46 +01:00
Sijawusz Pur Rahnama
694c41650c
Remove redundant check and add a few more test cases
2021-02-05 01:23:29 +01:00
Sijawusz Pur Rahnama
a9d1b17deb
Support named arguments in VerboseBlock#node_to_s
2021-02-05 01:23:29 +01:00
Sijawusz Pur Rahnama
16743a756c
Add ExcludePrefixOperators option to Style/VerboseBlock rule
2021-02-04 21:59:23 +01:00
Sijawusz Pur Rahnama
eed094b928
Fix couple of edge-cases in VerboseBlock rule
2021-02-04 21:59:23 +01:00
Sijawusz Pur Rahnama
4b7f3ba6ee
Add MaxLineLength option to Style/VerboseBlock rule
2021-02-04 21:59:22 +01:00
Sijawusz Pur Rahnama
0739fad670
Add Style/VerboseBlock rule
2021-02-04 21:59:22 +01:00
Sijawusz Pur Rahnama
95d340c3ad
Add Style/IsAFilter rule
2021-01-28 00:58:06 +01:00
Vitalii Elenhaupt
478da94c20
Allow constants to be in PascalCase (i.e. Log, SuperConstant)
...
closes #148
2020-04-13 09:38:05 +03:00
Vitalii Elenhaupt
db6b54e63c
New rule: Style/IsANil
2020-03-29 19:45:13 +03:00
Vitalii Elenhaupt
0002c36fae
RedundantNext params
2020-03-24 18:27:49 +02:00