Commit graph

676 commits

Author SHA1 Message Date
Vitalii Elenhaupt
34707903b8
Fix nodoc 2017-11-23 10:54:56 +02:00
Vitalii Elenhaupt
f4f401d56f
Make config loading more flexible 2017-11-23 10:41:22 +02:00
Vitalii Elenhaupt
b5c9f4dff6
Fix mistakes/typos 2017-11-19 13:31:20 +02:00
Vitalii Elenhaupt
0520774930
New rule: duplicated when 2017-11-18 18:39:45 +02:00
Vitalii Elenhaupt
1839ef2ab5
New rule: hash duplicated key 2017-11-18 00:51:16 +02:00
Vitalii Elenhaupt
a947dee851
Silent formatter in benchmarks 2017-11-18 00:13:14 +02:00
Vitalii Elenhaupt
791bfdabb8
New rule: percent arrays 2017-11-17 23:56:52 +02:00
Vitalii Elenhaupt
52411dadc5
Fix some mistakes 2017-11-17 20:58:52 +02:00
Vitalii Elenhaupt
766bcb3dd9
Adjust readme 2017-11-17 20:55:32 +02:00
Vitalii Elenhaupt
0f25b50a57
Add missing YAML sample 2017-11-17 19:34:01 +02:00
Vitalii Elenhaupt
3c9df13beb
New option: LargeNumbers#int_min_digits (default: 5) 2017-11-17 19:07:39 +02:00
Vitalii Elenhaupt
b3a9ff2fa0
Mark begin; end as empty expression 2017-11-17 18:32:40 +02:00
Vitalii Elenhaupt
fb398b5056
New rule: redundant begin 2017-11-17 18:15:11 +02:00
Vitalii Elenhaupt
e5081fa970
New rule: empty ensure 2017-11-16 16:31:32 +02:00
Vitalii Elenhaupt
bdf189cb7f
Fix generated doc header 2017-11-16 11:42:14 +02:00
Vitalii Elenhaupt
9983fce4ef
Remove compatibility warning 2017-11-16 10:35:20 +02:00
Vitalii Elenhaupt
6a28e21162
Install binary to shard/bin folder
Just a workaround before https://github.com/crystal-lang/shards/pull/126
becomes live.
2017-11-16 10:18:11 +02:00
Vitalii Elenhaupt
7546a80f1c
Make build on postinstall 2017-11-16 00:49:27 +02:00
Vitalii Elenhaupt
af4d6cae5a
v0.2.1 2017-11-16 00:25:58 +02:00
Vitalii Elenhaupt
694aa60a9a
Install binary on postinstall 2017-11-16 00:06:45 +02:00
Vitalii Elenhaupt
57b1095c5f
Document entities 2017-11-15 23:37:16 +02:00
Vitalii Elenhaupt
00c13fceee
Deploy docs via travis 2017-11-15 01:13:39 +02:00
Vitalii Elenhaupt
87396e850d
Remove outdated readme stuff 2017-11-14 21:54:56 +02:00
V. Elenhaupt
413e2ec0fe
Extend installation instructions (#19) 2017-11-14 20:52:15 +02:00
Vitalii Elenhaupt
198d024782
v0.2.0 2017-11-14 19:40:42 +02:00
Vitalii Elenhaupt
8f4def5407
Load default config if no cli args specified 2017-11-14 11:48:06 +02:00
Vitalii Elenhaupt
06855816d7
Document configuration properties & specs 2017-11-14 10:28:26 +02:00
Vitalii Elenhaupt
822a69b81c
Base YAML config loader & Ameba runner 2017-11-14 09:00:15 +02:00
Vitalii Elenhaupt
80e2ab4f55
Ameba::Rule -> Ameba::Rule::Base 2017-11-08 00:02:32 +02:00
Vitalii Elenhaupt
b6c0d3e8ad
Refactor comparison to boolean rule 2017-11-07 23:40:06 +02:00
Vitalii Elenhaupt
362b66ce81
Update run example 2017-11-07 23:07:25 +02:00
Vitalii Elenhaupt
e718c90f16
Source#content -> Source#code, Source::Error#pos -> Source::Error#location 2017-11-07 23:02:38 +02:00
Vitalii Elenhaupt
9036a7ca71
New rule: empty assignment 2017-11-07 20:54:28 +02:00
Vitalii Elenhaupt
a9421ee79b
AST node source code 2017-11-07 13:28:33 +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
f27e32cbea
Benchmarks
closes #13

```
$ crystal bench/check_sources.cr --release
== Compare:
   1 source    1.1k ( 907.18µs) (± 2.24%)       fastest
  3 sources 649.18  (  1.54ms ) (± 2.26%)  1.70× slower
  5 sources 196.85  (  5.08ms ) (± 2.20%)  5.60× slower
 10 sources  96.37  ( 10.38ms ) (± 2.06%) 11.44× slower
 20 sources  58.88  ( 16.98ms ) (± 3.53%) 18.72× slower
 30 sources  46.43  ( 21.54ms ) (± 3.38%) 23.74× slower
 40 sources  46.19  ( 21.65ms ) (± 2.45%) 23.86× slower
== Measure:
  0.060000   0.040000   0.100000 (  0.080935 )
```
2017-11-06 14:27:49 +02:00
Vitalii Elenhaupt
f878ac430f
Refactor formatters 2017-11-06 10:41:03 +02:00
Vitalii Elenhaupt
1a3bb3629e
Line lenght: 80 symbols 2017-11-06 08:54:59 +02:00
V. Elenhaupt
374956f3dd
Fix travis build & new rule: constant names (#14) 2017-11-05 22:08:01 +02:00
Vitalii Elenhaupt
8440747353
New rule: variable names 2017-11-04 23:13:38 +02:00
Vitalii Elenhaupt
3d4c44c333
New rule: method names 2017-11-04 22:54:27 +02:00
Vitalii Elenhaupt
20fd53682f
New rule: type names 2017-11-04 18:57:35 +02:00
Vitalii Elenhaupt
e383ec17c2
Refactor tokenizer 2017-11-04 17:38:04 +02:00
Vitalii Elenhaupt
fedc29ceb6
Remove crystal syntax highliting 2017-11-04 16:49:50 +02:00
V. Elenhaupt
2f9ba27811
Large numbers rule + tokenizer (#10) 2017-11-04 16:43:40 +02:00
Vitalii Elenhaupt
3f2bcc56b9
Remove unused class 2017-11-03 16:44:32 +02:00
V. Elenhaupt
dff7e6a454
Travis: track only master branch 2017-11-03 12:12:45 +02:00
V. Elenhaupt
b6b62a73e7
Gitter badge 2017-11-02 10:39:29 +02:00
Vitalii Elenhaupt
75ec695a62
Colorize dot formatter
closes #1
2017-11-01 22:37:21 +02:00
Vitalii Elenhaupt
c9f229c3f1
Custom matcher 2017-11-01 22:05:41 +02:00