Commit graph

291 commits

Author SHA1 Message Date
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
c9bc01f88c
Merge pull request #439 from crystal-ameba/fix-issue-353
Make `Lint/SharedVarInFiber` rule account for `loop { ... }`
2023-12-28 15:31:43 +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
61afa5bb2b Add error to the RescuedExceptionsVariableName#allowed_names 2023-12-28 13:07:14 +01:00
Sijawusz Pur Rahnama
82e0e53080 Revert "Fix Performance/ExcessiveAllocations to exclude each calls without a block"
This reverts commit 29e29b8e1d.
2023-11-17 19:48:41 +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
547fec5a94 Refactor TypeNames to report the name itself only 2023-11-14 11:22:17 +01:00
Sijawusz Pur Rahnama
b3f11913ed Reports also methods not ending with ? suffix in PredicateName rule 2023-11-14 11:22:17 +01:00
Sijawusz Pur Rahnama
633ed7538e Use prefer_name_location: true in PredicateName rule 2023-11-14 11:22:17 +01:00
Sijawusz Pur Rahnama
52a3e47a3b
Merge pull request #423 from crystal-ameba/lint-not-nil-after-no-bang-reports-match-calls
Make `Lint/NotNilAfterNoBang` report calls to `#match`
2023-11-14 10:25:44 +01:00
Sijawusz Pur Rahnama
018adb54be Add AsciiIdentifiers#ignore_symbols property 2023-11-14 05:22:29 +01:00
Sijawusz Pur Rahnama
be76b3682a Report string literals in AsciiIdentifiers rule 2023-11-14 05:15:38 +01:00
Sijawusz Pur Rahnama
21a406e56d Make Lint/NotNilAfterNoBang report calls to #match 2023-11-14 03:50:58 +01:00
Sijawusz Pur Rahnama
6caf24ad6d
Merge pull request #421 from crystal-ameba/add-binary-operator-parameter-name-rule
Add `Naming/BinaryOperatorParameterName` rule
2023-11-12 09:56:26 +01:00
Sijawusz Pur Rahnama
971bff6c27 Add Naming/BlockParameterName rule 2023-11-11 19:07:46 +01:00
Sijawusz Pur Rahnama
bf4219532f Add Naming/BinaryOperatorParameterName rule 2023-11-11 18:48:26 +01:00
Sijawusz Pur Rahnama
a40f02f77f
Merge pull request #420 from crystal-ameba/add-spec-filename-rule
Add `Lint/SpecFilename` rule
2023-11-11 08:26:33 +01:00
Sijawusz Pur Rahnama
28014ada67 Add Lint/SpecFilename rule 2023-11-10 15:41:54 +01:00
Sijawusz Pur Rahnama
1d76a7c71a Add Naming/RescuedExceptionsVariableName rule 2023-11-10 13:26:31 +01:00
Sijawusz Pur Rahnama
0abb73f0b6
Merge pull request #414 from crystal-ameba/add-ascii-identifiers-rule
Add `Naming/AsciiIdentifiers` rule
2023-11-10 01:59:04 +01:00
Sijawusz Pur Rahnama
fd44eeba08 Add Naming/AsciiIdentifiers rule 2023-11-10 01:55:19 +01:00
Sijawusz Pur Rahnama
cc23e7a7e7
Merge pull request #415 from crystal-ameba/add-accessor-method-name-rule
Add `Naming/AccessorMethodName` rule
2023-11-09 10:34:37 +01:00
Sijawusz Pur Rahnama
964d011d53 Add Naming/AccessorMethodName rule 2023-11-09 10:30:59 +01:00
Sijawusz Pur Rahnama
3f1e925e07
Merge pull request #417 from crystal-ameba/fix-issue-400
Fix false positive with dynamic literals in `Lint/LiteralsComparison`
2023-11-09 09:09: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
b9ce705a47 Add Naming/Filename rule 2023-11-09 07:07:45 +01:00
Sijawusz Pur Rahnama
881209d54e
Merge pull request #412 from crystal-ameba/group-documentation-rules
Move documentation-related rules into its own group
2023-11-09 06:19:36 +01:00
Sijawusz Pur Rahnama
b25dc402c8 Group naming-related rules 2023-11-09 00:16:29 +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
a33f98624a
Merge pull request #376 from crystal-ameba/update-to-work-with-crystal-nightly 2023-07-11 23:50:14 +02:00
Sijawusz Pur Rahnama
327ed546b9
Apply suggestions from code review
Co-authored-by: Vitalii Elenhaupt <3624712+veelenga@users.noreply.github.com>
2023-07-10 16:09:01 +02:00
Sijawusz Pur Rahnama
ddff8d226b Add Performance/MinMaxAfterMap rule 2023-07-10 15:46:17 +02:00
Sijawusz Pur Rahnama
29e29b8e1d Fix Performance/ExcessiveAllocations to exclude each calls without a block 2023-06-30 21:44:47 +02:00
Sijawusz Pur Rahnama
abe5237802 Add Performance/ExcessiveAllocations rule 2023-06-30 15:17:40 +02:00
Sijawusz Pur Rahnama
4d0125a0f3 Fix Style/VerboseBlock rule to work with binary operations 2023-06-29 08:15:39 +02: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