@abaplint/cli 2.101.21 → 2.101.23

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.
Files changed (2) hide show
  1. package/build/cli.js +47 -59
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -48453,7 +48453,7 @@ class Registry {
48453
48453
  }
48454
48454
  static abaplintVersion() {
48455
48455
  // magic, see build script "version.sh"
48456
- return "2.101.21";
48456
+ return "2.101.23";
48457
48457
  }
48458
48458
  getDDICReferences() {
48459
48459
  return this.ddicReferences;
@@ -49721,6 +49721,10 @@ class AvoidUseConf extends _basic_rule_config_1.BasicRuleConfig {
49721
49721
  this.testSeams = true;
49722
49722
  /** Detects DESCRIBE TABLE LINES, use lines() instead */
49723
49723
  this.describeLines = true;
49724
+ /** Detects EXPORT TO MEMORY */
49725
+ this.exportToMemory = true;
49726
+ /** Detects EXPORT TO DATABASE */
49727
+ this.exportToDatabase = true;
49724
49728
  }
49725
49729
  }
49726
49730
  exports.AvoidUseConf = AvoidUseConf;
@@ -49780,6 +49784,12 @@ TEST-SEAMS: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md
49780
49784
  else if (this.conf.statics && statement instanceof Statements.StaticEnd) {
49781
49785
  isStaticsBlock = false;
49782
49786
  }
49787
+ else if (this.conf.exportToMemory && statement instanceof Statements.Export && statementNode.concatTokens().includes("TO MEMORY ")) {
49788
+ message = "EXPORT TO MEMORY";
49789
+ }
49790
+ else if (this.conf.exportToDatabase && statement instanceof Statements.Export && statementNode.concatTokens().includes("TO DATABASE ")) {
49791
+ message = "EXPORT TO DATABASE";
49792
+ }
49783
49793
  else if (this.conf.testSeams && statement instanceof Statements.TestSeam) {
49784
49794
  message = "TEST-SEAM";
49785
49795
  }
@@ -61890,7 +61900,6 @@ exports.ObjectNaming = exports.ObjectNamingConf = void 0;
61890
61900
  const issue_1 = __webpack_require__(/*! ../issue */ "./node_modules/@abaplint/core/build/src/issue.js");
61891
61901
  const _naming_rule_config_1 = __webpack_require__(/*! ./_naming_rule_config */ "./node_modules/@abaplint/core/build/src/rules/_naming_rule_config.js");
61892
61902
  const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
61893
- const Objects = __webpack_require__(/*! ../objects */ "./node_modules/@abaplint/core/build/src/objects/index.js");
61894
61903
  const name_validator_1 = __webpack_require__(/*! ../utils/name_validator */ "./node_modules/@abaplint/core/build/src/utils/name_validator.js");
