Commit graph

10 commits

Author SHA1 Message Date
Vitalii Elenhaupt
80e2ab4f55
Ameba::Rule -> Ameba::Rule::Base 2017-11-08 00:02:32 +02:00
V. Elenhaupt
adfe654733
Performance improvements (#15)
* Performance improvements

Two main changes:

1. Cache parsed AST in a Source. So Parser will parse content only once.
2. Use one unified visitor with multiple callbacks instead of multiple
visitors to traverse AST.

This improves performance significantly, for example running it on
Crystal repository takes ~1 second, which 6 times faster than before.

* Change readme example
2017-11-06 20:54:58 +02:00
Vitalii Elenhaupt
dcc0be892a
Load list of rules dynamically 2017-11-01 12:49:03 +02:00
Vitalii Elenhaupt
f1e462cc86
Remove dsl & refactor ast visitors
closes #4
2017-11-01 00:50:22 +02:00
Vitalii Elenhaupt
6d9f1c67ed
New rule: comparison to boolean 2017-10-31 23:30:22 +02:00
Vitalii Elenhaupt
11005930f6
New rule: UnlessElse 2017-10-31 22:24:02 +02:00
Vitalii Elenhaupt
b8eeac469a
New rule: trailing blank lines 2017-10-31 17:50:05 +02:00
Vitalii Elenhaupt
c8dcddea22
Rule dsl 2017-10-30 23:26:47 +02:00
Vitalii Elenhaupt
7d3d0902e5
New rule: trailing whitespace 2017-10-30 22:35:11 +02:00
Vitalii Elenhaupt
9bba850a9b
Docs & tests 2017-10-30 22:00:01 +02:00