Sijawusz Pur Rahnama
2dc37360b2
Merge pull request #202 from crystal-ameba/feature/is-a-filter-rule
...
Add Style/IsAFilter rule
2021-01-28 10:28:06 +01:00
Sijawusz Pur Rahnama
7b3c814914
Fix newly found issues
2021-01-28 01:03:48 +01:00
Sijawusz Pur Rahnama
d71091a40c
Add Performance/AnyInsteadOfEmpty rule
2021-01-28 01:03:48 +01:00
Sijawusz Pur Rahnama
95d340c3ad
Add Style/IsAFilter rule
2021-01-28 00:58:06 +01:00
Vitalii Elenhaupt
d28f9f756e
Bump v0.13.4
2021-01-26 18:21:51 +02:00
Sijawusz Pur Rahnama
ea98554191
Add support for showing end location marker ( #200 )
...
* Add support for showing end location marker
* Cleanup Reportable method definitions
There’s no need for double splats, since they mess up method resolution, and obscure the actual - single (!) - argument - `status`, so… be gone
Also, all of the helpers return the constructed `Issue` like a behaving good methods.
* Refactor Util#affected_code
* Increase max length of trimmed lines to 120 characters
* Refactor Issue to use enum instead of a symbol for #status
* Optimize Reportable#valid?
* Add spec coverage for newly added Util methods
* Refactor DotFormatter a bit
Make text format moar in line with Crystal spec runner.
* Update README.md
2021-01-26 08:38:19 +02:00
Sijawusz Pur Rahnama
8b52dc4b1d
Merge pull request #199 from crystal-ameba/Sija/rename-chained-calls-with-no-bang
...
ChainedCallsWithNoBang -> ChainedCallWithNoBang
2021-01-22 22:48:57 +01:00
Sijawusz Pur Rahnama
6acb8ad2eb
ChainedCallsWithNoBang -> ChainedCallWithNoBang
2021-01-22 17:24:45 +01:00
Sijawusz Pur Rahnama
79ff1f75db
Merge pull request #198 from crystal-ameba/Sija/followup-to-pr-195
2021-01-22 16:11:32 +01:00
Sijawusz Pur Rahnama
8babeea80f
Add repeated_combinations
and repeated_permutations
2021-01-22 12:21:14 +01:00
Sijawusz Pur Rahnama
a219a73258
Remove rotate from the list of call_names
...
In some cases it returns `self` and not a copy.
2021-01-22 12:20:50 +01:00
Sijawusz Pur Rahnama
5f6c14c9d6
Merge pull request #195 from crystal-ameba/feature/chained-calls-with-no-bang
...
Add Performance/ChainedCallsWithNoBang rule
2021-01-21 13:27:35 +01:00
Sijawusz Pur Rahnama
d3b952f58a
Add Performance/ChainedCallsWithNoBang rule
2021-01-21 12:47:10 +01:00
Vitalii Elenhaupt
7aa7efd4bd
Do not report if variable is assigned and referenced in MacroFor/MacroIf/MacroExpression
...
closes #194
2021-01-20 13:14:42 +02:00
Sijawusz Pur Rahnama
9853203f19
Merge pull request #191 from crystal-ameba/Sija/change-rule-to-class
...
Change Rule to a class
2021-01-19 22:20:05 +01:00
Sijawusz Pur Rahnama
ad8f570a04
Change Rule to class
2021-01-19 22:17:17 +01:00
Sijawusz Pur Rahnama
ddaa58f475
Merge pull request #192 from crystal-ameba/feature/flatten-after-map-rule
...
Add Performance/FlattenAfterMap rule
2021-01-19 22:16:10 +01:00
Sijawusz Pur Rahnama
bbcb32d042
Merge pull request #193 from crystal-ameba/feature/compact-after-map-rule
...
Add Performance/CompactAfterMap rule
2021-01-19 22:15:56 +01:00
Sijawusz Pur Rahnama
4958fa2315
Merge pull request #184 from mamantoha/fix-crystal-nightly
...
fix Crystal nightly
2021-01-19 13:18:18 +02:00
Sijawusz Pur Rahnama
23b4b4c4f0
Add Performance/FlattenAfterMap rule
2021-01-18 18:04:54 +01:00
Sijawusz Pur Rahnama
b7286dc673
Add Performance/CompactAfterMap rule
2021-01-18 18:04:12 +01:00
Sijawusz Pur Rahnama
d2fa75280f
Extend JoinAfterMap to check also calls to sum/product
and rename it to MapInsteadOfBlock ( #190 )
2021-01-18 17:42:50 +02:00
Vitalii Elenhaupt
e9ec91654c
New Rule: Lint/DuplicatedRequire
...
closes https://github.com/crystal-ameba/ameba/issues/176
2021-01-17 22:32:24 +02:00
Sijawusz Pur Rahnama
6898aa8976
Fix issue #187 ( #189 )
...
* Avoid using `tap` with structs
* Remove extraneous blank lines
* Readability
2021-01-17 22:31:53 +02:00
Sijawusz Pur Rahnama
928a260d51
Remove extraneous blank lines
2021-01-17 18:45:14 +01:00
Sijawusz Pur Rahnama
af5d825015
Followup to #185
2021-01-17 18:45:14 +01:00
Sijawusz Pur Rahnama
fd4b2f309c
Don’t allocate the array on every call
2021-01-17 18:05:08 +01:00
Sijawusz Pur Rahnama
5e58a60ade
Move constant definitions after properties
call
2021-01-17 17:39:32 +01:00
Sijawusz Pur Rahnama
66a4b283d4
Merge pull request #186 from crystal-ameba/feature/join-after-map
...
Add Performance/JoinAfterMap rule
2021-01-17 16:59:51 +01:00
Sijawusz Pur Rahnama
a892cd43b0
Add Performance/JoinAfterMap rule
2021-01-17 16:57:15 +01:00
Sijawusz Pur Rahnama
06852c490b
Followup to #185
2021-01-17 13:25:50 +01:00
Sijawusz Pur Rahnama
1a091c1f1a
Optimize rules ( #185 )
...
* Replace pointless interpolations with actual values
* Rules optimizations
* Stylistic refactors
* Remove extraneous blank lines
* Remove some instances of .not_nil! usage
2021-01-17 14:16:04 +02:00
Sijawusz Pur Rahnama
6d41beba57
Remove ill-working CI hack
2021-01-16 19:57:57 +01:00
Sijawusz Pur Rahnama
270a003df6
Merge pull request #184 from mamantoha/fix-crystal-nightly
...
fix Crystal nightly
2021-01-16 19:53:48 +01:00
Anton Maminov
6f0f8352f9
fix Crystal nightly
2021-01-16 20:42:27 +02:00
Sijawusz Pur Rahnama
c4d34d74d8
Add support for showing code context lines ( #181 )
...
* Add support for showing code context lines
* Show context lines only in ExplainFormatter
* Add spec coverage for context_lines option
2021-01-12 17:20:43 +02:00
Vitalii Elenhaupt
9bc6c13d11
Merge branch 'master' into develop
2021-01-12 12:03:23 +02:00
Vitalii Elenhaupt
bedf3a68d7
Merge pull request #182 from crystal-ameba/Sija/move-ci-to-github-actions
...
Switch CI from Travis to GitHub Actions
2021-01-12 12:03:00 +02:00
Sijawusz Pur Rahnama
d20952127a
Add deploy docs workflow
2021-01-12 02:56:47 +01:00
Sijawusz Pur Rahnama
69f3921a68
Switch CI from Travis to GitHub Actions
2021-01-12 02:56:47 +01:00
Sijawusz Pur Rahnama
19c370aee0
Misc refactors ( #180 )
...
* Optimize Severity#symbol
* Remove empty else branches
* Optimize map+compact/flatten calls
* Misc stylistic refactors
2021-01-11 20:13:58 +02:00
Vitalii Elenhaupt
9d85e731f5
Merge pull request #179 from crystal-ameba/feature/cli-show-all-rules
...
Add --rules switch to the CLI
2021-01-10 09:34:40 +02:00
Sijawusz Pur Rahnama
2eff832669
Add --rules switch to the CLI
2021-01-09 21:01:04 +01:00
Vitalii Elenhaupt
552d31a82b
Bump v0.13.3
2020-12-04 14:55:04 +02:00
Vitalii Elenhaupt
0c0ad2a9dd
Merge pull request #174 from crystal-ameba/bump-crystal-version
...
Change supported crystal version to >= 0.35.0
2020-12-01 20:22:00 +02:00
Sijawusz Pur Rahnama
122dd8e4a9
Change supported crystal version to >= 0.35.0
2020-12-01 13:13:30 +01:00
Vitalii Elenhaupt
5b4b1e817d
Improve forward compatibility with future crystal version
...
https://github.com/crystal-ameba/ameba/issues/168#issuecomment-722051876
2020-11-05 10:23:25 +02:00
Vitalii Elenhaupt
de3f16a9dc
Disable Lint/EmptyExpression rule
...
closes #169
2020-10-23 19:21:39 +03:00
Vitalii Elenhaupt
44290a6a5d
Handle case when compiler reports incorrect node location
...
fixes #168
2020-10-23 10:41:17 +03:00
Vitalii Elenhaupt
9a42d14a1e
Correct version in readme
2020-10-17 13:45:54 +03:00