Commit graph

562 commits

Author SHA1 Message Date
Sijawusz Pur Rahnama
98d5bc720a Skip lib definitions altogether 2024-01-10 01:14:03 +01:00
Sijawusz Pur Rahnama
d23ad7f0ab Make Scope#*_def? methods accept check_outer_scopes parameter 2024-01-10 01:10:36 +01:00
Sijawusz Pur Rahnama
ce3f2b7e4b Add QoL Variable#reference(scope) method 2024-01-01 14:49:27 +01:00
Sijawusz Pur Rahnama
e99a69765f Few refactors 2024-01-01 14:46:32 +01:00
Sijawusz Pur Rahnama
6d0b12c70f Cleanup docs 2024-01-01 14:46:32 +01:00
Sijawusz Pur Rahnama
65ab317a3b Merge delegate calls 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
4567293add Drop type_definition? check from Scope#top_level? 2023-12-28 15:43:29 +01:00
Sijawusz Pur Rahnama
1b661d633d Refactor ScopeVisitor to ignore accessor macros 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
4ad151e5e0 Do not automatically consider type definitions as referenced 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
57898fd797 Make BranchVisitor treat loop { … } calls as branchable 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
9bb6c9ac75
Merge pull request #436 from crystal-ameba/cleanup-properties-macro
Make `RuleConfig#properties` accept only `Call` nodes
2023-12-28 09:24:09 +01:00
Sijawusz Pur Rahnama
55f3ec53b7 Make RuleConfig#properties accept only Call nodes
Add optional named argument `as`, in order to specify the property type
2023-12-28 04:48:18 +01:00
Sijawusz Pur Rahnama
26d9bc0bd0 Revert "Merge pull request #394 from stufro/388-raise-on-invalid-file-path"
This reverts commit 18d193bd08, reversing
changes made to 7b8316f061.
2023-12-28 02:03:44 +01:00
Sijawusz Pur Rahnama
47088b10ca Add some more excluded operators to BinaryOperatorParameterName rule 2023-11-24 21:13:04 +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
a8b8c35cc7 Fix usage of deprecated methods 2023-11-14 11:22:17 +01:00
Sijawusz Pur Rahnama
11bf9ffcdc Remove unused include AST::Util 2023-11-14 11:22:17 +01:00
Sijawusz Pur Rahnama
52ccf23ef9 Remove deprecated Assignment#transformed? method 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
775650c882 Add MultiAssign to NodeVisitor::NODES 2023-11-14 05:00:49 +01:00
Sijawusz Pur Rahnama
21a406e56d Make Lint/NotNilAfterNoBang report calls to #match 2023-11-14 03:50:58 +01:00
Sijawusz Pur Rahnama
0a2609c1b4 Add ip to the list of BlockParameterName#allowed_names 2023-11-12 11:59:06 +01:00
Sijawusz Pur Rahnama
06952fc7d3 Add op to the list of BlockParameterName#allowed_names 2023-11-12 11:36:03 +01:00
Sijawusz Pur Rahnama
f984d83b05 Use name(_end)_location helpers consistently 2023-11-12 10:24:12 +01:00
Sijawusz Pur Rahnama
98cc6fd612 Make it easier to add issues for nodes with name location preference 2023-11-12 10:23:36 +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
61ccb030bd Fix newly found offenses 2023-11-11 19:08:14 +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