61895
61904
  class ObjectNamingConf extends _naming_rule_config_1.NamingRuleConfig {
61896
61905
  constructor() {
@@ -61931,6 +61940,34 @@ class ObjectNamingConf extends _naming_rule_config_1.NamingRuleConfig {
61931
61940
  this.ssst = "^Z";
61932
61941
  /** The regex pattern for search helps */
61933
61942
  this.shlp = "^Z";
61943
+ /** The regex pattern for BADI Implementation */
61944
+ this.sxci = "^Z";
61945
+ /** The regex pattern for Enhancement Spot */
61946
+ this.enhs = "^Z";
61947
+ /** The regex pattern for Enhancement Implementation */
61948
+ this.enho = "^Z";
61949
+ /** The regex pattern for Customer enhancement projects */
61950
+ this.cmod = "^Z";
61951
+ /** The regex pattern for SAPscript form */
61952
+ this.form = "^Z";
61953
+ /** The regex pattern for Adobe Form Definition */
61954
+ this.sfpf = "^Z";
61955
+ /** The regex pattern for Adobe Interface Definition */
61956
+ this.sfpi = "^Z";
61957
+ /** The regex pattern for ABAP Query: Query */
61958
+ this.aqqu = "^Z";
61959
+ /** The regex pattern for ABAP Query: Functional area */
61960
+ this.aqsg = "^Z";
61961
+ /** The regex pattern for ABAP Query: User group */
61962
+ this.aqbg = "^Z";
61963
+ /** The regex pattern for Authorization Object */
61964
+ this.suso = "^Z";
61965
+ /** The regex pattern for Authorization Group */
61966
+ this.sucu = "^Z";
61967
+ /** The regex pattern for Web Dynpro Application */
61968
+ this.wdya = "^Z";
61969
+ /** The regex pattern for Web Dynpro Component */
61970
+ this.wdyn = "^Z";
61934
61971
  }
61935
61972
  }
61936
61973
  exports.ObjectNamingConf = ObjectNamingConf;
@@ -61952,6 +61989,9 @@ class ObjectNaming {
61952
61989
  "Object name must not match pattern " + expected + ": " + actual;
61953
61990
  }
61954
61991
  getConfig() {
61992
+ if (typeof this.conf === "boolean" && this.conf === true) {
61993
+ return new ObjectNamingConf();
61994
+ }
61955
61995
  return this.conf;
61956
61996
  }
61957
61997
  setConfig(conf) {
@@ -61962,66 +62002,14 @@ class ObjectNaming {
61962
62002
  }
61963
62003
  run(obj) {
61964
62004
  let message = undefined;
61965
- let pattern = "";
61966
62005
  if (this.conf.patternKind === undefined) {
61967
62006
  this.conf.patternKind = "required";
61968
62007
  }
61969
- const defaults = new ObjectNamingConf();
61970
- if (obj instanceof Objects.Class) {
61971
- pattern = this.getConfig().clas || defaults.clas;
61972
- }
61973
- else if (obj instanceof Objects.Interface) {
61974
- pattern = this.getConfig().intf || defaults.intf;
61975
- }
61976
- else if (obj instanceof Objects.Program) {
61977
- pattern = this.getConfig().prog || defaults.prog;
61978
- }
61979
- else if (obj instanceof Objects.FunctionGroup) {
61980
- pattern = this.getConfig().fugr || defaults.fugr;
61981
- }
61982
- else if (obj instanceof Objects.Table) {
61983
- pattern = this.getConfig().tabl || defaults.tabl;
61984
- }
61985
- else if (obj instanceof Objects.TableType) {
61986
- pattern = this.getConfig().ttyp || defaults.ttyp;
61987
- }
61988
- else if (obj instanceof Objects.DataElement) {
61989
- pattern = this.getConfig().dtel || defaults.dtel;
61990
- }
61991
- else if (obj instanceof Objects.Domain) {
61992
- pattern = this.getConfig().doma || defaults.doma;
61993
- }
61994
- else if (obj instanceof Objects.Transaction) {
61995
- pattern = this.getConfig().tran || defaults.tran;
61996
- }
61997
- else if (obj instanceof Objects.LockObject) {
61998
- pattern = this.getConfig().enqu || defaults.enqu;
61999
- }
62000
- else if (obj instanceof Objects.AuthorizationObject) {
62001
- pattern = this.getConfig().auth || defaults.auth;
62002
- }
62003
- else if (obj instanceof Objects.PackageInterface) {
62004
- pattern = this.getConfig().pinf || defaults.pinf;
62005
- }
62006
- else if (obj instanceof Objects.MessageClass) {
62007
- pattern = this.getConfig().msag || defaults.msag;
62008
- }
62009
- else if (obj instanceof Objects.Idoc) {
62010
- pattern = this.getConfig().idoc || defaults.idoc;
62011
- }
62012
- else if (obj instanceof Objects.Transformation) {
62013
- pattern = this.getConfig().xslt || defaults.xslt;
62014
- }
62015
- else if (obj instanceof Objects.SmartForm) {
62016
- pattern = this.getConfig().ssfo || defaults.ssfo;
62017
- }
62018
- else if (obj instanceof Objects.SmartStyle) {
62019
- pattern = this.getConfig().ssst || defaults.ssst;
62020
- }
62021
- else if (obj instanceof Objects.SearchHelp) {
62022
- pattern = this.getConfig().shlp || defaults.shlp;
62023
- }
62024
- if (pattern === "") {
62008
+ const abapType = obj.getType().toLowerCase();
62009
+ const config = this.getConfig();
62010
+ // @ts-ignore
62011
+ const pattern = config[abapType];
62012
+ if (pattern === undefined) {
62025
62013
  return [];
62026
62014
  }
62027
62015
  const regex = new RegExp(pattern, "i");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.101.21",
3
+ "version": "2.101.23",
4
4
  "description": "abaplint - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "homepage": "https://abaplint.org",
40
40
  "devDependencies": {
41
- "@abaplint/core": "^2.101.21",
41
+ "@abaplint/core": "^2.101.23",
42
42
  "@types/chai": "^4.3.5",
43
43
  "@types/glob": "^7.2.0",
44
44
  "@types/minimist": "^1.2.2",