abapgit-agent 1.14.1 → 1.14.2
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.
- package/package.json +1 -1
- package/src/commands/lint.js +15 -0
package/package.json
CHANGED
package/src/commands/lint.js
CHANGED
|
@@ -172,6 +172,21 @@ function resolveDependencies(abapFiles, abapDir) {
|
|
|
172
172
|
visited.add(abapFile);
|
|
173
173
|
queue.push(abapFile);
|
|
174
174
|
}
|
|
175
|
+
// For interfaces, also include the canonical concrete implementation
|
|
176
|
+
// (zif_foo → zcl_foo) so rules like unused_variables can fully type-check.
|
|
177
|
+
if (suffix.endsWith('.intf')) {
|
|
178
|
+
const implName = name.replace(/^zif_/, 'zcl_');
|
|
179
|
+
const implFile = path.join(abapDir, `${implName}.clas.abap`);
|
|
180
|
+
const implXml = path.join(abapDir, `${implName}.clas.xml`);
|
|
181
|
+
if (fs.existsSync(implFile)) {
|
|
182
|
+
deps.add(implFile);
|
|
183
|
+
if (fs.existsSync(implXml)) deps.add(implXml);
|
|
184
|
+
if (!visited.has(implFile)) {
|
|
185
|
+
visited.add(implFile);
|
|
186
|
+
queue.push(implFile);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
175
190
|
break; // intf matched — don't also try clas
|
|
176
191
|
}
|
|
177
192
|
}
|