Vitalii Elenhaupt
1cfc926a28
Fix specs for tokenizer
2022-03-11 16:18:33 +02:00
Vitalii Elenhaupt
03adc20872
Pass on crystal-nightly
2022-03-11 14:15:05 +02:00
Vitalii Elenhaupt
528ec460b0
Add StandWithUkraine banner
2022-03-11 09:28:44 +02:00
Sijawusz Pur Rahnama
dad72341cb
Merge pull request #258 from crystal-ameba/bump-large-numbers-min-int-digits
...
Bump default value of `LargeNumbers#int_min_digits` to 6
2022-03-08 14:48:45 +01: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
Sijawusz Pur Rahnama
ae29754de5
Merge pull request #257 from crystal-ameba/disable-style-large-numbers-rule
2022-03-08 12:20:09 +01:00
Sijawusz Pur Rahnama
9e81777e7e
Disable Style/LargeNumbers
by default
2022-03-05 22:38:36 +01:00
Vitalii Elenhaupt
276b429e70
Merge pull request #256 from crystal-ameba/Sija/debug-method-calls
...
Add `Lint/DebugCalls` rule
2021-12-31 19:39:51 +02:00
Sijawusz Pur Rahnama
66ee7642cf
Add Lint/DebugCalls
rule
2021-12-31 16:44:02 +01:00
fn ⌃ ⌥
f288cc3c4f
Add Style/GuardClause
rule ( #254 )
2021-12-09 21:33:47 +01:00
Vitalii Elenhaupt
c7f1f94cca
Merge pull request #255 from straight-shoota/fix/unknown-token-error
...
Fix unexpected token compiler error match
2021-11-30 11:42:25 +02:00
Johannes Müller
63bafba72e
Fix unexpected token compiler error match
2021-11-29 22:04:59 +01:00
fn ⌃ ⌥
63a6c73dc0
Autocorrect various rules ( #253 )
2021-11-16 22:30:33 +01:00
Sijawusz Pur Rahnama
255d10f921
Merge pull request #252 from crystal-ameba/unreachable-code-loops
...
Do not report unreachable code after loops
2021-11-10 12:32:37 +01:00
Vitalii Elenhaupt
429f76f8b6
Do not report unreachable code after loops
...
closes #251
2021-11-10 09:16:14 +02:00
Sijawusz Pur Rahnama
d843afd962
Merge pull request #250 from FnControlOption/spec/style
...
Use `expect_issue` in `Style` specs
2021-11-09 22:35:38 +01:00
fn ⌃ ⌥
d06812ea8e
Add VariableNames
test for method with multiple instance vars
2021-11-09 11:52:31 -08:00
fn ⌃ ⌥
01dfcbe76a
Add tests for AST::Util#control_exp_code
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
Sijawusz Pur Rahnama
7cb0c15747
Merge pull request #248 from FnControlOption/autocorrect
...
Add autocorrect
2021-11-01 20:24:43 +01: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 ⌃ ⌥
470e41cb7b
Raise error if attempting to both explain issue and autocorrect
2021-10-31 22:23:14 -07:00
fn ⌃ ⌥
a40fdee33f
Revert "Add autocorrect checks to ExplainFormatter
"
...
This reverts commit 1b6fe40a3b
.
2021-10-31 22:12:21 -07:00
Vitalii Elenhaupt
3e1df339ae
Consistent parser options
2021-11-01 02:08:16 +02:00
fn ⌃ ⌥
61fc99e107
Inline the do_combine
method
2021-10-27 11:19:15 -07:00
fn ⌃ ⌥
73e97ac42e
Avoid using iterators and throw-away heap allocations
2021-10-27 11:08:18 -07:00
fn ⌃ ⌥
b7bb282b99
Apply suggestions from code review
2021-10-27 10:08:36 -07:00
fn ⌃ ⌥
d51ef27d54
Add remove_preceding
, remove_leading
, remove_trailing
2021-10-26 22:22:22 -07:00
fn ⌃ ⌥
1b6fe40a3b
Add autocorrect checks to ExplainFormatter
2021-10-26 22:22:22 -07:00
fn ⌃ ⌥
8d3b76003e
Add autocorrect checks to Flycheck, JSON, and TODO formatters
2021-10-26 22:22:22 -07:00
fn ⌃ ⌥
749c53527e
Add documentation
2021-10-26 22:22:22 -07:00
fn ⌃ ⌥
437584f9db
Raise error if infinite correction loop
2021-10-26 22:22:22 -07:00
fn ⌃ ⌥
16608965f5
Allowed named arguments with Rule::Base.issue_for
2021-10-26 22:22:22 -07:00
fn ⌃ ⌥
3b11491cea
Add insert_*
overloads that accept both location and end_location
2021-10-26 22:22:22 -07:00
fn ⌃ ⌥
e8c0f49cb8
Delete redundant alias SourceLocation
2021-10-26 22:22:22 -07:00
fn ⌃ ⌥
f87d99a83b
Add Corrector
method overloads that accept ASTNode
2021-10-26 22:22:22 -07:00
fn ⌃ ⌥
1d5f554e88
Apply suggestions from code review
2021-10-26 12:06:24 -07:00
fn ⌃ ⌥
f39a7a4cd4
Re-run autocorrect until all correctable issues have been corrected
2021-10-25 15:09:44 -07:00
fn ⌃ ⌥
573881cb8a
Autocorrect Layout/TrailingBlankLines
partially
2021-10-25 12:38:29 -07:00
fn ⌃ ⌥
e5fb0526e0
Autocorrect Style/LargeNumbers
2021-10-25 12:38:29 -07:00