eager_eye 1.1.2 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +1 -1
- data/lib/eager_eye/detectors/callback_query.rb +10 -2
- data/lib/eager_eye/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 928603853f971cca5717d7db1ca527da41562b4aef18c27b37be3b2824a4993e
|
|
4
|
+
data.tar.gz: b3e7af83cfb0085a6e34ad65e3e633da6d3eaa517d548b530504dbb6f0a7c5c4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1879d46b6a428002adfc1d241b763fb8b59c5f6a0c82656459dbd389fe04d37ffcdf39394185141ce78837cec72386b689147171291a494f7484dbcae0bfe438
|
|
7
|
+
data.tar.gz: b6cdafbe35419653bd4d374504b1d32475c9cab7fc7ec41d8612c77924589aa1d950c819bd901f0196cdf1de33b2f114bbbbb5fcb11defb7d4624f5043356ee2
|
data/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.1.3] - 2026-01-04
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- **CallbackQuery False Positive** - Skip iterations over constants, arrays, and ranges
|
|
15
|
+
- `CONDITIONS.each { |c| ... }` no longer triggers warning
|
|
16
|
+
- `[:a, :b].each { |x| ... }` and `(1..5).each { |i| ... }` are now ignored
|
|
17
|
+
|
|
10
18
|
## [1.1.2] - 2026-01-04
|
|
11
19
|
|
|
12
20
|
### Fixed
|
data/README.md
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
<p align="center">
|
|
12
12
|
<a href="https://github.com/hamzagedikkaya/eager_eye/actions/workflows/main.yml"><img src="https://github.com/hamzagedikkaya/eager_eye/actions/workflows/main.yml/badge.svg" alt="CI"></a>
|
|
13
|
-
<a href="https://rubygems.org/gems/eager_eye"><img src="https://img.shields.io/badge/gem-v1.1.
|
|
13
|
+
<a href="https://rubygems.org/gems/eager_eye"><img src="https://img.shields.io/badge/gem-v1.1.3-red.svg" alt="Gem Version"></a>
|
|
14
14
|
<a href="https://github.com/hamzagedikkaya/eager_eye"><img src="https://img.shields.io/badge/coverage-95%25-brightgreen.svg" alt="Coverage"></a>
|
|
15
15
|
<a href="https://www.ruby-lang.org/"><img src="https://img.shields.io/badge/ruby-%3E%3D%203.1-ruby.svg" alt="Ruby"></a>
|
|
16
16
|
<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT"></a>
|
|
@@ -109,8 +109,16 @@ module EagerEye
|
|
|
109
109
|
end
|
|
110
110
|
|
|
111
111
|
def iteration_block?(node)
|
|
112
|
-
node.type == :block && node.children[0]&.type == :send
|
|
113
|
-
|
|
112
|
+
return false unless node.type == :block && node.children[0]&.type == :send
|
|
113
|
+
return false unless ITERATION_METHODS.include?(node.children[0].children[1])
|
|
114
|
+
|
|
115
|
+
!static_collection?(node.children[0].children[0])
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
def static_collection?(node)
|
|
119
|
+
return true unless node.is_a?(Parser::AST::Node)
|
|
120
|
+
|
|
121
|
+
%i[array const irange erange].include?(node.type)
|
|
114
122
|
end
|
|
115
123
|
|
|
116
124
|
def add_query_issue(node, method_name, callback_type)
|
data/lib/eager_eye/version.rb
CHANGED