@abaplint/cli 2.119.61 → 2.119.63
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/build/cli.js +111 -89
- package/package.json +2 -2
package/build/cli.js
CHANGED
|
@@ -11460,7 +11460,9 @@ class StatementParser {
|
|
|
11460
11460
|
statement = input;
|
|
11461
11461
|
}
|
|
11462
11462
|
else if (length === 1 && lastToken instanceof tokens_1.Pragma) {
|
|
11463
|
-
|
|
11463
|
+
// special case, everything crashes if StatementNodes doesnt have children
|
|
11464
|
+
statement = new nodes_1.StatementNode(new _statement_1.Empty(), undefined, [lastToken])
|
|
11465
|
+
.setChildren(this.tokensToNodes([lastToken]));
|
|
11464
11466
|
}
|
|
11465
11467
|
}
|
|
11466
11468
|
return statement;
|
|
@@ -19849,7 +19851,7 @@ class TypeMesh {
|
|
|
19849
19851
|
const on = (0, combi_1.seq)("ON", expressions_1.NamespaceSimpleName, "=", expressions_1.NamespaceSimpleName, (0, combi_1.star)((0, combi_1.seq)("AND", expressions_1.NamespaceSimpleName, "=", expressions_1.NamespaceSimpleName)));
|
|
19850
19852
|
const using = (0, combi_1.seq)("USING KEY", expressions_1.NamespaceSimpleName);
|
|
19851
19853
|
const association = (0, combi_1.seq)("ASSOCIATION", expressions_1.NamespaceSimpleName, "TO", expressions_1.NamespaceSimpleName, (0, combi_1.plus)(on));
|
|
19852
|
-
const ret = (0, combi_1.ver)(version_1.Release.
|
|
19854
|
+
const ret = (0, combi_1.ver)(version_1.Release.v740sp05, (0, combi_1.seq)("TYPES", expressions_1.NamespaceSimpleName, "TYPE", (0, combi_1.opt)("REF TO"), expressions_1.TypeName, (0, combi_1.plus)(association), (0, combi_1.opt)(using)));
|
|
19853
19855
|
return ret;
|
|
19854
19856
|
}
|
|
19855
19857
|
}
|
|
@@ -26251,7 +26253,7 @@ class CurrentScope {
|
|
|
26251
26253
|
}
|
|
26252
26254
|
findTypePoolConstant(name) {
|
|
26253
26255
|
var _a;
|
|
26254
|
-
if (name === undefined || name.includes("_") ===
|
|
26256
|
+
if (name === undefined || name.includes("_") === false) {
|
|
26255
26257
|
return undefined;
|
|
26256
26258
|
}
|
|
26257
26259
|
const typePoolName = name.split("_")[0];
|
|
@@ -26273,7 +26275,7 @@ class CurrentScope {
|
|
|
26273
26275
|
}
|
|
26274
26276
|
findTypePoolType(name) {
|
|
26275
26277
|
var _a;
|
|
26276
|
-
if (name.includes("_") ===
|
|
26278
|
+
if (name.includes("_") === false) {
|
|
26277
26279
|
return undefined;
|
|
26278
26280
|
}
|
|
26279
26281
|
const typePoolName = name.split("_")[0];
|
|
@@ -26587,11 +26589,9 @@ class ObjectOriented {
|
|
|
26587
26589
|
findMethodInInterface(interfaceName, methodName) {
|
|
26588
26590
|
const idef = this.scope.findInterfaceDefinition(interfaceName);
|
|
26589
26591
|
if (idef) {
|
|
26590
|
-
const
|
|
26591
|
-
|
|
26592
|
-
|
|
26593
|
-
return { method, def: idef };
|
|
26594
|
-
}
|
|
26592
|
+
const method = idef.getMethodDefinitions().getByName(methodName);
|
|
26593
|
+
if (method) {
|
|
26594
|
+
return { method, def: idef };
|
|
26595
26595
|
}
|
|
26596
26596
|
return this.findMethodViaAlias(methodName, idef);
|
|
26597
26597
|
}
|
|
@@ -26813,17 +26813,14 @@ class ObjectOriented {
|
|
|
26813
26813
|
if (defs === undefined) {
|
|
26814
26814
|
return undefined;
|
|
26815
26815
|
}
|
|
26816
|
-
|
|
26817
|
-
|
|
26818
|
-
|
|
26819
|
-
return this.findMethodInSuper(def, methodName);
|
|
26820
|
-
}
|
|
26821
|
-
else {
|
|
26822
|
-
return method;
|
|
26823
|
-
}
|
|
26824
|
-
}
|
|
26816
|
+
const method = defs.getByName(methodName);
|
|
26817
|
+
if (method === undefined) {
|
|
26818
|
+
return undefined;
|
|
26825
26819
|
}
|
|
26826
|
-
|
|
26820
|
+
if (method.isRedefinition()) {
|
|
26821
|
+
return this.findMethodInSuper(def, methodName);
|
|
26822
|
+
}
|
|
26823
|
+
return method;
|
|
26827
26824
|
}
|
|
26828
26825
|
findMethodInSuper(child, methodName) {
|
|
26829
26826
|
let sup = child.getSuperClass();
|
|
@@ -50694,6 +50691,8 @@ class Attributes {
|
|
|
50694
50691
|
this.tlist = [];
|
|
50695
50692
|
this.filename = input.filename;
|
|
50696
50693
|
this.parse(node, input);
|
|
50694
|
+
this.all = this.static.concat(this.instance);
|
|
50695
|
+
this.byName = this.buildByName();
|
|
50697
50696
|
this.types = new type_definitions_1.TypeDefinitions(this.tlist);
|
|
50698
50697
|
}
|
|
50699
50698
|
getTypes() {
|
|
@@ -50706,10 +50705,7 @@ class Attributes {
|
|
|
50706
50705
|
return this.aliases;
|
|
50707
50706
|
}
|
|
50708
50707
|
getAll() {
|
|
50709
|
-
|
|
50710
|
-
res = res.concat(this.static);
|
|
50711
|
-
res = res.concat(this.instance);
|
|
50712
|
-
return res;
|
|
50708
|
+
return this.all;
|
|
50713
50709
|
}
|
|
50714
50710
|
getStaticsByVisibility(visibility) {
|
|
50715
50711
|
const attributes = [];
|
|
@@ -50744,27 +50740,29 @@ class Attributes {
|
|
|
50744
50740
|
}
|
|
50745
50741
|
return attributes;
|
|
50746
50742
|
}
|
|
50747
|
-
// todo, optimize
|
|
50748
50743
|
findByName(name) {
|
|
50749
|
-
|
|
50750
|
-
|
|
50751
|
-
|
|
50752
|
-
|
|
50753
|
-
|
|
50744
|
+
return this.byName[name.toUpperCase()];
|
|
50745
|
+
}
|
|
50746
|
+
/////////////////////////////
|
|
50747
|
+
buildByName() {
|
|
50748
|
+
const ret = {};
|
|
50749
|
+
for (const a of this.static) {
|
|
50750
|
+
ret[a.getName().toUpperCase()] = a;
|
|
50754
50751
|
}
|
|
50755
|
-
for (const a of this.
|
|
50756
|
-
|
|
50757
|
-
|
|
50752
|
+
for (const a of this.instance) {
|
|
50753
|
+
const name = a.getName().toUpperCase();
|
|
50754
|
+
if (ret[name] === undefined) {
|
|
50755
|
+
ret[name] = a;
|
|
50758
50756
|
}
|
|
50759
50757
|
}
|
|
50760
|
-
for (const a of this.
|
|
50761
|
-
|
|
50762
|
-
|
|
50758
|
+
for (const a of this.constants) {
|
|
50759
|
+
const name = a.getName().toUpperCase();
|
|
50760
|
+
if (ret[name] === undefined) {
|
|
50761
|
+
ret[name] = a;
|
|
50763
50762
|
}
|
|
50764
50763
|
}
|
|
50765
|
-
return
|
|
50764
|
+
return ret;
|
|
50766
50765
|
}
|
|
50767
|
-
/////////////////////////////
|
|
50768
50766
|
parse(node, input) {
|
|
50769
50767
|
var _a, _b;
|
|
50770
50768
|
const cdef = node.findDirectStructure(Structures.ClassDefinition);
|
|
@@ -54541,10 +54539,19 @@ class Config {
|
|
|
54541
54539
|
for (const rule of sorted) {
|
|
54542
54540
|
rules[rule.getMetadata().key] = rule.getConfig();
|
|
54543
54541
|
}
|
|
54544
|
-
const version =
|
|
54545
|
-
|
|
54546
|
-
|
|
54547
|
-
|
|
54542
|
+
const version = langVer !== undefined
|
|
54543
|
+
? {
|
|
54544
|
+
release: ver === undefined || ver === version_1.Version.Cloud
|
|
54545
|
+
? version_1.Release.Newest.name
|
|
54546
|
+
: typeof ver === "string"
|
|
54547
|
+
? (0, version_1.versionToABAPRelease)(ver).name
|
|
54548
|
+
: ver.release,
|
|
54549
|
+
language: langVer,
|
|
54550
|
+
}
|
|
54551
|
+
: ver !== null && ver !== void 0 ? ver : {
|
|
54552
|
+
release: version_1.Release.Newest.name,
|
|
54553
|
+
language: version_1.LanguageVersion.Normal,
|
|
54554
|
+
};
|
|
54548
54555
|
// defaults: dont skip anything, report everything. The user can decide to skip stuff
|
|
54549
54556
|
// its difficult to debug errors not being reported
|
|
54550
54557
|
const config = {
|
|
@@ -54569,7 +54576,6 @@ class Config {
|
|
|
54569
54576
|
}],
|
|
54570
54577
|
syntax: {
|
|
54571
54578
|
version,
|
|
54572
|
-
languageVersion: langVer,
|
|
54573
54579
|
errorNamespace: "^(Z|Y|LCL\_|TY\_|LIF\_)",
|
|
54574
54580
|
globalConstants: [],
|
|
54575
54581
|
ambigiousVoids: [],
|
|
@@ -54678,9 +54684,6 @@ class Config {
|
|
|
54678
54684
|
return v;
|
|
54679
54685
|
}
|
|
54680
54686
|
getLanguageVersion() {
|
|
54681
|
-
if (this.config.syntax.languageVersion !== undefined) {
|
|
54682
|
-
return this.config.syntax.languageVersion;
|
|
54683
|
-
}
|
|
54684
54687
|
const v = this.config.syntax.version;
|
|
54685
54688
|
if (v !== undefined && typeof v !== "string") {
|
|
54686
54689
|
return v.language;
|
|
@@ -54705,7 +54708,10 @@ class Config {
|
|
|
54705
54708
|
return;
|
|
54706
54709
|
}
|
|
54707
54710
|
if (version === version_1.Version.Cloud) {
|
|
54708
|
-
this.config.syntax.
|
|
54711
|
+
this.config.syntax.version = {
|
|
54712
|
+
release: version_1.Release.Newest.name,
|
|
54713
|
+
language: version_1.LanguageVersion.Cloud,
|
|
54714
|
+
};
|
|
54709
54715
|
}
|
|
54710
54716
|
// OpenABAP keeps its own version identity; open-abap-ness is derived from the
|
|
54711
54717
|
// release in getOpenABAP() rather than a separate stored flag.
|
|
@@ -59633,6 +59639,7 @@ function parseDynpros(parsed) {
|
|
|
59633
59639
|
fields.push({
|
|
59634
59640
|
name: f.NAME,
|
|
59635
59641
|
type: f.TYPE,
|
|
59642
|
+
contType: f.CONT_TYPE,
|
|
59636
59643
|
length: parseNumber(f.LENGTH),
|
|
59637
59644
|
vislength: parseNumber(f.VISLENGTH),
|
|
59638
59645
|
line: parseNumber(f.LINE),
|
|
@@ -61520,9 +61527,8 @@ class DataDefinition extends _abstract_object_1.AbstractObject {
|
|
|
61520
61527
|
}
|
|
61521
61528
|
if (found === undefined) {
|
|
61522
61529
|
// typed virtual element: VIRTUAL <name> : <type>
|
|
61523
|
-
|
|
61524
|
-
|
|
61525
|
-
found = names[0];
|
|
61530
|
+
if (e.findDirectTokenByText("VIRTUAL") !== undefined) {
|
|
61531
|
+
found = e.findFirstExpression(expressions_1.CDSName);
|
|
61526
61532
|
}
|
|
61527
61533
|
}
|
|
61528
61534
|
if (found === undefined) {
|
|
@@ -68814,7 +68820,7 @@ class Registry {
|
|
|
68814
68820
|
}
|
|
68815
68821
|
static abaplintVersion() {
|
|
68816
68822
|
// magic, see build script "version.js"
|
|
68817
|
-
return "2.119.
|
|
68823
|
+
return "2.119.63";
|
|
68818
68824
|
}
|
|
68819
68825
|
getDDICReferences() {
|
|
68820
68826
|
return this.ddicReferences;
|
|
@@ -70985,17 +70991,22 @@ class BeginEndNames extends _abap_rule_1.ABAPRule {
|
|
|
70985
70991
|
test(stru, type, b, e, file) {
|
|
70986
70992
|
const output = [];
|
|
70987
70993
|
for (const sub of stru.findAllStructuresRecursive(type)) {
|
|
70988
|
-
|
|
70994
|
+
const beginStatement = sub.findDirectStatement(b);
|
|
70995
|
+
const endStatement = sub.findDirectStatement(e);
|
|
70996
|
+
if (beginStatement === undefined || endStatement === undefined) {
|
|
70997
|
+
continue;
|
|
70998
|
+
}
|
|
70999
|
+
let begin = beginStatement.findFirstExpression(Expressions.NamespaceSimpleName);
|
|
70989
71000
|
if (begin === undefined) {
|
|
70990
|
-
begin =
|
|
71001
|
+
begin = beginStatement.findFirstExpression(Expressions.DefinitionName);
|
|
70991
71002
|
}
|
|
70992
71003
|
if (begin === undefined) {
|
|
70993
71004
|
continue;
|
|
70994
71005
|
}
|
|
70995
71006
|
const first = begin.getFirstToken();
|
|
70996
|
-
let end =
|
|
71007
|
+
let end = endStatement.findFirstExpression(Expressions.NamespaceSimpleName);
|
|
70997
71008
|
if (end === undefined) {
|
|
70998
|
-
end =
|
|
71009
|
+
end = endStatement.findFirstExpression(Expressions.DefinitionName);
|
|
70999
71010
|
}
|
|
71000
71011
|
if (end === undefined) {
|
|
71001
71012
|
continue;
|
|
@@ -78207,7 +78218,7 @@ ${indentation} output = ${uniqueName}.\n`;
|
|
|
78207
78218
|
}
|
|
78208
78219
|
}
|
|
78209
78220
|
}
|
|
78210
|
-
if (fix === undefined
|
|
78221
|
+
if (fix === undefined) {
|
|
78211
78222
|
const found = high.findFirstExpression(Expressions.NewObject);
|
|
78212
78223
|
if (found === undefined) {
|
|
78213
78224
|
return undefined;
|
|
@@ -78381,12 +78392,13 @@ class DynproChecks {
|
|
|
78381
78392
|
const ret = [];
|
|
78382
78393
|
for (let index = 0; index < dynpro.fields.length; index++) {
|
|
78383
78394
|
const current = dynpro.fields[index];
|
|
78384
|
-
if (current.name === undefined || current.type === "FRAME") {
|
|
78395
|
+
if (current.name === undefined || current.type === "FRAME" || this.hasContainerRelativeCoordinates(current)) {
|
|
78385
78396
|
continue;
|
|
78386
78397
|
}
|
|
78387
78398
|
for (let compare = index + 1; compare < dynpro.fields.length; compare++) {
|
|
78388
78399
|
const other = dynpro.fields[compare];
|
|
78389
|
-
if (other.name === undefined || other.type === "FRAME" || this.
|
|
78400
|
+
if (other.name === undefined || other.type === "FRAME" || this.hasContainerRelativeCoordinates(other)
|
|
78401
|
+
|| this.overlaps(current, other) === false) {
|
|
78390
78402
|
continue;
|
|
78391
78403
|
}
|
|
78392
78404
|
const message = `Screen ${dynpro.number}, ${current.type} ${current.name} and ${other.type} ${other.name} are overlapping`;
|
|
@@ -78395,6 +78407,9 @@ class DynproChecks {
|
|
|
78395
78407
|
}
|
|
78396
78408
|
return ret;
|
|
78397
78409
|
}
|
|
78410
|
+
hasContainerRelativeCoordinates(field) {
|
|
78411
|
+
return field.contType === "TABLE_CTRL" || field.contType === "LOOP";
|
|
78412
|
+
}
|
|
78398
78413
|
overlaps(first, second) {
|
|
78399
78414
|
if (first.line === 0 || second.line === 0 || first.column === 0 || second.column === 0) {
|
|
78400
78415
|
return false;
|
|
@@ -85844,7 +85859,6 @@ const Expressions = __importStar(__webpack_require__(/*! ../abap/2_statements/ex
|
|
|
85844
85859
|
const _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ "../core/build/src/rules/_abap_rule.js");
|
|
85845
85860
|
const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "../core/build/src/rules/_basic_rule_config.js");
|
|
85846
85861
|
const issue_1 = __webpack_require__(/*! ../issue */ "../core/build/src/issue.js");
|
|
85847
|
-
const tokens_1 = __webpack_require__(/*! ../abap/1_lexer/tokens */ "../core/build/src/abap/1_lexer/tokens/index.js");
|
|
85848
85862
|
const expressions_1 = __webpack_require__(/*! ../abap/2_statements/expressions */ "../core/build/src/abap/2_statements/expressions/index.js");
|
|
85849
85863
|
const _irule_1 = __webpack_require__(/*! ./_irule */ "../core/build/src/rules/_irule.js");
|
|
85850
85864
|
class NamesNoDashConf extends _basic_rule_config_1.BasicRuleConfig {
|
|
@@ -85884,32 +85898,26 @@ class NamesNoDash extends _abap_rule_1.ABAPRule {
|
|
|
85884
85898
|
if (obj.getType() !== "CLAS" && obj.getType() !== "INTF") {
|
|
85885
85899
|
for (const form of struc.findAllStatements(Statements.Form)) {
|
|
85886
85900
|
const expr = form.findFirstExpression(expressions_1.FormName);
|
|
85887
|
-
|
|
85888
|
-
|
|
85889
|
-
|
|
85890
|
-
|
|
85891
|
-
break;
|
|
85892
|
-
}
|
|
85901
|
+
const token = expr === null || expr === void 0 ? void 0 : expr.findDirectTokenByText("-");
|
|
85902
|
+
if (token) {
|
|
85903
|
+
const issue = issue_1.Issue.atToken(file, token, this.getMessage(), this.getMetadata().key, this.conf.severity);
|
|
85904
|
+
issues.push(issue);
|
|
85893
85905
|
}
|
|
85894
85906
|
}
|
|
85895
85907
|
for (const form of struc.findAllStatements(Statements.Parameter)) {
|
|
85896
85908
|
const expr = form.findFirstExpression(Expressions.FieldSub);
|
|
85897
|
-
|
|
85898
|
-
|
|
85899
|
-
|
|
85900
|
-
|
|
85901
|
-
break;
|
|
85902
|
-
}
|
|
85909
|
+
const token = expr === null || expr === void 0 ? void 0 : expr.findDirectTokenByText("-");
|
|
85910
|
+
if (token) {
|
|
85911
|
+
const issue = issue_1.Issue.atToken(file, token, this.getMessage(), this.getMetadata().key, this.conf.severity);
|
|
85912
|
+
issues.push(issue);
|
|
85903
85913
|
}
|
|
85904
85914
|
}
|
|
85905
85915
|
for (const form of struc.findAllStatements(Statements.SelectOption)) {
|
|
85906
85916
|
const expr = form.findFirstExpression(Expressions.FieldSub);
|
|
85907
|
-
|
|
85908
|
-
|
|
85909
|
-
|
|
85910
|
-
|
|
85911
|
-
break;
|
|
85912
|
-
}
|
|
85917
|
+
const token = expr === null || expr === void 0 ? void 0 : expr.findDirectTokenByText("-");
|
|
85918
|
+
if (token) {
|
|
85919
|
+
const issue = issue_1.Issue.atToken(file, token, this.getMessage(), this.getMetadata().key, this.conf.severity);
|
|
85920
|
+
issues.push(issue);
|
|
85913
85921
|
}
|
|
85914
85922
|
}
|
|
85915
85923
|
}
|
|
@@ -88011,11 +88019,11 @@ ENDIF.`,
|
|
|
88011
88019
|
}
|
|
88012
88020
|
}
|
|
88013
88021
|
else {
|
|
88014
|
-
const classNameExpression = staNode.
|
|
88015
|
-
const methodNameExpression = staNode.
|
|
88016
|
-
if (classNameExpression
|
|
88017
|
-
const className = classNameExpression
|
|
88018
|
-
const methodName = methodNameExpression
|
|
88022
|
+
const classNameExpression = staNode.findFirstExpression(Expressions.ClassName);
|
|
88023
|
+
const methodNameExpression = staNode.findFirstExpression(Expressions.MethodName);
|
|
88024
|
+
if (classNameExpression && methodNameExpression) {
|
|
88025
|
+
const className = classNameExpression.concatTokens();
|
|
88026
|
+
const methodName = methodNameExpression.concatTokens();
|
|
88019
88027
|
if (className === "cl_abap_regex") {
|
|
88020
88028
|
if (methodName === "create_posix") {
|
|
88021
88029
|
const issue = issue_1.Issue.atStatement(file, staNode, "create_posix obsolete, use create_pcre", this.getMetadata().key, this.conf.severity);
|
|
@@ -92177,12 +92185,12 @@ class ShortCase extends _abap_rule_1.ABAPRule {
|
|
|
92177
92185
|
return [];
|
|
92178
92186
|
}
|
|
92179
92187
|
for (const c of struc.findAllStructures(Structures.Case)) {
|
|
92180
|
-
const
|
|
92181
|
-
if (
|
|
92188
|
+
const caseStatement = c.findDirectStatement(Statements.Case);
|
|
92189
|
+
if (caseStatement && this.conf.allow && this.conf.allow.find((e) => { return e === caseStatement.getTokens()[1].getStr(); })) {
|
|
92182
92190
|
continue;
|
|
92183
92191
|
}
|
|
92184
92192
|
if (c.findDirectStructures(Structures.When).length <= this.conf.length) {
|
|
92185
|
-
if (c.
|
|
92193
|
+
if (c.findFirstExpression(Expressions.Or)) {
|
|
92186
92194
|
continue;
|
|
92187
92195
|
}
|
|
92188
92196
|
const issue = issue_1.Issue.atToken(file, c.getFirstToken(), this.getMessage(), this.getMetadata().key, this.conf.severity);
|
|
@@ -94006,9 +94014,9 @@ class TryWithoutCatch extends _abap_rule_1.ABAPRule {
|
|
|
94006
94014
|
}
|
|
94007
94015
|
const tries = stru.findAllStructures(structures_1.Try);
|
|
94008
94016
|
for (const t of tries) {
|
|
94009
|
-
const clean = t.
|
|
94010
|
-
const c = t.
|
|
94011
|
-
if (c
|
|
94017
|
+
const clean = t.findDirectStructure(structures_1.Cleanup);
|
|
94018
|
+
const c = t.findDirectStructure(structures_1.Catch);
|
|
94019
|
+
if (c === undefined && clean === undefined) {
|
|
94012
94020
|
const issue = issue_1.Issue.atToken(file, t.getFirstToken(), this.getMessage(), this.getMetadata().key, this.conf.severity);
|
|
94013
94021
|
issues.push(issue);
|
|
94014
94022
|
}
|
|
@@ -94917,6 +94925,7 @@ const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "..
|
|
|
94917
94925
|
const _statement_1 = __webpack_require__(/*! ../abap/2_statements/statements/_statement */ "../core/build/src/abap/2_statements/statements/_statement.js");
|
|
94918
94926
|
const _irule_1 = __webpack_require__(/*! ./_irule */ "../core/build/src/rules/_irule.js");
|
|
94919
94927
|
const edit_helper_1 = __webpack_require__(/*! ../edit_helper */ "../core/build/src/edit_helper.js");
|
|
94928
|
+
const tokens_1 = __webpack_require__(/*! ../abap/1_lexer/tokens */ "../core/build/src/abap/1_lexer/tokens/index.js");
|
|
94920
94929
|
class UnnecessaryPragmaConf extends _basic_rule_config_1.BasicRuleConfig {
|
|
94921
94930
|
constructor() {
|
|
94922
94931
|
super(...arguments);
|
|
@@ -94985,6 +94994,17 @@ DATA: BEGIN OF blah ##NEEDED,
|
|
|
94985
94994
|
for (let i = 0; i < statements.length; i++) {
|
|
94986
94995
|
const statement = statements[i];
|
|
94987
94996
|
const nextStatement = statements[i + 1];
|
|
94997
|
+
if (statement.get() instanceof _statement_1.Empty
|
|
94998
|
+
&& statement.getChildren().length === 1) {
|
|
94999
|
+
const tokens = statement.getTokens();
|
|
95000
|
+
if (tokens.length === 1
|
|
95001
|
+
&& tokens[0] instanceof tokens_1.Pragma) {
|
|
95002
|
+
const message = "Pragma without a statement can be removed";
|
|
95003
|
+
const fix = edit_helper_1.EditHelper.deleteToken(file, tokens[0]);
|
|
95004
|
+
issues.push(issue_1.Issue.atToken(file, tokens[0], message, this.getMetadata().key, this.conf.severity, fix));
|
|
95005
|
+
continue;
|
|
95006
|
+
}
|
|
95007
|
+
}
|
|
94988
95008
|
if (statement.get() instanceof Statements.EndTry) {
|
|
94989
95009
|
noHandler = false;
|
|
94990
95010
|
}
|
|
@@ -97698,9 +97718,11 @@ const include_graph_1 = __webpack_require__(/*! ./utils/include_graph */ "../cor
|
|
|
97698
97718
|
class SkipLogic {
|
|
97699
97719
|
constructor(reg) {
|
|
97700
97720
|
this.reg = reg;
|
|
97721
|
+
this.includeGraph = undefined;
|
|
97701
97722
|
this.tobj = undefined;
|
|
97702
97723
|
}
|
|
97703
97724
|
skip(obj) {
|
|
97725
|
+
var _a;
|
|
97704
97726
|
const global = this.reg.getConfig().getGlobal();
|
|
97705
97727
|
if (global.skipGeneratedGatewayClasses === true
|
|
97706
97728
|
&& obj instanceof objects_1.Class
|
|
@@ -97710,9 +97732,9 @@ class SkipLogic {
|
|
|
97710
97732
|
else if (global.skipIncludesWithoutMain === true
|
|
97711
97733
|
&& obj instanceof objects_1.Program
|
|
97712
97734
|
&& obj.isInclude() === true) {
|
|
97713
|
-
|
|
97735
|
+
(_a = this.includeGraph) !== null && _a !== void 0 ? _a : (this.includeGraph = new include_graph_1.IncludeGraph(this.reg));
|
|
97714
97736
|
const file = obj.getMainABAPFile();
|
|
97715
|
-
if (file &&
|
|
97737
|
+
if (file && this.includeGraph.listMainForInclude(file.getFilename()).length === 0) {
|
|
97716
97738
|
return true;
|
|
97717
97739
|
}
|
|
97718
97740
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/cli",
|
|
3
|
-
"version": "2.119.
|
|
3
|
+
"version": "2.119.63",
|
|
4
4
|
"description": "abaplint - Command Line Interface",
|
|
5
5
|
"funding": "https://github.com/sponsors/larshp",
|
|
6
6
|
"bin": {
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
},
|
|
40
40
|
"homepage": "https://abaplint.org",
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@abaplint/core": "^2.119.
|
|
42
|
+
"@abaplint/core": "^2.119.63",
|
|
43
43
|
"@types/chai": "^4.3.20",
|
|
44
44
|
"@types/minimist": "^1.2.5",
|
|
45
45
|
"@types/mocha": "^10.0.10",
|