Commit Graph

713 Commits

Author SHA1 Message Date
Sijawusz Pur Rahnama 931dc3d2dc Use issue expectation helpers in `Performance::CompactAfterMap` rule spec 2022-04-04 22:16:21 +02:00
Sijawusz Pur Rahnama b54f0f0738 Use issue expectation helpers in `Metrics::CyclomaticComplexity` rule spec 2022-04-04 22:15:43 +02:00
Sijawusz Pur Rahnama 8a37d5bbe2 Use issue expectation helpers in `Layout::LineLength` rule spec 2022-04-04 22:15:07 +02:00
Sijawusz Pur Rahnama 390b26d7f1 Use issue expectation helpers in `Lint::AmbiguousAssignment` rule spec 2022-04-04 21:32:46 +02:00
Sijawusz Pur Rahnama caeb1609c9 Use issue expectation helpers in `Lint::BadDirective` rule spec 2022-04-04 21:27:04 +02:00
Sijawusz Pur Rahnama 5283ae4a96 Use issue expectation helpers in `Lint::EmptyLoop` rule spec 2022-04-04 21:23:17 +02:00
Sijawusz Pur Rahnama 3cbb388393 Use issue expectation helpers in `Lint::HashDuplicatedKey` rule spec 2022-04-04 21:20:13 +02:00
Sijawusz Pur Rahnama 18316eaa8b Use issue expectation helpers in `Lint::LiteralInInterpolation` rule spec 2022-04-04 21:16:48 +02:00
Sijawusz Pur Rahnama 7f85434c85 Use issue expectation helpers in `Lint::RandZero` rule spec 2022-04-04 21:14:45 +02:00
Sijawusz Pur Rahnama c58d4cc65a Use issue expectation helpers in `Lint::Syntax` rule spec 2022-04-04 21:11:04 +02:00
Sijawusz Pur Rahnama c89d32fcf6 Use issue expectation helpers in `Lint::UselessConditionInWhen` rule spec 2022-04-04 21:11:04 +02:00
Sijawusz Pur Rahnama c8daaf4324 Use issue expectation helpers in `Lint::UnneededDisableDirective` rule spec 2022-04-04 21:10:54 +02:00
Sijawusz Pur Rahnama a69fba88bd
Merge pull request #260 from crystal-ameba/fix-issue-224 2022-04-04 09:46:35 +02:00
Sijawusz Pur Rahnama e6ad7c5d24 Fix bug in `AST::Scope#in_macro?` not taking account for `Crystal::MacroFor` 2022-04-04 02:05:13 +02:00
Sijawusz Pur Rahnama 71de3f0012 Cleanup method docs in `AST::Scope` 2022-04-04 02:05:13 +02:00
Sijawusz Pur Rahnama 614fcfa6a8 Skip macro scopes in `ShadowingOuterLocalVar` 2022-04-04 01:38:04 +02:00
Sijawusz Pur Rahnama 2e9ef7fcb2 Reword `visit(node)` methods comment in `AST::NodeVisitor` 2022-04-04 01:35:59 +02:00
Sijawusz Pur Rahnama a38cfd1661 Refactor `AST::ScopeVisitor` similarly to `AST::NodeVisitor` 2022-04-04 01:35:32 +02:00
Sijawusz Pur Rahnama 3f7ade573a Add ability to skip some of the nodes in `AST::ScopeVisitor` 2022-04-04 01:34:34 +02:00
Sijawusz Pur Rahnama ad5d56b313 Use issue expectation helpers in `ShadowingOuterLocalVar` spec 2022-04-04 01:30:27 +02:00
Sijawusz Pur Rahnama 353d09df29 Rename file according to the rule name 2022-04-04 00:42:22 +02:00
Vitalii Elenhaupt 8d4730182f
Rework breaking specs, break backward compatibility 2022-04-04 00:59:21 +03:00
Vitalii Elenhaupt 1f4dda1c4a
Add conditional check using semantic version 2022-04-03 20:16:00 +03:00
Vitalii Elenhaupt 2f29999106
Return boolean 2022-04-03 19:43:51 +03:00
Vitalii Elenhaupt 087f470f15
Backward compatibility to Crystal 1.3 2022-04-03 19:17:47 +03:00
Vitalii Elenhaupt 7192b64df0
Fix rest of the specs 2022-03-11 18:00:25 +02:00
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