shard-ameba/spec/ameba
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
..
ast Variable scope & useless assignments (#41) 2018-05-03 18:57:47 +03:00
cli Allow to configure formatter via configuration file 2018-01-25 16:53:08 +02:00
formatter Check for unneeded directives when all other rules are done 2018-02-02 22:17:04 +02:00
rule Variable scope & useless assignments (#41) 2018-05-03 18:57:47 +03:00
base_spec.cr Check for unneeded directives when all other rules are done 2018-02-02 22:17:04 +02:00
config_spec.cr Check for unneeded directives when all other rules are done 2018-02-02 22:17:04 +02:00
inline_comments_spec.cr Unneeded disable directive 2018-02-02 22:17:04 +02:00
runner_spec.cr Check for unneeded directives when all other rules are done 2018-02-02 22:17:04 +02:00
source_spec.cr Use more natural way to define error with custom loc 2018-01-30 16:09:00 +02:00
tokenizer_spec.cr Refactor tokenizer 2017-11-04 17:38:04 +02:00