Commit Graph

15 Commits

Author SHA1 Message Date
Sijawusz Pur Rahnama e99a69765f Few refactors 2024-01-01 14:46:32 +01:00
Vitalii Elenhaupt 789e1b77e8
fix: crystal next compatibility
refs https://github.com/crystal-lang/crystal/pull/11597
fixes https://github.com/crystal-ameba/ameba/issues/406
2023-10-06 18:57:39 +03:00
Sijawusz Pur Rahnama 596b0dd9d0 Misc tweaks and refactors 2023-06-14 15:06:24 +02:00
Vitalii Elenhaupt d20cc212b9
Styling changes 2023-02-07 20:03:52 +02:00
Vitalii Elenhaupt 6b2ddcb1d9
Address feedback, add tests 2023-02-07 17:19:04 +02:00
Sijawusz Pur Rahnama 8112dddc8f Specs cleanup 2022-12-20 03:25:06 +01:00
Sijawusz Pur Rahnama ffc712a838 Reduce usage of `Object#not_nil!` 2022-10-29 00:03:39 +02:00
Sijawusz Pur Rahnama 7b3c814914 Fix newly found issues 2021-01-28 01:03:48 +01:00
Vitalii Elenhaupt b5bd76dfa8
Useless Assign: ignore variables with '_' prefix
closes #164
2020-08-20 21:15:58 +03:00
Vitalii Elenhaupt 458c492730
Do not report shadowing outer local var is var is declared below the
shadowed var

closes #144
2020-04-10 10:44:42 +03:00
Vitalii Elenhaupt 4f185db0a2
New rule: SharedVarInSpawn
closes #132
2020-03-25 17:52:20 +02:00
Vitalii Elenhaupt 74dfa0b934
Lint/UselessAssign: ignore transformed assignemnts by the compiler
closes #127
2020-01-11 23:51:28 +02:00
Vitalii Elenhaupt 9885457227
Track issue.end_location properly 2018-11-24 19:38:13 +02:00
V. Elenhaupt c2aa526e21
Unused argument rule (#52)
* Unused argument rule

* IgnoreDefs, IgnoreBlocks, IgnoreProcs parameters

* Implicit reference by super keyworkd

* Handle macro arguments
2018-05-08 22:00:17 +03:00
V. Elenhaupt 6475c2bb25
Variable scope & useless assignments (#41)
* AST::Visitor -> AST::NodeVisitor

* Scope & ScopeVisitor

* Useless assignment rule

* Instance vars and useless assignments

* Multiple assigns one by one

* Support outer scope

* Variable used in the useless assignment

* Support OpAssign & MultiAssign

* Captured by block

* Variable, Assignment, Reference & Refactoring

* Variable has references, Assignment can be referenced

* Branch entity

* Handle useless assignments in branches

* Handle assignments in a loop

* Handle branch equality

* Handle special var `$?` assignment

* Improve captured by block stuff

* Avoid assignments in property definitions

(UselessAssign rule reports an warning)

* Support MacroIf and MacroFor branches

* Handle assignments with shadowed vars in inner scopes

* Add method arguments as scope variables

* Handle case if branch is blank

* Top level scope

* Handle case when branch is nop?
2018-05-03 18:57:47 +03:00