Commit graph

7 commits

Author SHA1 Message Date
V. Elenhaupt
4cb5328513
Add rule namespaces: style, lint, layout (#63) 2018-06-16 14:50:59 +03:00
Vitalii Elenhaupt
f8d14d4222 Rename Error to Issue 2018-06-12 12:55:56 +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
V. Elenhaupt
60c1b86890
Constantize string error messages (#50) 2018-04-17 07:29:43 +03:00
Vitalii Elenhaupt
f4f401d56f
Make config loading more flexible 2017-11-23 10:41:22 +02:00
Vitalii Elenhaupt
06855816d7
Document configuration properties & specs 2017-11-14 10:28:26 +02:00
Vitalii Elenhaupt
80e2ab4f55
Ameba::Rule -> Ameba::Rule::Base 2017-11-08 00:02:32 +02:00
Renamed from src/ameba/rules/method_names.cr (Browse further)