Commit graph

132 commits

Author SHA1 Message Date
Sijawusz Pur Rahnama
98d5bc720a Skip lib definitions altogether 2024-01-10 01:14:03 +01:00
Sijawusz Pur Rahnama
e99a69765f Few refactors 2024-01-01 14:46:32 +01:00
Sijawusz Pur Rahnama
5a24f1eba5 Add UselessAssign#exclude_type_declarations 2023-12-29 01:50:19 +01:00
Sijawusz Pur Rahnama
aeffa6ad00 Add test spec covering accessor macros 2023-12-28 15:46:32 +01:00
Sijawusz Pur Rahnama
a49faa33a9 Refactor Lint/UselessAssign spec 2023-12-28 15:43:29 +01:00
Sijawusz Pur Rahnama
9745637cf9 Update UselessAssign rule to report unreferenced type declarations 2023-12-28 15:43:29 +01:00
Sijawusz Pur Rahnama
1feb5c279b Add test spec covering the loop { … } block to Lint/SharedVarInFiber rule specs 2023-12-28 15:31:11 +01:00
Sijawusz Pur Rahnama
30e3816ed1 Do not report expanded arguments in ShadowingOuterLocalVar rule 2023-11-17 18:36:19 +01:00
Sijawusz Pur Rahnama
10b577d23a Use square brackets for %w and %i array literals 2023-11-17 17:34:39 +01:00
Sijawusz Pur Rahnama
f3f1f3a2ab Misc cleanups/refactors 2023-11-14 12:34:44 +01:00
Sijawusz Pur Rahnama
21a406e56d Make Lint/NotNilAfterNoBang report calls to #match 2023-11-14 03:50:58 +01:00
Sijawusz Pur Rahnama
28014ada67 Add Lint/SpecFilename rule 2023-11-10 15:41:54 +01:00
Sijawusz Pur Rahnama
e84cc05f0f Fix false positive with dynamic literals in Lint/LiteralsComparison 2023-11-09 08:20:35 +01:00
Sijawusz Pur Rahnama
8569355b5a Move documentation-related rules into its own group 2023-11-08 18:35:32 +01:00
Sijawusz Pur Rahnama
0140fd3573 Add Lint/Typos rule 2023-11-08 02:24:35 +01:00
Sijawusz Pur Rahnama
23c61e04c0 Add Lint/DocumentationAdmonition rule 2023-11-06 16:59:09 +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
db59b23f9b Fix specs against Crystal nightly 2023-06-10 01:11:21 +02:00
Sijawusz Pur Rahnama
4d8346509e Implement Documentation rule on top of the ScopeVisitor 2023-06-08 02:04:06 +02:00
Sijawusz Pur Rahnama
1a9a58b3cd Add Lint/Documentation rule 2023-05-29 16:32:51 +02:00
Sijawusz Pur Rahnama
14f6ba0c0b
Merge pull request #323 from crystal-ameba/Sija/lint-not-nil-after-no-bang-reports-rindex-calls
Make `Lint/NotNilAfterNoBang` report calls to `#rindex`
2023-05-01 11:16:42 +02:00
Vitalii Elenhaupt
17e9566c7e
fix(lint): Lint/UnusedBlockArgument is triggered by abstract def
closes #352
2023-02-19 10:51:52 +02:00
Vitalii Elenhaupt
e7f4bb6ae3
Fix wording 2023-02-07 22:24:52 +02:00
Vitalii Elenhaupt
61a45d4321
Rework tests 2023-02-07 22:21:09 +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
ce4dd7236a Make Lint/NotNilAfterNoBang report calls to #rindex 2023-01-10 13:37:28 +01:00
Sijawusz Pur Rahnama
8e86374d08 Remove outdated spec 2023-01-10 13:10:05 +01:00
Sijawusz Pur Rahnama
d31e41b8a7 Fix specs on Crystal nightly (soon to be v1.7.0) 2023-01-10 13:10:05 +01:00
Sijawusz Pur Rahnama
bbbfdfc5a2 Tweak reported location for Lint/UnusedBlockArgument 2022-12-23 14:46:23 +01:00
Sijawusz Pur Rahnama
4f8b79ec6b
Merge pull request #324 from crystal-ameba/Sija/extend-several-rule-with-corrections
Extend `Lint/UnusedArgument` and `Lint/UnusedBlockArgument` rules with corrections
2022-12-22 18:42:35 +01:00
Sijawusz Pur Rahnama
3586b4242f Extend Lint/UnusedBlockArgument rule with corrections 2022-12-22 17:15:46 +01:00
Sijawusz Pur Rahnama
f26cd7f823 Extend Lint/UnusedArgument rule with corrections 2022-12-22 17:15:46 +01:00
Sijawusz Pur Rahnama
b9bc5aaab2
Merge pull request #327 from crystal-ameba/Sija/specs-cleanup 2022-12-22 12:08:44 +01:00
Sijawusz Pur Rahnama
9926f0295a Remove most of the obsolete specs 2022-12-21 21:13:22 +01:00
Sijawusz Pur Rahnama
1ba6fcb55c Enhance spec helpers a bit in re: to the spec context 2022-12-21 17:34:17 +01:00
Sijawusz Pur Rahnama
e9f3bbaeff Fail with the additional context 2022-12-21 17:34:10 +01:00
Sijawusz Pur Rahnama
7c617b5a7b Make spec helper methods private 2022-12-21 17:34:05 +01:00
Sijawusz Pur Rahnama
cabf203e0d
Merge pull request #326 from crystal-ameba/Sija/lint-formatting 2022-12-20 16:20:48 +01:00
Sijawusz Pur Rahnama
597372c645 Add Lint/MissingBlockArgument rule 2022-12-20 15:31:14 +01:00
Sijawusz Pur Rahnama
3bc8bda008 Add Lint/Formatting rule 2022-12-20 04:10:56 +01:00
Sijawusz Pur Rahnama
70078cf77f Synchronize properties context names in rules’ specs 2022-12-20 03:25:10 +01:00
Sijawusz Pur Rahnama
8112dddc8f Specs cleanup 2022-12-20 03:25:06 +01:00
Sijawusz Pur Rahnama
7f6bd2289e Do not report unused block arguments in Lint/UnusedArgument rule 2022-12-15 18:35:16 +01:00
Sijawusz Pur Rahnama
858557bc07 Add Lint/UnusedBlockArgument rule 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
99c81d3630 Add spec for positive case in macro scope in Lint/LiteralsComparison rule 2022-12-09 23:53:39 +01:00
Sijawusz Pur Rahnama
2fb453c61f Add additional spec for Lint/NotNil rule 2022-12-08 17:47:22 +01:00
Sijawusz Pur Rahnama
2cb8c1381f Don’t treat crystal paths as literals in Lint/LiteralsComparison 2022-12-08 13:55:29 +01:00
Sijawusz Pur Rahnama
38eb5d5e50 Fix invalid crystal syntax in Lint/Syntax rule spec 2022-11-23 03:26:55 +01:00