Commit graph

127 commits

Author SHA1 Message Date
Sijawusz Pur Rahnama
61ccb030bd Fix newly found offenses 2023-11-11 19:08:14 +01:00
Vitalii Elenhaupt
789e1b77e8
fix: crystal next compatibility
refs https://github.com/crystal-lang/crystal/pull/11597
fixes https://github.com/crystal-ameba/ameba/issues/406
2023-10-06 18:57:39 +03:00
Sijawusz Pur Rahnama
5cff76071a No need for such micro-optimizations, LLVM takes care of those 2023-07-02 14:34:25 +02:00
Sijawusz Pur Rahnama
596b0dd9d0 Misc tweaks and refactors 2023-06-14 15:06:24 +02:00
Sijawusz Pur Rahnama
1931a5f4ef Make skip a named argument 2023-06-12 23:17:14 +02:00
Sijawusz Pur Rahnama
c09b36799a Make AST::NodeVisitor::Category a flag enum 2023-06-12 23:17:14 +02:00
Sijawusz Pur Rahnama
38b6751bc0 Add AST::NodeVisitor::Category simplifying code a bit 2023-06-12 23:17:14 +02:00
Sijawusz Pur Rahnama
94e31d4685 Do the same in NodeVisitor 2023-06-08 04:28:37 +02:00
Sijawusz Pur Rahnama
e12d72cc88 Set the ASTNode#visibility as well 2023-06-08 04:28:17 +02:00
Sijawusz Pur Rahnama
7caa47fb6a Several small refactors 2023-06-08 02:04:30 +02:00
Sijawusz Pur Rahnama
4c740f394a Implement Scope#visibility 2023-06-08 01:58:58 +02:00
Sijawusz Pur Rahnama
85c3db4d74 Move NODES constant into its proper namespace 2023-05-31 13:15:01 +02:00
Vitalii Elenhaupt
d20cc212b9
Styling changes 2023-02-07 20:03:52 +02:00
Vitalii Elenhaupt
6b2ddcb1d9
Address feedback, add tests 2023-02-07 17:19:04 +02:00
Vitalii Elenhaupt
14a9ec3a75
Incorporate changes for shadowing outer local var 2023-02-04 20:53:41 +02:00
Vitalii Elenhaupt
ddbcf5cb3f
fix(lint): useless assignment for type definition
closes #342
2023-02-04 16:57:46 +02:00
Sijawusz Pur Rahnama
bb0c0eeec6 Consider previous_def implicitly accessing variables, in the same way as super does 2022-12-15 18:35:16 +01:00
Sijawusz Pur Rahnama
6ffb635dcc Add Scope#yields? 2022-12-15 18:35:16 +01:00
Sijawusz Pur Rahnama
9df66e890b Do not report anonymous block arguments in Lint/UnusedArgument 2022-12-12 18:21:19 +01:00
Sijawusz Pur Rahnama
a8fca61b22 Doc tweaks 2022-12-10 00:20:20 +01:00
Sijawusz Pur Rahnama
2dc21a00d9 Remove treating paths as literals in AST::Util#literal? & friends 2022-12-08 17:47:22 +01:00
Sijawusz Pur Rahnama
db3ef762b9 Uncomment forgotten line 2022-12-08 17:47:22 +01:00
Sijawusz Pur Rahnama
07ce595ef2 Readability refactors 2022-12-08 17:47:22 +01:00
Sijawusz Pur Rahnama
f45d6a2ef0 Fix newly found issue 2022-12-08 02:16:16 +01:00
Sijawusz Pur Rahnama
1524aad299 Add Style/QueryBoolMethods rule 2022-12-08 02:16:16 +01:00
Sijawusz Pur Rahnama
2113e8c055 Refactor MacroReferenceFinder class a bit 2022-11-28 11:38:41 +01:00
Sijawusz Pur Rahnama
134963ece7 Minor details 2022-11-28 11:38:41 +01:00
Sijawusz Pur Rahnama
523a622b34 Remove leftover from some merge/rebase gone wrong 2022-11-28 11:38:41 +01:00
Sijawusz Pur Rahnama
2c67fe2c3f Use tuple instead of an array 2022-11-23 03:23:42 +01:00
Sijawusz Pur Rahnama
8b43a40a65 Misc refactors 2022-11-23 03:22:27 +01:00
Sijawusz Pur Rahnama
ffd63ef028 Fix typo in AST::Branchable example 2022-11-23 03:21:49 +01:00
Sijawusz Pur Rahnama
4500181ddb Remove redundant blank comment lines 2022-11-23 03:21:15 +01:00
Sijawusz Pur Rahnama
95d68114c7 Fix typos throughout the code 2022-11-16 16:55:32 +01:00
Sijawusz Pur Rahnama
76a4209706 Tweak comments in AST::Util 2022-11-15 17:42:08 +01:00
Sijawusz Pur Rahnama
2fb37da80f Refactor AST::Util#literal? helper 2022-11-15 17:42:08 +01:00
Sijawusz Pur Rahnama
e668ba5bf5 Readability-related refactors 2022-11-14 02:26:52 +01:00
Sijawusz Pur Rahnama
a6ebb48f14 Remove redundant parentheses in if expressions
+ `elsif` -> `case`
2022-11-14 01:52:07 +01:00
Sijawusz Pur Rahnama
d1bfdaabeb Use #in? instead of #includes? in several places
Because:

1. it’s more semantically descriptive
2. it’s shorter
2022-11-14 01:18:43 +01:00
Sijawusz Pur Rahnama
e2faffacfe
Merge branch 'master' into fix/crystal-nightly 2022-04-05 00:37:48 +02:00
Sijawusz Pur Rahnama
e6ad7c5d24 Fix bug in AST::Scope#in_macro? not taking account for Crystal::MacroFor 2022-04-04 02:05:13 +02:00
Sijawusz Pur Rahnama
71de3f0012 Cleanup method docs in AST::Scope 2022-04-04 02:05:13 +02:00
Sijawusz Pur Rahnama
2e9ef7fcb2 Reword visit(node) methods comment in AST::NodeVisitor 2022-04-04 01:35:59 +02:00
Sijawusz Pur Rahnama
a38cfd1661 Refactor AST::ScopeVisitor similarly to AST::NodeVisitor 2022-04-04 01:35:32 +02:00
Sijawusz Pur Rahnama
3f7ade573a Add ability to skip some of the nodes in AST::ScopeVisitor 2022-04-04 01:34:34 +02:00
Vitalii Elenhaupt
8d4730182f
Rework breaking specs, break backward compatibility 2022-04-04 00:59:21 +03:00
Vitalii Elenhaupt
087f470f15
Backward compatibility to Crystal 1.3 2022-04-03 19:17:47 +03:00
Vitalii Elenhaupt
03adc20872
Pass on crystal-nightly 2022-03-11 14:15:05 +02:00
fn ⌃ ⌥
f288cc3c4f
Add Style/GuardClause rule (#254) 2021-12-09 21:33:47 +01:00
fn ⌃ ⌥
63a6c73dc0
Autocorrect various rules (#253) 2021-11-16 22:30:33 +01:00
Vitalii Elenhaupt
429f76f8b6
Do not report unreachable code after loops
closes #251
2021-11-10 09:16:14 +02:00