Commit graph

138 commits

Author SHA1 Message Date
Sijawusz Pur Rahnama
a661cf10fc Ignore files with extensions other than .cr 2024-03-09 22:38:47 +01:00
Sijawusz Pur Rahnama
a2c9aa67cc Add missed spec case for files outside spec/ folder 2024-03-09 22:38:23 +01:00
Sijawusz Pur Rahnama
17084f4a1d Remove naive solution for #447 2024-01-22 17:15:52 +01:00
Sijawusz Pur Rahnama
3bea264948 Refactor Lint/UselessAssign rule a bit 2024-01-19 20:11:56 +01:00
Sijawusz Pur Rahnama
a79e711fae Exclude reporting type declarations passed as call arguments 2024-01-18 00:34:28 +01:00
Sijawusz Pur Rahnama
f2677d68f6 Do not report type declarations within generic records 2024-01-16 02:04:41 +01:00
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