@abaplint/cli 2.93.2 → 2.93.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.
package/build/cli.js CHANGED
@@ -60,7 +60,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
60
60
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
61
61
 
62
62
  "use strict";
63
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ApplyFixes = void 0;\r\nconst core_1 = __webpack_require__(/*! @abaplint/core */ \"./node_modules/@abaplint/core/build/src/index.js\");\r\nclass ApplyFixes {\r\n constructor() {\r\n this.changedFiles = new Set();\r\n }\r\n applyFixes(inputIssues, reg, fs, bar) {\r\n let changed = [];\r\n let iteration = 1;\r\n let issues = inputIssues;\r\n this.changedFiles.clear();\r\n const MAX_ITERATIONS = 50000;\r\n bar === null || bar === void 0 ? void 0 : bar.set(MAX_ITERATIONS, \"Apply Fixes\");\r\n while (iteration <= MAX_ITERATIONS) {\r\n bar === null || bar === void 0 ? void 0 : bar.tick(\"Apply Fixes, iteration \" + iteration + \", \" + issues.length + \" candidates\");\r\n changed = this.applyList(issues, reg);\r\n if (changed.length === 0) {\r\n break;\r\n }\r\n iteration++;\r\n issues = reg.parse().findIssues();\r\n }\r\n this.writeChangesToFS(fs, reg);\r\n // always end the progress indicator at 100%\r\n while (iteration <= MAX_ITERATIONS) {\r\n bar === null || bar === void 0 ? void 0 : bar.tick(\"Fixes Applied\");\r\n iteration++;\r\n }\r\n return issues;\r\n }\r\n writeChangesToFS(fs, reg) {\r\n for (const filename of this.changedFiles.values()) {\r\n const file = reg.getFileByName(filename);\r\n if (file === undefined) {\r\n continue;\r\n }\r\n fs.writeFileSync(file.getFilename(), file.getRaw());\r\n }\r\n }\r\n possibleOverlap(edit, list) {\r\n // only checks if the edits have changes in the same rows\r\n for (const e of list) {\r\n for (const file1 of Object.keys(e)) {\r\n for (const file2 of Object.keys(edit)) {\r\n if (file1 === file2) {\r\n for (const list1 of e[file1]) {\r\n for (const list2 of edit[file2]) {\r\n if (list2.range.start.getRow() <= list1.range.start.getRow()\r\n && list2.range.end.getRow() >= list1.range.start.getRow()) {\r\n return true;\r\n }\r\n if (list2.range.start.getRow() <= list1.range.start.getRow()\r\n && list2.range.end.getRow() >= list1.range.end.getRow()) {\r\n return true;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n return false;\r\n }\r\n applyList(issues, reg) {\r\n const edits = [];\r\n for (const i of issues) {\r\n const edit = i.getFix();\r\n if (edit === undefined) {\r\n continue;\r\n }\r\n else if (this.possibleOverlap(edit, edits) === true) {\r\n continue;\r\n }\r\n edits.push(edit);\r\n }\r\n const changed = (0, core_1.applyEditList)(reg, edits);\r\n for (const filename of changed) {\r\n this.changedFiles.add(filename);\r\n }\r\n return changed;\r\n }\r\n}\r\nexports.ApplyFixes = ApplyFixes;\r\n//# sourceMappingURL=fixes.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./build/src/fixes.js?");
63
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ApplyFixes = void 0;\r\nconst core_1 = __webpack_require__(/*! @abaplint/core */ \"./node_modules/@abaplint/core/build/src/index.js\");\r\nclass ApplyFixes {\r\n constructor() {\r\n this.changedFiles = new Set();\r\n }\r\n // Strategy:\r\n // Execute one rule at a time and apply fixes for that rule\r\n // Some rules are quite expensive to initialize(like downport),\r\n // so running all rules every time is expensive.\r\n async applyFixes(reg, fs, bar) {\r\n let iteration = 1;\r\n this.changedFiles.clear();\r\n const MAX_ITERATIONS = 50000;\r\n bar === null || bar === void 0 ? void 0 : bar.set(MAX_ITERATIONS, \"Apply Fixes\");\r\n const objects = new core_1.RulesRunner(reg).objectsToCheck(reg.getObjects());\r\n const rules = reg.getConfig().getEnabledRules();\r\n while (iteration <= MAX_ITERATIONS) {\r\n bar === null || bar === void 0 ? void 0 : bar.tick(\"Apply Fixes, iteration \" + iteration);\r\n let changed = 0;\r\n for (const rule of rules) {\r\n rule.initialize(reg);\r\n const issues = [];\r\n for (const obj of objects) {\r\n issues.push(...rule.run(obj));\r\n }\r\n const appliedCount = this.applyList(issues, reg).length;\r\n if (appliedCount > 0) {\r\n changed += appliedCount;\r\n reg.parse();\r\n }\r\n }\r\n if (changed === 0) {\r\n break;\r\n }\r\n iteration++;\r\n }\r\n this.writeChangesToFS(fs, reg);\r\n // always end the progress indicator at 100%\r\n while (iteration <= MAX_ITERATIONS) {\r\n bar === null || bar === void 0 ? void 0 : bar.tick(\"Fixes Applied\");\r\n iteration++;\r\n }\r\n }\r\n ///////////////////////////////////////////////////\r\n writeChangesToFS(fs, reg) {\r\n for (const filename of this.changedFiles.values()) {\r\n const file = reg.getFileByName(filename);\r\n if (file === undefined) {\r\n continue;\r\n }\r\n fs.writeFileSync(file.getFilename(), file.getRaw());\r\n }\r\n }\r\n possibleOverlap(edit, list) {\r\n // only checks if the edits have changes in the same rows\r\n for (const e of list) {\r\n for (const file1 of Object.keys(e)) {\r\n for (const file2 of Object.keys(edit)) {\r\n if (file1 === file2) {\r\n for (const list1 of e[file1]) {\r\n for (const list2 of edit[file2]) {\r\n if (list2.range.start.getRow() <= list1.range.start.getRow()\r\n && list2.range.end.getRow() >= list1.range.start.getRow()) {\r\n return true;\r\n }\r\n if (list2.range.start.getRow() <= list1.range.start.getRow()\r\n && list2.range.end.getRow() >= list1.range.end.getRow()) {\r\n return true;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n return false;\r\n }\r\n applyList(issues, reg) {\r\n const edits = [];\r\n for (const i of issues) {\r\n const edit = i.getFix();\r\n if (edit === undefined) {\r\n continue;\r\n }\r\n else if (this.possibleOverlap(edit, edits) === true) {\r\n continue;\r\n }\r\n edits.push(edit);\r\n }\r\n const changed = (0, core_1.applyEditList)(reg, edits);\r\n for (const filename of changed) {\r\n this.changedFiles.add(filename);\r\n }\r\n return changed;\r\n }\r\n}\r\nexports.ApplyFixes = ApplyFixes;\r\n//# sourceMappingURL=fixes.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./build/src/fixes.js?");
64
64
 
65
65
  /***/ }),
66
66
 
@@ -148,7 +148,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
148
148
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
149
149
 
150
150
  "use strict";
151
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.run = exports.GENERIC_ERROR = void 0;\r\nconst fs = __webpack_require__(/*! fs */ \"fs\");\r\nconst os = __webpack_require__(/*! os */ \"os\");\r\nconst path = __webpack_require__(/*! path */ \"path\");\r\nconst ProgressBar = __webpack_require__(/*! progress */ \"./node_modules/progress/index.js\");\r\nconst childProcess = __webpack_require__(/*! child_process */ \"child_process\");\r\nconst JSON5 = __webpack_require__(/*! json5 */ \"./node_modules/json5/dist/index.mjs\");\r\nconst core_1 = __webpack_require__(/*! @abaplint/core */ \"./node_modules/@abaplint/core/build/src/index.js\");\r\nconst _format_1 = __webpack_require__(/*! ./formatters/_format */ \"./build/src/formatters/_format.js\");\r\nconst file_operations_1 = __webpack_require__(/*! ./file_operations */ \"./build/src/file_operations.js\");\r\nconst apack_dependency_provider_1 = __webpack_require__(/*! ./apack_dependency_provider */ \"./build/src/apack_dependency_provider.js\");\r\nconst fixes_1 = __webpack_require__(/*! ./fixes */ \"./build/src/fixes.js\");\r\nconst rename_1 = __webpack_require__(/*! ./rename */ \"./build/src/rename.js\");\r\nexports.GENERIC_ERROR = \"generic_error\";\r\nclass Progress {\r\n set(total, _text) {\r\n this.bar = new ProgressBar(\":percent - :elapseds - :text\", { total, renderThrottle: 100 });\r\n }\r\n async tick(text) {\r\n this.bar.tick({ text });\r\n this.bar.render();\r\n }\r\n tickSync(text) {\r\n this.bar.tick({ text });\r\n this.bar.render();\r\n }\r\n}\r\nfunction loadConfig(filename) {\r\n // possible cases:\r\n // a) nothing specified, using abaplint.json from cwd\r\n // b) nothing specified, no abaplint.json in cwd\r\n // c) specified and found\r\n // d) specified and not found => use default\r\n // e) supplied but a directory => use default\r\n let f = \"\";\r\n if (filename === undefined) {\r\n f = process.cwd() + path.sep + \"abaplint.json\";\r\n if (fs.existsSync(f) === false) {\r\n f = process.cwd() + path.sep + \"abaplint.jsonc\";\r\n }\r\n if (fs.existsSync(f) === false) {\r\n f = process.cwd() + path.sep + \"abaplint.json5\";\r\n }\r\n if (fs.existsSync(f) === false) {\r\n process.stderr.write(\"Using default config\\n\");\r\n return { config: core_1.Config.getDefault(), base: \".\" };\r\n }\r\n }\r\n else {\r\n if (fs.existsSync(filename) === false) {\r\n process.stderr.write(\"ERROR: Specified abaplint configuration file does not exist, using default config\\n\");\r\n return { config: core_1.Config.getDefault(), base: \".\" };\r\n }\r\n else if (fs.statSync(filename).isDirectory() === true) {\r\n process.stderr.write(\"Supply filename, not directory, using default config\\n\");\r\n return { config: core_1.Config.getDefault(), base: \".\" };\r\n }\r\n f = filename;\r\n }\r\n // evil hack to get JSON5 working\r\n if (JSON5.parse === undefined) {\r\n // @ts-ignore\r\n JSON5.parse = JSON5.default.parse;\r\n }\r\n process.stderr.write(\"Using config: \" + f + \"\\n\");\r\n const json = fs.readFileSync(f, \"utf8\");\r\n const parsed = JSON5.parse(json);\r\n const vers = core_1.Version;\r\n if (Object.keys(core_1.Version).some(v => vers[v] === parsed.syntax.version) === false) {\r\n throw \"Error: Unknown version in abaplint.json\";\r\n }\r\n return {\r\n config: new core_1.Config(json),\r\n base: path.dirname(f) === process.cwd() ? \".\" : path.dirname(f),\r\n };\r\n}\r\nasync function loadDependencies(config, compress, bar, base) {\r\n let files = [];\r\n const deps = config.get().dependencies || [];\r\n const useApack = config.get().global.useApackDependencies;\r\n if (useApack) {\r\n const apackPath = path.join(base, \".apack-manifest.xml\");\r\n if (fs.existsSync(apackPath)) {\r\n const apackManifest = fs.readFileSync(apackPath, \"utf8\");\r\n deps.push(...apack_dependency_provider_1.ApackDependencyProvider.fromManifest(apackManifest));\r\n }\r\n }\r\n if (!deps) {\r\n return [];\r\n }\r\n for (const d of deps) {\r\n if (d.folder) {\r\n const g = base + d.folder + d.files;\r\n const names = file_operations_1.FileOperations.loadFileNames(g, false);\r\n if (names.length > 0) {\r\n process.stderr.write(\"Using dependency from: \" + g + \"\\n\");\r\n files = files.concat(await file_operations_1.FileOperations.loadFiles(compress, names, bar));\r\n continue;\r\n }\r\n }\r\n if (d.url) {\r\n process.stderr.write(\"Clone: \" + d.url + \"\\n\");\r\n const dir = fs.mkdtempSync(path.join(os.tmpdir(), \"abaplint-\"));\r\n childProcess.execSync(\"git clone --quiet --depth 1 \" + d.url + \" .\", { cwd: dir, stdio: \"inherit\" });\r\n const names = file_operations_1.FileOperations.loadFileNames(dir + d.files);\r\n files = files.concat(await file_operations_1.FileOperations.loadFiles(compress, names, bar));\r\n file_operations_1.FileOperations.deleteFolderRecursive(dir);\r\n }\r\n }\r\n return files;\r\n}\r\nfunction displayHelp() {\r\n // follow https://docopt.org conventions,\r\n return \"Usage:\\n\" +\r\n \" abaplint [<abaplint.json> -f <format> -c --outformat <format> --outfile <file> --fix] \\n\" +\r\n \" abaplint -h | --help show this help\\n\" +\r\n \" abaplint -v | --version show version\\n\" +\r\n \" abaplint -d | --default show default configuration\\n\" +\r\n \"\\n\" +\r\n \"Options:\\n\" +\r\n \" -f, --format <format> output format (standard, total, json, summary, junit, codeframe)\\n\" +\r\n \" --outformat <format> output format, use in combination with outfile\\n\" +\r\n \" --outfile <file> output issues to file in format\\n\" +\r\n \" --fix apply quick fixes to files\\n\" +\r\n \" --rename rename object according to rules in abaplint.json\\n\" +\r\n \" -p output performance information\\n\" +\r\n \" -c compress files in memory\\n\";\r\n}\r\nfunction out(issues, length, arg) {\r\n const output = _format_1.Formatter.format(issues, arg.format, length);\r\n if (arg.outFormat && arg.outFile) {\r\n const fileContents = _format_1.Formatter.format(issues, arg.outFormat, length);\r\n fs.writeFileSync(arg.outFile, fileContents, \"utf-8\");\r\n }\r\n return output;\r\n}\r\nasync function run(arg) {\r\n var _a, _b;\r\n // evil hack to get JSON5 working\r\n if (JSON5.parse === undefined) {\r\n // @ts-ignore\r\n JSON5.parse = JSON5.default.parse;\r\n }\r\n if (JSON5.stringify === undefined) {\r\n // @ts-ignore\r\n JSON5.stringify = JSON5.default.stringify;\r\n }\r\n let output = \"\";\r\n let issues = [];\r\n let reg = undefined;\r\n const progress = new Progress();\r\n if (arg.showHelp === true) {\r\n output = output + displayHelp();\r\n }\r\n else if (arg.showVersion === true) {\r\n output = output + core_1.Registry.abaplintVersion() + \"\\n\";\r\n }\r\n else if (arg.outputDefaultConfig === true) {\r\n output = output + JSON.stringify(core_1.Config.getDefault().get(), undefined, 2) + \"\\n\";\r\n }\r\n else {\r\n process.stderr.write(\"abaplint \" + core_1.Registry.abaplintVersion() + \"\\n\");\r\n let loaded = [];\r\n let deps = [];\r\n const { config, base } = loadConfig(arg.configFilename);\r\n try {\r\n if (config.get().global.files === undefined) {\r\n throw \"Error: Update abaplint configuration file to latest format\";\r\n }\r\n const files = file_operations_1.FileOperations.loadFileNames(base + config.get().global.files);\r\n loaded = await file_operations_1.FileOperations.loadFiles(arg.compress, files, progress);\r\n deps = await loadDependencies(config, arg.compress, progress, base);\r\n reg = new core_1.Registry(config);\r\n reg.addDependencies(deps);\r\n reg.addFiles(loaded); // if the object exists in repo, it should take precedence over deps\r\n await reg.parseAsync({ progress, outputPerformance: arg.parsingPerformance });\r\n issues = issues.concat(reg.findIssues({ progress, outputPerformance: arg.parsingPerformance }));\r\n }\r\n catch (error) {\r\n const file = new core_1.MemoryFile(\"generic\", \"dummy\");\r\n const message = error.toString() + \" \" + ((_b = (_a = error.stack) === null || _a === void 0 ? void 0 : _a.split(\"\\n\")[1]) === null || _b === void 0 ? void 0 : _b.trim());\r\n const issue = core_1.Issue.atPosition(file, new core_1.Position(1, 1), message, exports.GENERIC_ERROR);\r\n issues = [issue];\r\n }\r\n let extra = \"\";\r\n if (arg.runFix === true && reg) {\r\n issues = new fixes_1.ApplyFixes().applyFixes(issues, reg, fs, progress);\r\n extra = \"Fixes applied\";\r\n }\r\n else if (arg.runRename === true && reg) {\r\n if (issues.length === 0) {\r\n new rename_1.Rename(reg).run(config, base);\r\n extra = \"Renames applied\";\r\n }\r\n else {\r\n extra = \"Renames NOT applied, issues found\";\r\n }\r\n }\r\n output = out(issues, loaded.length, arg) + extra;\r\n }\r\n return { output, issues, reg };\r\n}\r\nexports.run = run;\r\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./build/src/index.js?");
151
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.run = exports.GENERIC_ERROR = void 0;\r\nconst fs = __webpack_require__(/*! fs */ \"fs\");\r\nconst os = __webpack_require__(/*! os */ \"os\");\r\nconst path = __webpack_require__(/*! path */ \"path\");\r\nconst ProgressBar = __webpack_require__(/*! progress */ \"./node_modules/progress/index.js\");\r\nconst childProcess = __webpack_require__(/*! child_process */ \"child_process\");\r\nconst JSON5 = __webpack_require__(/*! json5 */ \"./node_modules/json5/dist/index.mjs\");\r\nconst core_1 = __webpack_require__(/*! @abaplint/core */ \"./node_modules/@abaplint/core/build/src/index.js\");\r\nconst _format_1 = __webpack_require__(/*! ./formatters/_format */ \"./build/src/formatters/_format.js\");\r\nconst file_operations_1 = __webpack_require__(/*! ./file_operations */ \"./build/src/file_operations.js\");\r\nconst apack_dependency_provider_1 = __webpack_require__(/*! ./apack_dependency_provider */ \"./build/src/apack_dependency_provider.js\");\r\nconst fixes_1 = __webpack_require__(/*! ./fixes */ \"./build/src/fixes.js\");\r\nconst rename_1 = __webpack_require__(/*! ./rename */ \"./build/src/rename.js\");\r\nexports.GENERIC_ERROR = \"generic_error\";\r\nclass Progress {\r\n set(total, _text) {\r\n this.bar = new ProgressBar(\":percent - :elapseds - :text\", { total, renderThrottle: 100 });\r\n }\r\n async tick(text) {\r\n this.bar.tick({ text });\r\n this.bar.render();\r\n }\r\n tickSync(text) {\r\n this.bar.tick({ text });\r\n this.bar.render();\r\n }\r\n}\r\nfunction loadConfig(filename) {\r\n // possible cases:\r\n // a) nothing specified, using abaplint.json from cwd\r\n // b) nothing specified, no abaplint.json in cwd\r\n // c) specified and found\r\n // d) specified and not found => use default\r\n // e) supplied but a directory => use default\r\n let f = \"\";\r\n if (filename === undefined) {\r\n f = process.cwd() + path.sep + \"abaplint.json\";\r\n if (fs.existsSync(f) === false) {\r\n f = process.cwd() + path.sep + \"abaplint.jsonc\";\r\n }\r\n if (fs.existsSync(f) === false) {\r\n f = process.cwd() + path.sep + \"abaplint.json5\";\r\n }\r\n if (fs.existsSync(f) === false) {\r\n process.stderr.write(\"Using default config\\n\");\r\n return { config: core_1.Config.getDefault(), base: \".\" };\r\n }\r\n }\r\n else {\r\n if (fs.existsSync(filename) === false) {\r\n process.stderr.write(\"ERROR: Specified abaplint configuration file does not exist, using default config\\n\");\r\n return { config: core_1.Config.getDefault(), base: \".\" };\r\n }\r\n else if (fs.statSync(filename).isDirectory() === true) {\r\n process.stderr.write(\"Supply filename, not directory, using default config\\n\");\r\n return { config: core_1.Config.getDefault(), base: \".\" };\r\n }\r\n f = filename;\r\n }\r\n // evil hack to get JSON5 working\r\n if (JSON5.parse === undefined) {\r\n // @ts-ignore\r\n JSON5.parse = JSON5.default.parse;\r\n }\r\n process.stderr.write(\"Using config: \" + f + \"\\n\");\r\n const json = fs.readFileSync(f, \"utf8\");\r\n const parsed = JSON5.parse(json);\r\n const vers = core_1.Version;\r\n if (Object.keys(core_1.Version).some(v => vers[v] === parsed.syntax.version) === false) {\r\n throw \"Error: Unknown version in abaplint.json\";\r\n }\r\n return {\r\n config: new core_1.Config(json),\r\n base: path.dirname(f) === process.cwd() ? \".\" : path.dirname(f),\r\n };\r\n}\r\nasync function loadDependencies(config, compress, bar, base) {\r\n let files = [];\r\n const deps = config.get().dependencies || [];\r\n const useApack = config.get().global.useApackDependencies;\r\n if (useApack) {\r\n const apackPath = path.join(base, \".apack-manifest.xml\");\r\n if (fs.existsSync(apackPath)) {\r\n const apackManifest = fs.readFileSync(apackPath, \"utf8\");\r\n deps.push(...apack_dependency_provider_1.ApackDependencyProvider.fromManifest(apackManifest));\r\n }\r\n }\r\n if (!deps) {\r\n return [];\r\n }\r\n for (const d of deps) {\r\n if (d.folder) {\r\n const g = base + d.folder + d.files;\r\n const names = file_operations_1.FileOperations.loadFileNames(g, false);\r\n if (names.length > 0) {\r\n process.stderr.write(\"Using dependency from: \" + g + \"\\n\");\r\n files = files.concat(await file_operations_1.FileOperations.loadFiles(compress, names, bar));\r\n continue;\r\n }\r\n }\r\n if (d.url) {\r\n process.stderr.write(\"Clone: \" + d.url + \"\\n\");\r\n const dir = fs.mkdtempSync(path.join(os.tmpdir(), \"abaplint-\"));\r\n childProcess.execSync(\"git clone --quiet --depth 1 \" + d.url + \" .\", { cwd: dir, stdio: \"inherit\" });\r\n const names = file_operations_1.FileOperations.loadFileNames(dir + d.files);\r\n files = files.concat(await file_operations_1.FileOperations.loadFiles(compress, names, bar));\r\n file_operations_1.FileOperations.deleteFolderRecursive(dir);\r\n }\r\n }\r\n return files;\r\n}\r\nfunction displayHelp() {\r\n // follow https://docopt.org conventions,\r\n return \"Usage:\\n\" +\r\n \" abaplint [<abaplint.json> -f <format> -c --outformat <format> --outfile <file> --fix] \\n\" +\r\n \" abaplint -h | --help show this help\\n\" +\r\n \" abaplint -v | --version show version\\n\" +\r\n \" abaplint -d | --default show default configuration\\n\" +\r\n \"\\n\" +\r\n \"Options:\\n\" +\r\n \" -f, --format <format> output format (standard, total, json, summary, junit, codeframe)\\n\" +\r\n \" --outformat <format> output format, use in combination with outfile\\n\" +\r\n \" --outfile <file> output issues to file in format\\n\" +\r\n \" --fix apply quick fixes to files\\n\" +\r\n \" --rename rename object according to rules in abaplint.json\\n\" +\r\n \" -p output performance information\\n\" +\r\n \" -c compress files in memory\\n\";\r\n}\r\nfunction out(issues, length, arg) {\r\n const output = _format_1.Formatter.format(issues, arg.format, length);\r\n if (arg.outFormat && arg.outFile) {\r\n const fileContents = _format_1.Formatter.format(issues, arg.outFormat, length);\r\n fs.writeFileSync(arg.outFile, fileContents, \"utf-8\");\r\n }\r\n return output;\r\n}\r\nasync function run(arg) {\r\n var _a, _b;\r\n // evil hack to get JSON5 working\r\n if (JSON5.parse === undefined) {\r\n // @ts-ignore\r\n JSON5.parse = JSON5.default.parse;\r\n }\r\n if (JSON5.stringify === undefined) {\r\n // @ts-ignore\r\n JSON5.stringify = JSON5.default.stringify;\r\n }\r\n let output = \"\";\r\n let issues = [];\r\n let reg = undefined;\r\n const progress = new Progress();\r\n if (arg.showHelp === true) {\r\n output = output + displayHelp();\r\n }\r\n else if (arg.showVersion === true) {\r\n output = output + core_1.Registry.abaplintVersion() + \"\\n\";\r\n }\r\n else if (arg.outputDefaultConfig === true) {\r\n output = output + JSON.stringify(core_1.Config.getDefault().get(), undefined, 2) + \"\\n\";\r\n }\r\n else {\r\n process.stderr.write(\"abaplint \" + core_1.Registry.abaplintVersion() + \"\\n\");\r\n let loaded = [];\r\n let deps = [];\r\n const { config, base } = loadConfig(arg.configFilename);\r\n try {\r\n if (config.get().global.files === undefined) {\r\n throw \"Error: Update abaplint configuration file to latest format\";\r\n }\r\n const files = file_operations_1.FileOperations.loadFileNames(base + config.get().global.files);\r\n loaded = await file_operations_1.FileOperations.loadFiles(arg.compress, files, progress);\r\n deps = await loadDependencies(config, arg.compress, progress, base);\r\n reg = new core_1.Registry(config);\r\n reg.addDependencies(deps);\r\n reg.addFiles(loaded); // if the object exists in repo, it should take precedence over deps\r\n await reg.parseAsync({ progress, outputPerformance: arg.parsingPerformance });\r\n issues = issues.concat(reg.findIssues({ progress, outputPerformance: arg.parsingPerformance }));\r\n }\r\n catch (error) {\r\n const file = new core_1.MemoryFile(\"generic\", \"dummy\");\r\n const message = error.toString() + \" \" + ((_b = (_a = error.stack) === null || _a === void 0 ? void 0 : _a.split(\"\\n\")[1]) === null || _b === void 0 ? void 0 : _b.trim());\r\n const issue = core_1.Issue.atPosition(file, new core_1.Position(1, 1), message, exports.GENERIC_ERROR);\r\n issues = [issue];\r\n }\r\n let extra = \"\";\r\n if (arg.runFix === true && reg) {\r\n await new fixes_1.ApplyFixes().applyFixes(reg, fs, progress);\r\n extra = \"Fixes applied\";\r\n }\r\n else if (arg.runRename === true && reg) {\r\n if (issues.length === 0) {\r\n new rename_1.Rename(reg).run(config, base);\r\n extra = \"Renames applied\";\r\n }\r\n else {\r\n extra = \"Renames NOT applied, issues found\";\r\n }\r\n }\r\n output = out(issues, loaded.length, arg) + extra;\r\n }\r\n return { output, issues, reg };\r\n}\r\nexports.run = run;\r\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./build/src/index.js?");
152
152
 
153
153
  /***/ }),
154
154
 
@@ -170,7 +170,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
170
170
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
171
171
 
172
172
  "use strict";
173
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Lexer = void 0;\r\nconst Tokens = __webpack_require__(/*! ./tokens */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js\");\r\nconst position_1 = __webpack_require__(/*! ../../position */ \"./node_modules/@abaplint/core/build/src/position.js\");\r\nvar Mode;\r\n(function (Mode) {\r\n Mode[Mode[\"Normal\"] = 0] = \"Normal\";\r\n Mode[Mode[\"Ping\"] = 1] = \"Ping\";\r\n Mode[Mode[\"Str\"] = 2] = \"Str\";\r\n Mode[Mode[\"Template\"] = 3] = \"Template\";\r\n Mode[Mode[\"Comment\"] = 4] = \"Comment\";\r\n Mode[Mode[\"Pragma\"] = 5] = \"Pragma\";\r\n})(Mode || (Mode = {}));\r\nclass Buffer {\r\n constructor() {\r\n this.buf = \"\";\r\n }\r\n add(s) {\r\n this.buf = this.buf + s;\r\n }\r\n get() {\r\n return this.buf;\r\n }\r\n clear() {\r\n this.buf = \"\";\r\n }\r\n}\r\nclass Stream {\r\n constructor(raw) {\r\n this.offset = -1;\r\n this.raw = raw;\r\n this.row = 0;\r\n this.col = 0;\r\n }\r\n advance() {\r\n if (this.currentChar() === \"\\n\") {\r\n this.col = 1;\r\n this.row = this.row + 1;\r\n }\r\n if (this.offset === this.raw.length) {\r\n return false;\r\n }\r\n this.col = this.col + 1;\r\n this.offset = this.offset + 1;\r\n return true;\r\n }\r\n getCol() {\r\n return this.col;\r\n }\r\n getRow() {\r\n return this.row;\r\n }\r\n prevChar() {\r\n return this.raw.substr(this.offset - 1, 1);\r\n }\r\n prevPrevChar() {\r\n return this.raw.substr(this.offset - 2, 2);\r\n }\r\n currentChar() {\r\n if (this.offset < 0) {\r\n return \"\\n\"; // simulate newline at start of file to handle star(*) comments\r\n }\r\n return this.raw.substr(this.offset, 1);\r\n }\r\n nextChar() {\r\n return this.raw.substr(this.offset + 1, 1);\r\n }\r\n nextNextChar() {\r\n return this.raw.substr(this.offset + 1, 2);\r\n }\r\n getRaw() {\r\n return this.raw;\r\n }\r\n getOffset() {\r\n return this.offset;\r\n }\r\n}\r\nclass Lexer {\r\n static run(file, virtual) {\r\n this.virtual = virtual;\r\n this.tokens = [];\r\n this.m = Mode.Normal;\r\n this.process(file.getRaw());\r\n return { file, tokens: this.tokens };\r\n }\r\n static add() {\r\n const s = this.buffer.get().trim();\r\n if (s.length > 0) {\r\n const col = this.stream.getCol();\r\n const row = this.stream.getRow();\r\n let whiteBefore = false;\r\n const prev = this.stream.getRaw().substr(this.stream.getOffset() - s.length, 1);\r\n if (prev === \" \" || prev === \"\\n\" || prev === \"\\t\" || prev === \":\") {\r\n whiteBefore = true;\r\n }\r\n let whiteAfter = false;\r\n const next = this.stream.nextChar();\r\n if (next === \" \" || next === \"\\n\" || next === \"\\t\" || next === \":\" || next === \",\" || next === \".\" || next === \"\" || next === \"\\\"\") {\r\n whiteAfter = true;\r\n }\r\n let pos = new position_1.Position(row, col - s.length);\r\n if (this.virtual) {\r\n pos = new position_1.VirtualPosition(this.virtual, pos.getRow(), pos.getCol());\r\n }\r\n let tok = undefined;\r\n if (this.m === Mode.Comment) {\r\n tok = new Tokens.Comment(pos, s);\r\n }\r\n else if (this.m === Mode.Ping || this.m === Mode.Str) {\r\n tok = new Tokens.String(pos, s);\r\n }\r\n else if (this.m === Mode.Template) {\r\n const first = s.charAt(0);\r\n const last = s.charAt(s.length - 1);\r\n if (first === \"|\" && last === \"|\") {\r\n tok = new Tokens.StringTemplate(pos, s);\r\n }\r\n else if (first === \"|\" && last === \"{\" && whiteAfter === true) {\r\n tok = new Tokens.StringTemplateBegin(pos, s);\r\n }\r\n else if (first === \"}\" && last === \"|\" && whiteBefore === true) {\r\n tok = new Tokens.StringTemplateEnd(pos, s);\r\n }\r\n else if (first === \"}\" && last === \"{\" && whiteAfter === true && whiteBefore === true) {\r\n tok = new Tokens.StringTemplateMiddle(pos, s);\r\n }\r\n else {\r\n tok = new Tokens.Identifier(pos, s);\r\n }\r\n }\r\n else if (s.substr(0, 2) === \"##\") {\r\n tok = new Tokens.Pragma(pos, s);\r\n }\r\n else if (s.length === 1) {\r\n if (s === \".\" || s === \",\") {\r\n tok = new Tokens.Punctuation(pos, s);\r\n }\r\n else if (s === \"[\") {\r\n if (whiteBefore && whiteAfter) {\r\n tok = new Tokens.WBracketLeftW(pos, s);\r\n }\r\n else if (whiteBefore) {\r\n tok = new Tokens.WBracketLeft(pos, s);\r\n }\r\n else if (whiteAfter) {\r\n tok = new Tokens.BracketLeftW(pos, s);\r\n }\r\n else {\r\n tok = new Tokens.BracketLeft(pos, s);\r\n }\r\n }\r\n else if (s === \"(\") {\r\n if (whiteBefore && whiteAfter) {\r\n tok = new Tokens.WParenLeftW(pos, s);\r\n }\r\n else if (whiteBefore) {\r\n tok = new Tokens.WParenLeft(pos, s);\r\n }\r\n else if (whiteAfter) {\r\n tok = new Tokens.ParenLeftW(pos, s);\r\n }\r\n else {\r\n tok = new Tokens.ParenLeft(pos, s);\r\n }\r\n }\r\n else if (s === \"]\") {\r\n if (whiteBefore && whiteAfter) {\r\n tok = new Tokens.WBracketRightW(pos, s);\r\n }\r\n else if (whiteBefore) {\r\n tok = new Tokens.WBracketRight(pos, s);\r\n }\r\n else if (whiteAfter) {\r\n tok = new Tokens.BracketRightW(pos, s);\r\n }\r\n else {\r\n tok = new Tokens.BracketRight(pos, s);\r\n }\r\n }\r\n else if (s === \")\") {\r\n if (whiteBefore && whiteAfter) {\r\n tok = new Tokens.WParenRightW(pos, s);\r\n }\r\n else if (whiteBefore) {\r\n tok = new Tokens.WParenRight(pos, s);\r\n }\r\n else if (whiteAfter) {\r\n tok = new Tokens.ParenRightW(pos, s);\r\n }\r\n else {\r\n tok = new Tokens.ParenRight(pos, s);\r\n }\r\n }\r\n else if (s === \"-\") {\r\n if (whiteBefore && whiteAfter) {\r\n tok = new Tokens.WDashW(pos, s);\r\n }\r\n else if (whiteBefore) {\r\n tok = new Tokens.WDash(pos, s);\r\n }\r\n else if (whiteAfter) {\r\n tok = new Tokens.DashW(pos, s);\r\n }\r\n else {\r\n tok = new Tokens.Dash(pos, s);\r\n }\r\n }\r\n else if (s === \"+\") {\r\n if (whiteBefore && whiteAfter) {\r\n tok = new Tokens.WPlusW(pos, s);\r\n }\r\n else if (whiteBefore) {\r\n tok = new Tokens.WPlus(pos, s);\r\n }\r\n else if (whiteAfter) {\r\n tok = new Tokens.PlusW(pos, s);\r\n }\r\n else {\r\n tok = new Tokens.Plus(pos, s);\r\n }\r\n }\r\n else if (s === \"@\") {\r\n if (whiteBefore && whiteAfter) {\r\n tok = new Tokens.WAtW(pos, s);\r\n }\r\n else if (whiteBefore) {\r\n tok = new Tokens.WAt(pos, s);\r\n }\r\n else if (whiteAfter) {\r\n tok = new Tokens.AtW(pos, s);\r\n }\r\n else {\r\n tok = new Tokens.At(pos, s);\r\n }\r\n }\r\n }\r\n else if (s.length === 2) {\r\n if (s === \"->\") {\r\n if (whiteBefore && whiteAfter) {\r\n tok = new Tokens.WInstanceArrowW(pos, s);\r\n }\r\n else if (whiteBefore) {\r\n tok = new Tokens.WInstanceArrow(pos, s);\r\n }\r\n else if (whiteAfter) {\r\n tok = new Tokens.InstanceArrowW(pos, s);\r\n }\r\n else {\r\n tok = new Tokens.InstanceArrow(pos, s);\r\n }\r\n }\r\n else if (s === \"=>\") {\r\n if (whiteBefore && whiteAfter) {\r\n tok = new Tokens.WStaticArrowW(pos, s);\r\n }\r\n else if (whiteBefore) {\r\n tok = new Tokens.WStaticArrow(pos, s);\r\n }\r\n else if (whiteAfter) {\r\n tok = new Tokens.StaticArrowW(pos, s);\r\n }\r\n else {\r\n tok = new Tokens.StaticArrow(pos, s);\r\n }\r\n }\r\n }\r\n if (tok === undefined) {\r\n tok = new Tokens.Identifier(pos, s);\r\n }\r\n this.tokens.push(tok);\r\n }\r\n this.buffer.clear();\r\n }\r\n static process(raw) {\r\n this.stream = new Stream(raw.replace(/\\r/g, \"\"));\r\n this.buffer = new Buffer();\r\n for (;;) {\r\n const current = this.stream.currentChar();\r\n this.buffer.add(current);\r\n const buf = this.buffer.get();\r\n const ahead = this.stream.nextChar();\r\n const aahead = this.stream.nextNextChar();\r\n const prev = this.stream.prevChar();\r\n if (ahead === \"'\" && this.m === Mode.Normal) {\r\n // start string\r\n this.add();\r\n this.m = Mode.Str;\r\n }\r\n else if ((ahead === \"|\" || ahead === \"}\")\r\n && this.m === Mode.Normal) {\r\n // start template\r\n this.add();\r\n this.m = Mode.Template;\r\n }\r\n else if (ahead === \"`\" && this.m === Mode.Normal) {\r\n // start ping\r\n this.add();\r\n this.m = Mode.Ping;\r\n }\r\n else if (aahead === \"##\" && this.m === Mode.Normal) {\r\n // start pragma\r\n this.add();\r\n this.m = Mode.Pragma;\r\n }\r\n else if ((ahead === \"\\\"\" || (ahead === \"*\" && current === \"\\n\"))\r\n && this.m === Mode.Normal) {\r\n // start comment\r\n this.add();\r\n this.m = Mode.Comment;\r\n }\r\n else if (this.m === Mode.Pragma && (ahead === \",\" || ahead === \":\" || ahead === \".\" || ahead === \" \" || ahead === \"\\n\")) {\r\n // end of pragma\r\n this.add();\r\n this.m = Mode.Normal;\r\n }\r\n else if (this.m === Mode.Ping\r\n && buf.length > 1\r\n && current === \"`\"\r\n && aahead !== \"``\"\r\n && (buf.match(/`/g) || []).length % 2 === 0\r\n && ahead !== \"`\") {\r\n // end of ping\r\n this.add();\r\n if (ahead === `\"`) {\r\n this.m = Mode.Comment;\r\n }\r\n else {\r\n this.m = Mode.Normal;\r\n }\r\n }\r\n else if (this.m === Mode.Template\r\n && buf.length > 1\r\n && (current === \"|\" || current === \"{\")\r\n && (prev !== \"\\\\\" || this.stream.prevPrevChar() === \"\\\\\\\\\")) {\r\n // end of template\r\n this.add();\r\n this.m = Mode.Normal;\r\n }\r\n else if (this.m === Mode.Str\r\n && current === \"'\"\r\n && buf.length > 1\r\n && aahead !== \"''\"\r\n && (buf.match(/'/g) || []).length % 2 === 0\r\n && ahead !== \"'\") {\r\n // end of string\r\n this.add();\r\n if (ahead === \"\\\"\") {\r\n this.m = Mode.Comment;\r\n }\r\n else {\r\n this.m = Mode.Normal;\r\n }\r\n }\r\n else if (this.m === Mode.Normal\r\n && (ahead === \" \"\r\n || ahead === \":\"\r\n || ahead === \".\"\r\n || ahead === \",\"\r\n || ahead === \"-\"\r\n || ahead === \"+\"\r\n || ahead === \"(\"\r\n || ahead === \")\"\r\n || ahead === \"[\"\r\n || ahead === \"]\"\r\n || (ahead === \"@\" && buf.trim().length === 0)\r\n || aahead === \"->\"\r\n || aahead === \"=>\"\r\n || ahead === \"\\t\"\r\n || ahead === \"\\n\")) {\r\n this.add();\r\n }\r\n else if (ahead === \"\\n\" && this.m !== Mode.Template) {\r\n this.add();\r\n this.m = Mode.Normal;\r\n }\r\n else if (this.m === Mode.Template && current === \"\\n\") {\r\n this.add();\r\n }\r\n else if (current === \">\"\r\n && (prev === \"-\" || prev === \"=\")\r\n && ahead !== \" \"\r\n && this.m === Mode.Normal) {\r\n // arrows\r\n this.add();\r\n }\r\n else if (this.m === Mode.Normal\r\n && (buf === \".\"\r\n || buf === \",\"\r\n || buf === \":\"\r\n || buf === \"(\"\r\n || buf === \")\"\r\n || buf === \"[\"\r\n || buf === \"]\"\r\n || buf === \"+\"\r\n || buf === \"@\"\r\n || (buf === \"-\" && ahead !== \">\"))) {\r\n this.add();\r\n }\r\n if (!this.stream.advance()) {\r\n break;\r\n }\r\n }\r\n this.add();\r\n }\r\n}\r\nexports.Lexer = Lexer;\r\n//# sourceMappingURL=lexer.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/1_lexer/lexer.js?");
173
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Lexer = void 0;\r\nconst Tokens = __webpack_require__(/*! ./tokens */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js\");\r\nconst position_1 = __webpack_require__(/*! ../../position */ \"./node_modules/@abaplint/core/build/src/position.js\");\r\nvar Mode;\r\n(function (Mode) {\r\n Mode[Mode[\"Normal\"] = 0] = \"Normal\";\r\n Mode[Mode[\"Ping\"] = 1] = \"Ping\";\r\n Mode[Mode[\"Str\"] = 2] = \"Str\";\r\n Mode[Mode[\"Template\"] = 3] = \"Template\";\r\n Mode[Mode[\"Comment\"] = 4] = \"Comment\";\r\n Mode[Mode[\"Pragma\"] = 5] = \"Pragma\";\r\n})(Mode || (Mode = {}));\r\nclass Buffer {\r\n constructor() {\r\n this.buf = \"\";\r\n }\r\n add(s) {\r\n this.buf = this.buf + s;\r\n }\r\n get() {\r\n return this.buf;\r\n }\r\n clear() {\r\n this.buf = \"\";\r\n }\r\n}\r\nclass Stream {\r\n constructor(raw) {\r\n this.offset = -1;\r\n this.raw = raw;\r\n this.row = 0;\r\n this.col = 0;\r\n }\r\n advance() {\r\n if (this.currentChar() === \"\\n\") {\r\n this.col = 1;\r\n this.row = this.row + 1;\r\n }\r\n if (this.offset === this.raw.length) {\r\n return false;\r\n }\r\n this.col = this.col + 1;\r\n this.offset = this.offset + 1;\r\n return true;\r\n }\r\n getCol() {\r\n return this.col;\r\n }\r\n getRow() {\r\n return this.row;\r\n }\r\n prevChar() {\r\n return this.raw.substr(this.offset - 1, 1);\r\n }\r\n prevPrevChar() {\r\n return this.raw.substr(this.offset - 2, 2);\r\n }\r\n currentChar() {\r\n if (this.offset < 0) {\r\n return \"\\n\"; // simulate newline at start of file to handle star(*) comments\r\n }\r\n return this.raw.substr(this.offset, 1);\r\n }\r\n nextChar() {\r\n return this.raw.substr(this.offset + 1, 1);\r\n }\r\n nextNextChar() {\r\n return this.raw.substr(this.offset + 1, 2);\r\n }\r\n getRaw() {\r\n return this.raw;\r\n }\r\n getOffset() {\r\n return this.offset;\r\n }\r\n}\r\nclass Lexer {\r\n static run(file, virtual) {\r\n this.virtual = virtual;\r\n this.tokens = [];\r\n this.m = Mode.Normal;\r\n this.process(file.getRaw());\r\n return { file, tokens: this.tokens };\r\n }\r\n static add() {\r\n const s = this.buffer.get().trim();\r\n if (s.length > 0) {\r\n const col = this.stream.getCol();\r\n const row = this.stream.getRow();\r\n let whiteBefore = false;\r\n const prev = this.stream.getRaw().substr(this.stream.getOffset() - s.length, 1);\r\n if (prev === \" \" || prev === \"\\n\" || prev === \"\\t\" || prev === \":\") {\r\n whiteBefore = true;\r\n }\r\n let whiteAfter = false;\r\n const next = this.stream.nextChar();\r\n if (next === \" \" || next === \"\\n\" || next === \"\\t\" || next === \":\" || next === \",\" || next === \".\" || next === \"\" || next === \"\\\"\") {\r\n whiteAfter = true;\r\n }\r\n let pos = new position_1.Position(row, col - s.length);\r\n if (this.virtual) {\r\n pos = new position_1.VirtualPosition(this.virtual, pos.getRow(), pos.getCol());\r\n }\r\n let tok = undefined;\r\n if (this.m === Mode.Comment) {\r\n tok = new Tokens.Comment(pos, s);\r\n }\r\n else if (this.m === Mode.Ping || this.m === Mode.Str) {\r\n tok = new Tokens.String(pos, s);\r\n }\r\n else if (this.m === Mode.Template) {\r\n const first = s.charAt(0);\r\n const last = s.charAt(s.length - 1);\r\n if (first === \"|\" && last === \"|\") {\r\n tok = new Tokens.StringTemplate(pos, s);\r\n }\r\n else if (first === \"|\" && last === \"{\" && whiteAfter === true) {\r\n tok = new Tokens.StringTemplateBegin(pos, s);\r\n }\r\n else if (first === \"}\" && last === \"|\" && whiteBefore === true) {\r\n tok = new Tokens.StringTemplateEnd(pos, s);\r\n }\r\n else if (first === \"}\" && last === \"{\" && whiteAfter === true && whiteBefore === true) {\r\n tok = new Tokens.StringTemplateMiddle(pos, s);\r\n }\r\n else {\r\n tok = new Tokens.Identifier(pos, s);\r\n }\r\n }\r\n else if (s.substr(0, 2) === \"##\") {\r\n tok = new Tokens.Pragma(pos, s);\r\n }\r\n else if (s.length === 1) {\r\n if (s === \".\" || s === \",\") {\r\n tok = new Tokens.Punctuation(pos, s);\r\n }\r\n else if (s === \"[\") {\r\n if (whiteBefore && whiteAfter) {\r\n tok = new Tokens.WBracketLeftW(pos, s);\r\n }\r\n else if (whiteBefore) {\r\n tok = new Tokens.WBracketLeft(pos, s);\r\n }\r\n else if (whiteAfter) {\r\n tok = new Tokens.BracketLeftW(pos, s);\r\n }\r\n else {\r\n tok = new Tokens.BracketLeft(pos, s);\r\n }\r\n }\r\n else if (s === \"(\") {\r\n if (whiteBefore && whiteAfter) {\r\n tok = new Tokens.WParenLeftW(pos, s);\r\n }\r\n else if (whiteBefore) {\r\n tok = new Tokens.WParenLeft(pos, s);\r\n }\r\n else if (whiteAfter) {\r\n tok = new Tokens.ParenLeftW(pos, s);\r\n }\r\n else {\r\n tok = new Tokens.ParenLeft(pos, s);\r\n }\r\n }\r\n else if (s === \"]\") {\r\n if (whiteBefore && whiteAfter) {\r\n tok = new Tokens.WBracketRightW(pos, s);\r\n }\r\n else if (whiteBefore) {\r\n tok = new Tokens.WBracketRight(pos, s);\r\n }\r\n else if (whiteAfter) {\r\n tok = new Tokens.BracketRightW(pos, s);\r\n }\r\n else {\r\n tok = new Tokens.BracketRight(pos, s);\r\n }\r\n }\r\n else if (s === \")\") {\r\n if (whiteBefore && whiteAfter) {\r\n tok = new Tokens.WParenRightW(pos, s);\r\n }\r\n else if (whiteBefore) {\r\n tok = new Tokens.WParenRight(pos, s);\r\n }\r\n else if (whiteAfter) {\r\n tok = new Tokens.ParenRightW(pos, s);\r\n }\r\n else {\r\n tok = new Tokens.ParenRight(pos, s);\r\n }\r\n }\r\n else if (s === \"-\") {\r\n if (whiteBefore && whiteAfter) {\r\n tok = new Tokens.WDashW(pos, s);\r\n }\r\n else if (whiteBefore) {\r\n tok = new Tokens.WDash(pos, s);\r\n }\r\n else if (whiteAfter) {\r\n tok = new Tokens.DashW(pos, s);\r\n }\r\n else {\r\n tok = new Tokens.Dash(pos, s);\r\n }\r\n }\r\n else if (s === \"+\") {\r\n if (whiteBefore && whiteAfter) {\r\n tok = new Tokens.WPlusW(pos, s);\r\n }\r\n else if (whiteBefore) {\r\n tok = new Tokens.WPlus(pos, s);\r\n }\r\n else if (whiteAfter) {\r\n tok = new Tokens.PlusW(pos, s);\r\n }\r\n else {\r\n tok = new Tokens.Plus(pos, s);\r\n }\r\n }\r\n else if (s === \"@\") {\r\n if (whiteBefore && whiteAfter) {\r\n tok = new Tokens.WAtW(pos, s);\r\n }\r\n else if (whiteBefore) {\r\n tok = new Tokens.WAt(pos, s);\r\n }\r\n else if (whiteAfter) {\r\n tok = new Tokens.AtW(pos, s);\r\n }\r\n else {\r\n tok = new Tokens.At(pos, s);\r\n }\r\n }\r\n }\r\n else if (s.length === 2) {\r\n if (s === \"->\") {\r\n if (whiteBefore && whiteAfter) {\r\n tok = new Tokens.WInstanceArrowW(pos, s);\r\n }\r\n else if (whiteBefore) {\r\n tok = new Tokens.WInstanceArrow(pos, s);\r\n }\r\n else if (whiteAfter) {\r\n tok = new Tokens.InstanceArrowW(pos, s);\r\n }\r\n else {\r\n tok = new Tokens.InstanceArrow(pos, s);\r\n }\r\n }\r\n else if (s === \"=>\") {\r\n if (whiteBefore && whiteAfter) {\r\n tok = new Tokens.WStaticArrowW(pos, s);\r\n }\r\n else if (whiteBefore) {\r\n tok = new Tokens.WStaticArrow(pos, s);\r\n }\r\n else if (whiteAfter) {\r\n tok = new Tokens.StaticArrowW(pos, s);\r\n }\r\n else {\r\n tok = new Tokens.StaticArrow(pos, s);\r\n }\r\n }\r\n }\r\n if (tok === undefined) {\r\n tok = new Tokens.Identifier(pos, s);\r\n }\r\n this.tokens.push(tok);\r\n }\r\n this.buffer.clear();\r\n }\r\n static process(raw) {\r\n this.stream = new Stream(raw.replace(/\\r/g, \"\"));\r\n this.buffer = new Buffer();\r\n for (;;) {\r\n const current = this.stream.currentChar();\r\n this.buffer.add(current);\r\n const buf = this.buffer.get();\r\n const ahead = this.stream.nextChar();\r\n const aahead = this.stream.nextNextChar();\r\n const prev = this.stream.prevChar();\r\n if (ahead === \"'\" && this.m === Mode.Normal) {\r\n // start string\r\n this.add();\r\n this.m = Mode.Str;\r\n }\r\n else if ((ahead === \"|\" || ahead === \"}\")\r\n && this.m === Mode.Normal) {\r\n // start template\r\n this.add();\r\n this.m = Mode.Template;\r\n }\r\n else if (ahead === \"`\" && this.m === Mode.Normal) {\r\n // start ping\r\n this.add();\r\n this.m = Mode.Ping;\r\n }\r\n else if (aahead === \"##\" && this.m === Mode.Normal) {\r\n // start pragma\r\n this.add();\r\n this.m = Mode.Pragma;\r\n }\r\n else if ((ahead === \"\\\"\" || (ahead === \"*\" && current === \"\\n\"))\r\n && this.m === Mode.Normal) {\r\n // start comment\r\n this.add();\r\n this.m = Mode.Comment;\r\n }\r\n else if (this.m === Mode.Pragma && (ahead === \",\" || ahead === \":\" || ahead === \".\" || ahead === \" \" || ahead === \"\\n\")) {\r\n // end of pragma\r\n this.add();\r\n this.m = Mode.Normal;\r\n }\r\n else if (this.m === Mode.Ping\r\n && buf.length > 1\r\n && current === \"`\"\r\n && aahead !== \"``\"\r\n && (buf.split(\"`\").length - 1) % 2 === 0\r\n && ahead !== \"`\") {\r\n // end of ping\r\n this.add();\r\n if (ahead === `\"`) {\r\n this.m = Mode.Comment;\r\n }\r\n else {\r\n this.m = Mode.Normal;\r\n }\r\n }\r\n else if (this.m === Mode.Template\r\n && buf.length > 1\r\n && (current === \"|\" || current === \"{\")\r\n && (prev !== \"\\\\\" || this.stream.prevPrevChar() === \"\\\\\\\\\")) {\r\n // end of template\r\n this.add();\r\n this.m = Mode.Normal;\r\n }\r\n else if (this.m === Mode.Str\r\n && current === \"'\"\r\n && buf.length > 1\r\n && aahead !== \"''\"\r\n && (buf.split(\"'\").length - 1) % 2 === 0\r\n && ahead !== \"'\") {\r\n // end of string\r\n this.add();\r\n if (ahead === \"\\\"\") {\r\n this.m = Mode.Comment;\r\n }\r\n else {\r\n this.m = Mode.Normal;\r\n }\r\n }\r\n else if (this.m === Mode.Normal\r\n && (ahead === \" \"\r\n || ahead === \":\"\r\n || ahead === \".\"\r\n || ahead === \",\"\r\n || ahead === \"-\"\r\n || ahead === \"+\"\r\n || ahead === \"(\"\r\n || ahead === \")\"\r\n || ahead === \"[\"\r\n || ahead === \"]\"\r\n || (ahead === \"@\" && buf.trim().length === 0)\r\n || aahead === \"->\"\r\n || aahead === \"=>\"\r\n || ahead === \"\\t\"\r\n || ahead === \"\\n\")) {\r\n this.add();\r\n }\r\n else if (ahead === \"\\n\" && this.m !== Mode.Template) {\r\n this.add();\r\n this.m = Mode.Normal;\r\n }\r\n else if (this.m === Mode.Template && current === \"\\n\") {\r\n this.add();\r\n }\r\n else if (current === \">\"\r\n && (prev === \"-\" || prev === \"=\")\r\n && ahead !== \" \"\r\n && this.m === Mode.Normal) {\r\n // arrows\r\n this.add();\r\n }\r\n else if (this.m === Mode.Normal\r\n && (buf === \".\"\r\n || buf === \",\"\r\n || buf === \":\"\r\n || buf === \"(\"\r\n || buf === \")\"\r\n || buf === \"[\"\r\n || buf === \"]\"\r\n || buf === \"+\"\r\n || buf === \"@\"\r\n || (buf === \"-\" && ahead !== \">\"))) {\r\n this.add();\r\n }\r\n if (!this.stream.advance()) {\r\n break;\r\n }\r\n }\r\n this.add();\r\n }\r\n}\r\nexports.Lexer = Lexer;\r\n//# sourceMappingURL=lexer.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/1_lexer/lexer.js?");
174
174
 
175
175
  /***/ }),
176
176
 
@@ -9905,7 +9905,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
9905
9905
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
9906
9906
 
9907
9907
  "use strict";
9908
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Severity = exports.Visibility = exports.Info = exports.Rename = exports.PrettyPrinter = exports.Position = exports.CurrentScope = exports.ABAPFile = exports.SpaghettiScope = exports.SyntaxLogic = exports.ABAPObject = exports.Tokens = exports.ExpressionsCDS = exports.CDSParser = exports.LanguageServerTypes = exports.DDLParser = exports.applyEditList = exports.applyEditSingle = exports.SpaghettiScopeNode = exports.AbstractFile = exports.Token = exports.ScopeType = exports.BasicTypes = exports.TypedIdentifier = exports.AbstractType = exports.VirtualPosition = exports.Comment = exports.Unknown = exports.Empty = exports.Identifier = exports.Nodes = exports.Types = exports.Expressions = exports.Statements = exports.Structures = exports.Objects = exports.ArtifactsRules = exports.ArtifactsObjects = exports.ArtifactsABAP = exports.BuiltIn = exports.MethodLengthStats = exports.LanguageServer = exports.Registry = exports.ReferenceType = exports.Version = exports.Config = exports.Issue = exports.MemoryFile = void 0;\r\nconst issue_1 = __webpack_require__(/*! ./issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nObject.defineProperty(exports, \"Issue\", ({ enumerable: true, get: function () { return issue_1.Issue; } }));\r\nconst config_1 = __webpack_require__(/*! ./config */ \"./node_modules/@abaplint/core/build/src/config.js\");\r\nObject.defineProperty(exports, \"Config\", ({ enumerable: true, get: function () { return config_1.Config; } }));\r\nconst version_1 = __webpack_require__(/*! ./version */ \"./node_modules/@abaplint/core/build/src/version.js\");\r\nObject.defineProperty(exports, \"Version\", ({ enumerable: true, get: function () { return version_1.Version; } }));\r\nconst registry_1 = __webpack_require__(/*! ./registry */ \"./node_modules/@abaplint/core/build/src/registry.js\");\r\nObject.defineProperty(exports, \"Registry\", ({ enumerable: true, get: function () { return registry_1.Registry; } }));\r\nconst method_length_stats_1 = __webpack_require__(/*! ./utils/method_length_stats */ \"./node_modules/@abaplint/core/build/src/utils/method_length_stats.js\");\r\nObject.defineProperty(exports, \"MethodLengthStats\", ({ enumerable: true, get: function () { return method_length_stats_1.MethodLengthStats; } }));\r\nconst language_server_1 = __webpack_require__(/*! ./lsp/language_server */ \"./node_modules/@abaplint/core/build/src/lsp/language_server.js\");\r\nObject.defineProperty(exports, \"LanguageServer\", ({ enumerable: true, get: function () { return language_server_1.LanguageServer; } }));\r\nconst LanguageServerTypes = __webpack_require__(/*! ./lsp/_interfaces */ \"./node_modules/@abaplint/core/build/src/lsp/_interfaces.js\");\r\nexports.LanguageServerTypes = LanguageServerTypes;\r\nconst artifacts_1 = __webpack_require__(/*! ./abap/artifacts */ \"./node_modules/@abaplint/core/build/src/abap/artifacts.js\");\r\nObject.defineProperty(exports, \"ArtifactsABAP\", ({ enumerable: true, get: function () { return artifacts_1.ArtifactsABAP; } }));\r\nconst artifacts_objects_1 = __webpack_require__(/*! ./artifacts_objects */ \"./node_modules/@abaplint/core/build/src/artifacts_objects.js\");\r\nObject.defineProperty(exports, \"ArtifactsObjects\", ({ enumerable: true, get: function () { return artifacts_objects_1.ArtifactsObjects; } }));\r\nconst artifacts_rules_1 = __webpack_require__(/*! ./artifacts_rules */ \"./node_modules/@abaplint/core/build/src/artifacts_rules.js\");\r\nObject.defineProperty(exports, \"ArtifactsRules\", ({ enumerable: true, get: function () { return artifacts_rules_1.ArtifactsRules; } }));\r\nconst _abap_object_1 = __webpack_require__(/*! ./objects/_abap_object */ \"./node_modules/@abaplint/core/build/src/objects/_abap_object.js\");\r\nObject.defineProperty(exports, \"ABAPObject\", ({ enumerable: true, get: function () { return _abap_object_1.ABAPObject; } }));\r\nconst syntax_1 = __webpack_require__(/*! ./abap/5_syntax/syntax */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js\");\r\nObject.defineProperty(exports, \"SyntaxLogic\", ({ enumerable: true, get: function () { return syntax_1.SyntaxLogic; } }));\r\nconst spaghetti_scope_1 = __webpack_require__(/*! ./abap/5_syntax/spaghetti_scope */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/spaghetti_scope.js\");\r\nObject.defineProperty(exports, \"SpaghettiScope\", ({ enumerable: true, get: function () { return spaghetti_scope_1.SpaghettiScope; } }));\r\nObject.defineProperty(exports, \"SpaghettiScopeNode\", ({ enumerable: true, get: function () { return spaghetti_scope_1.SpaghettiScopeNode; } }));\r\nconst _typed_identifier_1 = __webpack_require__(/*! ./abap/types/_typed_identifier */ \"./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js\");\r\nObject.defineProperty(exports, \"TypedIdentifier\", ({ enumerable: true, get: function () { return _typed_identifier_1.TypedIdentifier; } }));\r\nconst _abstract_type_1 = __webpack_require__(/*! ./abap/types/basic/_abstract_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/_abstract_type.js\");\r\nObject.defineProperty(exports, \"AbstractType\", ({ enumerable: true, get: function () { return _abstract_type_1.AbstractType; } }));\r\nconst _scope_type_1 = __webpack_require__(/*! ./abap/5_syntax/_scope_type */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_scope_type.js\");\r\nObject.defineProperty(exports, \"ScopeType\", ({ enumerable: true, get: function () { return _scope_type_1.ScopeType; } }));\r\nconst _current_scope_1 = __webpack_require__(/*! ./abap/5_syntax/_current_scope */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_current_scope.js\");\r\nObject.defineProperty(exports, \"CurrentScope\", ({ enumerable: true, get: function () { return _current_scope_1.CurrentScope; } }));\r\nconst Objects = __webpack_require__(/*! ./objects */ \"./node_modules/@abaplint/core/build/src/objects/index.js\");\r\nexports.Objects = Objects;\r\nconst _token_1 = __webpack_require__(/*! ./abap/1_lexer/tokens/_token */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/_token.js\");\r\nObject.defineProperty(exports, \"Token\", ({ enumerable: true, get: function () { return _token_1.Token; } }));\r\nconst Statements = __webpack_require__(/*! ./abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nexports.Statements = Statements;\r\nconst Expressions = __webpack_require__(/*! ./abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nexports.Expressions = Expressions;\r\nconst ExpressionsCDS = __webpack_require__(/*! ./cds/expressions */ \"./node_modules/@abaplint/core/build/src/cds/expressions/index.js\");\r\nexports.ExpressionsCDS = ExpressionsCDS;\r\nconst Structures = __webpack_require__(/*! ./abap/3_structures/structures */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js\");\r\nexports.Structures = Structures;\r\nconst Nodes = __webpack_require__(/*! ./abap/nodes */ \"./node_modules/@abaplint/core/build/src/abap/nodes/index.js\");\r\nexports.Nodes = Nodes;\r\nconst BasicTypes = __webpack_require__(/*! ./abap/types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\r\nexports.BasicTypes = BasicTypes;\r\nconst Types = __webpack_require__(/*! ./abap/types */ \"./node_modules/@abaplint/core/build/src/abap/types/index.js\");\r\nexports.Types = Types;\r\nconst Tokens = __webpack_require__(/*! ./abap/1_lexer/tokens */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js\");\r\nexports.Tokens = Tokens;\r\nconst position_1 = __webpack_require__(/*! ./position */ \"./node_modules/@abaplint/core/build/src/position.js\");\r\nObject.defineProperty(exports, \"Position\", ({ enumerable: true, get: function () { return position_1.Position; } }));\r\nObject.defineProperty(exports, \"VirtualPosition\", ({ enumerable: true, get: function () { return position_1.VirtualPosition; } }));\r\nconst _abstract_file_1 = __webpack_require__(/*! ./files/_abstract_file */ \"./node_modules/@abaplint/core/build/src/files/_abstract_file.js\");\r\nObject.defineProperty(exports, \"AbstractFile\", ({ enumerable: true, get: function () { return _abstract_file_1.AbstractFile; } }));\r\nconst pretty_printer_1 = __webpack_require__(/*! ./pretty_printer/pretty_printer */ \"./node_modules/@abaplint/core/build/src/pretty_printer/pretty_printer.js\");\r\nObject.defineProperty(exports, \"PrettyPrinter\", ({ enumerable: true, get: function () { return pretty_printer_1.PrettyPrinter; } }));\r\nconst _statement_1 = __webpack_require__(/*! ./abap/2_statements/statements/_statement */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/_statement.js\");\r\nObject.defineProperty(exports, \"Empty\", ({ enumerable: true, get: function () { return _statement_1.Empty; } }));\r\nObject.defineProperty(exports, \"Unknown\", ({ enumerable: true, get: function () { return _statement_1.Unknown; } }));\r\nObject.defineProperty(exports, \"Comment\", ({ enumerable: true, get: function () { return _statement_1.Comment; } }));\r\nconst edit_helper_1 = __webpack_require__(/*! ./edit_helper */ \"./node_modules/@abaplint/core/build/src/edit_helper.js\");\r\nObject.defineProperty(exports, \"applyEditSingle\", ({ enumerable: true, get: function () { return edit_helper_1.applyEditSingle; } }));\r\nObject.defineProperty(exports, \"applyEditList\", ({ enumerable: true, get: function () { return edit_helper_1.applyEditList; } }));\r\nconst _reference_1 = __webpack_require__(/*! ./abap/5_syntax/_reference */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js\");\r\nObject.defineProperty(exports, \"ReferenceType\", ({ enumerable: true, get: function () { return _reference_1.ReferenceType; } }));\r\nconst _builtin_1 = __webpack_require__(/*! ./abap/5_syntax/_builtin */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_builtin.js\");\r\nObject.defineProperty(exports, \"BuiltIn\", ({ enumerable: true, get: function () { return _builtin_1.BuiltIn; } }));\r\nconst abap_file_1 = __webpack_require__(/*! ./abap/abap_file */ \"./node_modules/@abaplint/core/build/src/abap/abap_file.js\");\r\nObject.defineProperty(exports, \"ABAPFile\", ({ enumerable: true, get: function () { return abap_file_1.ABAPFile; } }));\r\nconst memory_file_1 = __webpack_require__(/*! ./files/memory_file */ \"./node_modules/@abaplint/core/build/src/files/memory_file.js\");\r\nObject.defineProperty(exports, \"MemoryFile\", ({ enumerable: true, get: function () { return memory_file_1.MemoryFile; } }));\r\nconst renamer_1 = __webpack_require__(/*! ./objects/rename/renamer */ \"./node_modules/@abaplint/core/build/src/objects/rename/renamer.js\");\r\nObject.defineProperty(exports, \"Rename\", ({ enumerable: true, get: function () { return renamer_1.Renamer; } }));\r\nconst Info = __webpack_require__(/*! ./abap/4_file_information/_abap_file_information */ \"./node_modules/@abaplint/core/build/src/abap/4_file_information/_abap_file_information.js\");\r\nexports.Info = Info;\r\nconst visibility_1 = __webpack_require__(/*! ./abap/4_file_information/visibility */ \"./node_modules/@abaplint/core/build/src/abap/4_file_information/visibility.js\");\r\nObject.defineProperty(exports, \"Visibility\", ({ enumerable: true, get: function () { return visibility_1.Visibility; } }));\r\nconst _identifier_1 = __webpack_require__(/*! ./abap/4_file_information/_identifier */ \"./node_modules/@abaplint/core/build/src/abap/4_file_information/_identifier.js\");\r\nObject.defineProperty(exports, \"Identifier\", ({ enumerable: true, get: function () { return _identifier_1.Identifier; } }));\r\nconst severity_1 = __webpack_require__(/*! ./severity */ \"./node_modules/@abaplint/core/build/src/severity.js\");\r\nObject.defineProperty(exports, \"Severity\", ({ enumerable: true, get: function () { return severity_1.Severity; } }));\r\nconst ddl_parser_1 = __webpack_require__(/*! ./ddl/ddl_parser */ \"./node_modules/@abaplint/core/build/src/ddl/ddl_parser.js\");\r\nObject.defineProperty(exports, \"DDLParser\", ({ enumerable: true, get: function () { return ddl_parser_1.DDLParser; } }));\r\nconst cds_parser_1 = __webpack_require__(/*! ./cds/cds_parser */ \"./node_modules/@abaplint/core/build/src/cds/cds_parser.js\");\r\nObject.defineProperty(exports, \"CDSParser\", ({ enumerable: true, get: function () { return cds_parser_1.CDSParser; } }));\r\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/index.js?");
9908
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Severity = exports.Visibility = exports.Info = exports.Rename = exports.PrettyPrinter = exports.Position = exports.CurrentScope = exports.ABAPFile = exports.RulesRunner = exports.SpaghettiScope = exports.SyntaxLogic = exports.ABAPObject = exports.Tokens = exports.ExpressionsCDS = exports.CDSParser = exports.LanguageServerTypes = exports.DDLParser = exports.applyEditList = exports.applyEditSingle = exports.SpaghettiScopeNode = exports.AbstractFile = exports.Token = exports.ScopeType = exports.BasicTypes = exports.TypedIdentifier = exports.AbstractType = exports.VirtualPosition = exports.Comment = exports.Unknown = exports.Empty = exports.Identifier = exports.Nodes = exports.Types = exports.Expressions = exports.Statements = exports.Structures = exports.Objects = exports.ArtifactsRules = exports.ArtifactsObjects = exports.ArtifactsABAP = exports.BuiltIn = exports.MethodLengthStats = exports.LanguageServer = exports.Registry = exports.ReferenceType = exports.Version = exports.Config = exports.Issue = exports.MemoryFile = void 0;\r\nconst issue_1 = __webpack_require__(/*! ./issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nObject.defineProperty(exports, \"Issue\", ({ enumerable: true, get: function () { return issue_1.Issue; } }));\r\nconst config_1 = __webpack_require__(/*! ./config */ \"./node_modules/@abaplint/core/build/src/config.js\");\r\nObject.defineProperty(exports, \"Config\", ({ enumerable: true, get: function () { return config_1.Config; } }));\r\nconst version_1 = __webpack_require__(/*! ./version */ \"./node_modules/@abaplint/core/build/src/version.js\");\r\nObject.defineProperty(exports, \"Version\", ({ enumerable: true, get: function () { return version_1.Version; } }));\r\nconst registry_1 = __webpack_require__(/*! ./registry */ \"./node_modules/@abaplint/core/build/src/registry.js\");\r\nObject.defineProperty(exports, \"Registry\", ({ enumerable: true, get: function () { return registry_1.Registry; } }));\r\nconst method_length_stats_1 = __webpack_require__(/*! ./utils/method_length_stats */ \"./node_modules/@abaplint/core/build/src/utils/method_length_stats.js\");\r\nObject.defineProperty(exports, \"MethodLengthStats\", ({ enumerable: true, get: function () { return method_length_stats_1.MethodLengthStats; } }));\r\nconst language_server_1 = __webpack_require__(/*! ./lsp/language_server */ \"./node_modules/@abaplint/core/build/src/lsp/language_server.js\");\r\nObject.defineProperty(exports, \"LanguageServer\", ({ enumerable: true, get: function () { return language_server_1.LanguageServer; } }));\r\nconst LanguageServerTypes = __webpack_require__(/*! ./lsp/_interfaces */ \"./node_modules/@abaplint/core/build/src/lsp/_interfaces.js\");\r\nexports.LanguageServerTypes = LanguageServerTypes;\r\nconst artifacts_1 = __webpack_require__(/*! ./abap/artifacts */ \"./node_modules/@abaplint/core/build/src/abap/artifacts.js\");\r\nObject.defineProperty(exports, \"ArtifactsABAP\", ({ enumerable: true, get: function () { return artifacts_1.ArtifactsABAP; } }));\r\nconst artifacts_objects_1 = __webpack_require__(/*! ./artifacts_objects */ \"./node_modules/@abaplint/core/build/src/artifacts_objects.js\");\r\nObject.defineProperty(exports, \"ArtifactsObjects\", ({ enumerable: true, get: function () { return artifacts_objects_1.ArtifactsObjects; } }));\r\nconst artifacts_rules_1 = __webpack_require__(/*! ./artifacts_rules */ \"./node_modules/@abaplint/core/build/src/artifacts_rules.js\");\r\nObject.defineProperty(exports, \"ArtifactsRules\", ({ enumerable: true, get: function () { return artifacts_rules_1.ArtifactsRules; } }));\r\nconst _abap_object_1 = __webpack_require__(/*! ./objects/_abap_object */ \"./node_modules/@abaplint/core/build/src/objects/_abap_object.js\");\r\nObject.defineProperty(exports, \"ABAPObject\", ({ enumerable: true, get: function () { return _abap_object_1.ABAPObject; } }));\r\nconst syntax_1 = __webpack_require__(/*! ./abap/5_syntax/syntax */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js\");\r\nObject.defineProperty(exports, \"SyntaxLogic\", ({ enumerable: true, get: function () { return syntax_1.SyntaxLogic; } }));\r\nconst spaghetti_scope_1 = __webpack_require__(/*! ./abap/5_syntax/spaghetti_scope */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/spaghetti_scope.js\");\r\nObject.defineProperty(exports, \"SpaghettiScope\", ({ enumerable: true, get: function () { return spaghetti_scope_1.SpaghettiScope; } }));\r\nObject.defineProperty(exports, \"SpaghettiScopeNode\", ({ enumerable: true, get: function () { return spaghetti_scope_1.SpaghettiScopeNode; } }));\r\nconst _typed_identifier_1 = __webpack_require__(/*! ./abap/types/_typed_identifier */ \"./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js\");\r\nObject.defineProperty(exports, \"TypedIdentifier\", ({ enumerable: true, get: function () { return _typed_identifier_1.TypedIdentifier; } }));\r\nconst _abstract_type_1 = __webpack_require__(/*! ./abap/types/basic/_abstract_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/_abstract_type.js\");\r\nObject.defineProperty(exports, \"AbstractType\", ({ enumerable: true, get: function () { return _abstract_type_1.AbstractType; } }));\r\nconst _scope_type_1 = __webpack_require__(/*! ./abap/5_syntax/_scope_type */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_scope_type.js\");\r\nObject.defineProperty(exports, \"ScopeType\", ({ enumerable: true, get: function () { return _scope_type_1.ScopeType; } }));\r\nconst _current_scope_1 = __webpack_require__(/*! ./abap/5_syntax/_current_scope */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_current_scope.js\");\r\nObject.defineProperty(exports, \"CurrentScope\", ({ enumerable: true, get: function () { return _current_scope_1.CurrentScope; } }));\r\nconst Objects = __webpack_require__(/*! ./objects */ \"./node_modules/@abaplint/core/build/src/objects/index.js\");\r\nexports.Objects = Objects;\r\nconst _token_1 = __webpack_require__(/*! ./abap/1_lexer/tokens/_token */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/_token.js\");\r\nObject.defineProperty(exports, \"Token\", ({ enumerable: true, get: function () { return _token_1.Token; } }));\r\nconst Statements = __webpack_require__(/*! ./abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nexports.Statements = Statements;\r\nconst Expressions = __webpack_require__(/*! ./abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nexports.Expressions = Expressions;\r\nconst ExpressionsCDS = __webpack_require__(/*! ./cds/expressions */ \"./node_modules/@abaplint/core/build/src/cds/expressions/index.js\");\r\nexports.ExpressionsCDS = ExpressionsCDS;\r\nconst Structures = __webpack_require__(/*! ./abap/3_structures/structures */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js\");\r\nexports.Structures = Structures;\r\nconst Nodes = __webpack_require__(/*! ./abap/nodes */ \"./node_modules/@abaplint/core/build/src/abap/nodes/index.js\");\r\nexports.Nodes = Nodes;\r\nconst BasicTypes = __webpack_require__(/*! ./abap/types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\r\nexports.BasicTypes = BasicTypes;\r\nconst Types = __webpack_require__(/*! ./abap/types */ \"./node_modules/@abaplint/core/build/src/abap/types/index.js\");\r\nexports.Types = Types;\r\nconst Tokens = __webpack_require__(/*! ./abap/1_lexer/tokens */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js\");\r\nexports.Tokens = Tokens;\r\nconst position_1 = __webpack_require__(/*! ./position */ \"./node_modules/@abaplint/core/build/src/position.js\");\r\nObject.defineProperty(exports, \"Position\", ({ enumerable: true, get: function () { return position_1.Position; } }));\r\nObject.defineProperty(exports, \"VirtualPosition\", ({ enumerable: true, get: function () { return position_1.VirtualPosition; } }));\r\nconst _abstract_file_1 = __webpack_require__(/*! ./files/_abstract_file */ \"./node_modules/@abaplint/core/build/src/files/_abstract_file.js\");\r\nObject.defineProperty(exports, \"AbstractFile\", ({ enumerable: true, get: function () { return _abstract_file_1.AbstractFile; } }));\r\nconst pretty_printer_1 = __webpack_require__(/*! ./pretty_printer/pretty_printer */ \"./node_modules/@abaplint/core/build/src/pretty_printer/pretty_printer.js\");\r\nObject.defineProperty(exports, \"PrettyPrinter\", ({ enumerable: true, get: function () { return pretty_printer_1.PrettyPrinter; } }));\r\nconst _statement_1 = __webpack_require__(/*! ./abap/2_statements/statements/_statement */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/_statement.js\");\r\nObject.defineProperty(exports, \"Empty\", ({ enumerable: true, get: function () { return _statement_1.Empty; } }));\r\nObject.defineProperty(exports, \"Unknown\", ({ enumerable: true, get: function () { return _statement_1.Unknown; } }));\r\nObject.defineProperty(exports, \"Comment\", ({ enumerable: true, get: function () { return _statement_1.Comment; } }));\r\nconst edit_helper_1 = __webpack_require__(/*! ./edit_helper */ \"./node_modules/@abaplint/core/build/src/edit_helper.js\");\r\nObject.defineProperty(exports, \"applyEditSingle\", ({ enumerable: true, get: function () { return edit_helper_1.applyEditSingle; } }));\r\nObject.defineProperty(exports, \"applyEditList\", ({ enumerable: true, get: function () { return edit_helper_1.applyEditList; } }));\r\nconst _reference_1 = __webpack_require__(/*! ./abap/5_syntax/_reference */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js\");\r\nObject.defineProperty(exports, \"ReferenceType\", ({ enumerable: true, get: function () { return _reference_1.ReferenceType; } }));\r\nconst _builtin_1 = __webpack_require__(/*! ./abap/5_syntax/_builtin */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_builtin.js\");\r\nObject.defineProperty(exports, \"BuiltIn\", ({ enumerable: true, get: function () { return _builtin_1.BuiltIn; } }));\r\nconst abap_file_1 = __webpack_require__(/*! ./abap/abap_file */ \"./node_modules/@abaplint/core/build/src/abap/abap_file.js\");\r\nObject.defineProperty(exports, \"ABAPFile\", ({ enumerable: true, get: function () { return abap_file_1.ABAPFile; } }));\r\nconst memory_file_1 = __webpack_require__(/*! ./files/memory_file */ \"./node_modules/@abaplint/core/build/src/files/memory_file.js\");\r\nObject.defineProperty(exports, \"MemoryFile\", ({ enumerable: true, get: function () { return memory_file_1.MemoryFile; } }));\r\nconst renamer_1 = __webpack_require__(/*! ./objects/rename/renamer */ \"./node_modules/@abaplint/core/build/src/objects/rename/renamer.js\");\r\nObject.defineProperty(exports, \"Rename\", ({ enumerable: true, get: function () { return renamer_1.Renamer; } }));\r\nconst Info = __webpack_require__(/*! ./abap/4_file_information/_abap_file_information */ \"./node_modules/@abaplint/core/build/src/abap/4_file_information/_abap_file_information.js\");\r\nexports.Info = Info;\r\nconst visibility_1 = __webpack_require__(/*! ./abap/4_file_information/visibility */ \"./node_modules/@abaplint/core/build/src/abap/4_file_information/visibility.js\");\r\nObject.defineProperty(exports, \"Visibility\", ({ enumerable: true, get: function () { return visibility_1.Visibility; } }));\r\nconst _identifier_1 = __webpack_require__(/*! ./abap/4_file_information/_identifier */ \"./node_modules/@abaplint/core/build/src/abap/4_file_information/_identifier.js\");\r\nObject.defineProperty(exports, \"Identifier\", ({ enumerable: true, get: function () { return _identifier_1.Identifier; } }));\r\nconst severity_1 = __webpack_require__(/*! ./severity */ \"./node_modules/@abaplint/core/build/src/severity.js\");\r\nObject.defineProperty(exports, \"Severity\", ({ enumerable: true, get: function () { return severity_1.Severity; } }));\r\nconst ddl_parser_1 = __webpack_require__(/*! ./ddl/ddl_parser */ \"./node_modules/@abaplint/core/build/src/ddl/ddl_parser.js\");\r\nObject.defineProperty(exports, \"DDLParser\", ({ enumerable: true, get: function () { return ddl_parser_1.DDLParser; } }));\r\nconst cds_parser_1 = __webpack_require__(/*! ./cds/cds_parser */ \"./node_modules/@abaplint/core/build/src/cds/cds_parser.js\");\r\nObject.defineProperty(exports, \"CDSParser\", ({ enumerable: true, get: function () { return cds_parser_1.CDSParser; } }));\r\nconst rules_runner_1 = __webpack_require__(/*! ./rules_runner */ \"./node_modules/@abaplint/core/build/src/rules_runner.js\");\r\nObject.defineProperty(exports, \"RulesRunner\", ({ enumerable: true, get: function () { return rules_runner_1.RulesRunner; } }));\r\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/index.js?");
9909
9909
 
9910
9910
  /***/ }),
9911
9911
 
@@ -10136,7 +10136,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
10136
10136
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
10137
10137
 
10138
10138
  "use strict";
10139
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.UnknownObject = void 0;\r\nconst _abstract_object_1 = __webpack_require__(/*! ./_abstract_object */ \"./node_modules/@abaplint/core/build/src/objects/_abstract_object.js\");\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst position_1 = __webpack_require__(/*! ../position */ \"./node_modules/@abaplint/core/build/src/position.js\");\r\nconst severity_1 = __webpack_require__(/*! ../severity */ \"./node_modules/@abaplint/core/build/src/severity.js\");\r\nclass UnknownObject extends _abstract_object_1.AbstractObject {\r\n constructor(name, type) {\r\n super(name);\r\n this.type = type;\r\n }\r\n getType() {\r\n return this.type;\r\n }\r\n getAllowedNaming() {\r\n return {\r\n maxLength: 100,\r\n allowNamespace: true,\r\n };\r\n }\r\n getDescription() {\r\n return undefined;\r\n }\r\n getParsingIssues() {\r\n const pos = new position_1.Position(1, 1);\r\n const file = this.getFiles()[0];\r\n const message = \"Unknown object type, currently not supported in abaplint, open issue on github\";\r\n const issue = issue_1.Issue.atPosition(file, pos, message, \"registry_add\", severity_1.Severity.Error);\r\n return [issue];\r\n }\r\n}\r\nexports.UnknownObject = UnknownObject;\r\n//# sourceMappingURL=_unknown_object.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/objects/_unknown_object.js?");
10139
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.UnknownObject = void 0;\r\nconst _abstract_object_1 = __webpack_require__(/*! ./_abstract_object */ \"./node_modules/@abaplint/core/build/src/objects/_abstract_object.js\");\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst position_1 = __webpack_require__(/*! ../position */ \"./node_modules/@abaplint/core/build/src/position.js\");\r\nconst severity_1 = __webpack_require__(/*! ../severity */ \"./node_modules/@abaplint/core/build/src/severity.js\");\r\nclass UnknownObject extends _abstract_object_1.AbstractObject {\r\n constructor(name, type) {\r\n super(name);\r\n this.type = type;\r\n }\r\n getType() {\r\n return this.type;\r\n }\r\n getAllowedNaming() {\r\n return {\r\n maxLength: 100,\r\n allowNamespace: true,\r\n };\r\n }\r\n getDescription() {\r\n return undefined;\r\n }\r\n getParsingIssues() {\r\n const pos = new position_1.Position(1, 1);\r\n const file = this.getFiles()[0];\r\n const message = \"Unknown object type, currently not supported in abaplint, open issue on github\";\r\n const issue = issue_1.Issue.atPosition(file, pos, message, \"parser_error\", severity_1.Severity.Error);\r\n return [issue];\r\n }\r\n}\r\nexports.UnknownObject = UnknownObject;\r\n//# sourceMappingURL=_unknown_object.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/objects/_unknown_object.js?");
10140
10140
 
10141
10141
  /***/ }),
10142
10142
 
@@ -11456,7 +11456,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
11456
11456
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
11457
11457
 
11458
11458
  "use strict";
11459
- eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Registry = void 0;\nconst config_1 = __webpack_require__(/*! ./config */ \"./node_modules/@abaplint/core/build/src/config.js\");\nconst artifacts_objects_1 = __webpack_require__(/*! ./artifacts_objects */ \"./node_modules/@abaplint/core/build/src/artifacts_objects.js\");\nconst artifacts_rules_1 = __webpack_require__(/*! ./artifacts_rules */ \"./node_modules/@abaplint/core/build/src/artifacts_rules.js\");\nconst skip_logic_1 = __webpack_require__(/*! ./skip_logic */ \"./node_modules/@abaplint/core/build/src/skip_logic.js\");\nconst _abap_object_1 = __webpack_require__(/*! ./objects/_abap_object */ \"./node_modules/@abaplint/core/build/src/objects/_abap_object.js\");\nconst find_global_definitions_1 = __webpack_require__(/*! ./abap/5_syntax/global_definitions/find_global_definitions */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/global_definitions/find_global_definitions.js\");\nconst syntax_1 = __webpack_require__(/*! ./abap/5_syntax/syntax */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js\");\nconst excludeHelper_1 = __webpack_require__(/*! ./utils/excludeHelper */ \"./node_modules/@abaplint/core/build/src/utils/excludeHelper.js\");\nconst ddic_references_1 = __webpack_require__(/*! ./ddic_references */ \"./node_modules/@abaplint/core/build/src/ddic_references.js\");\n// todo, this should really be an instance in case there are multiple Registry'ies\nclass ParsingPerformance {\n static clear() {\n this.results = [];\n this.lexing = 0;\n this.statements = 0;\n this.structure = 0;\n }\n static push(obj, result) {\n if (result.runtimeExtra) {\n this.lexing += result.runtimeExtra.lexing;\n this.statements += result.runtimeExtra.statements;\n this.structure += result.runtimeExtra.structure;\n }\n if (result.runtime < 100) {\n return;\n }\n if (this.results === undefined) {\n this.results = [];\n }\n let extra = \"\";\n if (result.runtimeExtra) {\n extra = `\\t(lexing: ${result.runtimeExtra.lexing}ms, statements: ${result.runtimeExtra.statements}ms, structure: ${result.runtimeExtra.structure}ms)`;\n }\n this.results.push({\n runtime: result.runtime,\n extra,\n name: obj.getType() + \" \" + obj.getName(),\n });\n }\n static output() {\n const MAX = 10;\n this.results.sort((a, b) => { return b.runtime - a.runtime; });\n for (let i = 0; i < MAX; i++) {\n const row = this.results[i];\n if (row === undefined) {\n break;\n }\n process.stderr.write(`\\t${row.runtime}ms\\t${row.name} ${row.extra}\\n`);\n }\n process.stderr.write(`\\tTotal lexing: ${this.lexing}ms\\n`);\n process.stderr.write(`\\tTotal statements: ${this.statements}ms\\n`);\n process.stderr.write(`\\tTotal structure: ${this.structure}ms\\n`);\n }\n}\n///////////////////////////////////////////////////////////////////////////////////////////////\nclass Registry {\n constructor(conf) {\n this.objects = {};\n this.objectsByType = {};\n this.dependencies = {};\n this.issues = [];\n this.conf = conf ? conf : config_1.Config.getDefault();\n this.references = new ddic_references_1.DDICReferences();\n }\n static abaplintVersion() {\n // magic, see build script \"version.sh\"\n return \"2.93.2\";\n }\n getDDICReferences() {\n return this.references;\n }\n *getObjects() {\n for (const name in this.objects) {\n for (const type in this.objects[name]) {\n yield this.objects[name][type];\n }\n }\n }\n *getObjectsByType(type) {\n for (const name in this.objectsByType[type] || []) {\n yield this.objectsByType[type][name];\n }\n }\n *getFiles() {\n for (const obj of this.getObjects()) {\n for (const file of obj.getFiles()) {\n yield file;\n }\n }\n }\n getFirstObject() {\n for (const name in this.objects) {\n for (const type in this.objects[name]) {\n return this.objects[name][type];\n }\n }\n return undefined;\n }\n getObjectCount(skipDependencies = true) {\n let res = 0;\n for (const o of this.getObjects()) {\n if (skipDependencies === true && this.isDependency(o)) {\n continue;\n }\n res = res + 1;\n }\n return res;\n }\n getFileByName(filename) {\n const upper = filename.toUpperCase();\n for (const o of this.getObjects()) {\n for (const f of o.getFiles()) {\n if (f.getFilename().toUpperCase() === upper) {\n return f;\n }\n }\n }\n return undefined;\n }\n getObject(type, name) {\n if (type === undefined || name === undefined) {\n return undefined;\n }\n const searchName = name.toUpperCase();\n if (this.objects[searchName]) {\n return this.objects[searchName][type];\n }\n return undefined;\n }\n getConfig() {\n return this.conf;\n }\n // assumption: Config is immutable, and can only be changed via this method\n setConfig(conf) {\n for (const obj of this.getObjects()) {\n obj.setDirty();\n }\n this.conf = conf;\n return this;\n }\n inErrorNamespace(name) {\n // todo: performance? cache regexp?\n const reg = new RegExp(this.getConfig().getSyntaxSetttings().errorNamespace, \"i\");\n return reg.test(name);\n }\n addFile(file) {\n return this.addFiles([file]);\n }\n updateFile(file) {\n const obj = this.find(file.getObjectName(), file.getObjectType());\n obj.updateFile(file);\n return this;\n }\n removeFile(file) {\n const obj = this.find(file.getObjectName(), file.getObjectType());\n obj.removeFile(file);\n if (obj.getFiles().length === 0) {\n this.references.clear(obj);\n this.removeObject(obj);\n }\n return this;\n }\n _addFiles(files, dependency) {\n var _a;\n const globalExclude = ((_a = this.conf.getGlobal().exclude) !== null && _a !== void 0 ? _a : [])\n .map(pattern => new RegExp(pattern, \"i\"));\n for (const f of files) {\n const filename = f.getFilename();\n const isNotAbapgitFile = filename.split(\".\").length <= 2;\n if (isNotAbapgitFile || excludeHelper_1.ExcludeHelper.isExcluded(filename, globalExclude)) {\n continue;\n }\n let found = this.findOrCreate(f.getObjectName(), f.getObjectType());\n if (dependency === false && found && this.isDependency(found)) {\n this.removeDependency(found);\n found = this.findOrCreate(f.getObjectName(), f.getObjectType());\n }\n found.addFile(f);\n }\n return this;\n }\n addFiles(files) {\n this._addFiles(files, false);\n return this;\n }\n addDependencies(files) {\n for (const f of files) {\n this.addDependency(f);\n }\n return this;\n }\n addDependency(file) {\n var _a;\n const type = (_a = file.getObjectType()) === null || _a === void 0 ? void 0 : _a.toUpperCase();\n if (type === undefined) {\n return this;\n }\n const name = file.getObjectName().toUpperCase();\n if (this.dependencies[type] === undefined) {\n this.dependencies[type] = {};\n }\n this.dependencies[type][name] = true;\n this._addFiles([file], true);\n return this;\n }\n removeDependency(obj) {\n var _a;\n (_a = this.dependencies[obj.getType()]) === null || _a === void 0 ? true : delete _a[obj.getName()];\n this.removeObject(obj);\n }\n isDependency(obj) {\n var _a;\n return ((_a = this.dependencies[obj.getType()]) === null || _a === void 0 ? void 0 : _a[obj.getName()]) === true;\n }\n isFileDependency(filename) {\n var _a, _b;\n const f = this.getFileByName(filename);\n if (f === undefined) {\n return false;\n }\n const type = (_a = f.getObjectType()) === null || _a === void 0 ? void 0 : _a.toUpperCase();\n if (type === undefined) {\n return false;\n }\n const name = f.getObjectName().toUpperCase();\n return ((_b = this.dependencies[type]) === null || _b === void 0 ? void 0 : _b[name]) === true;\n }\n // assumption: the file is already in the registry\n findObjectForFile(file) {\n const filename = file.getFilename();\n for (const obj of this.getObjects()) {\n for (const ofile of obj.getFiles()) {\n if (ofile.getFilename() === filename) {\n return obj;\n }\n }\n }\n return undefined;\n }\n // todo, this will be changed to async sometime\n findIssues(input) {\n if (this.isDirty() === true) {\n this.parse();\n }\n return this.runRules(input);\n }\n // todo, this will be changed to async sometime\n findIssuesObject(iobj) {\n if (this.isDirty() === true) {\n this.parse();\n }\n return this.runRules(undefined, iobj);\n }\n // todo, this will be changed to async sometime\n parse() {\n if (this.isDirty() === false) {\n return this;\n }\n ParsingPerformance.clear();\n this.issues = [];\n for (const o of this.getObjects()) {\n this.parsePrivate(o);\n this.issues.push(...o.getParsingIssues());\n }\n new find_global_definitions_1.FindGlobalDefinitions(this).run();\n return this;\n }\n async parseAsync(input) {\n var _a, _b;\n if (this.isDirty() === false) {\n return this;\n }\n ParsingPerformance.clear();\n (_a = input === null || input === void 0 ? void 0 : input.progress) === null || _a === void 0 ? void 0 : _a.set(this.getObjectCount(false), \"Lexing and parsing\");\n this.issues = [];\n for (const o of this.getObjects()) {\n await ((_b = input === null || input === void 0 ? void 0 : input.progress) === null || _b === void 0 ? void 0 : _b.tick(\"Lexing and parsing(\" + this.conf.getVersion() + \") - \" + o.getType() + \" \" + o.getName()));\n this.parsePrivate(o);\n this.issues.push(...o.getParsingIssues());\n }\n if ((input === null || input === void 0 ? void 0 : input.outputPerformance) === true) {\n ParsingPerformance.output();\n }\n new find_global_definitions_1.FindGlobalDefinitions(this).run(input === null || input === void 0 ? void 0 : input.progress);\n return this;\n }\n //////////////////////////////////////////\n // todo, refactor, this is a mess, see where-used, a lot of the code should be in this method instead\n parsePrivate(input) {\n const config = this.getConfig();\n const result = input.parse(config.getVersion(), config.getSyntaxSetttings().globalMacros, this);\n ParsingPerformance.push(input, result);\n }\n isDirty() {\n for (const o of this.getObjects()) {\n const dirty = o.isDirty();\n if (dirty === true) {\n return true;\n }\n }\n return false;\n }\n runRules(input, iobj) {\n var _a, _b, _c, _d, _e, _f;\n const rulePerformance = {};\n const issues = this.issues.slice(0);\n const objects = iobj ? [iobj] : this.getObjects();\n const rules = this.conf.getEnabledRules();\n const skipLogic = new skip_logic_1.SkipLogic(this);\n (_a = input === null || input === void 0 ? void 0 : input.progress) === null || _a === void 0 ? void 0 : _a.set(iobj ? 1 : this.getObjectCount(false), \"Run Syntax\");\n const check = [];\n for (const obj of objects) {\n (_b = input === null || input === void 0 ? void 0 : input.progress) === null || _b === void 0 ? void 0 : _b.tick(\"Run Syntax - \" + obj.getName());\n if (skipLogic.skip(obj) || this.isDependency(obj)) {\n continue;\n }\n if (obj instanceof _abap_object_1.ABAPObject) {\n new syntax_1.SyntaxLogic(this, obj).run();\n }\n check.push(obj);\n }\n (_c = input === null || input === void 0 ? void 0 : input.progress) === null || _c === void 0 ? void 0 : _c.set(rules.length, \"Initialize Rules\");\n for (const rule of rules) {\n (_d = input === null || input === void 0 ? void 0 : input.progress) === null || _d === void 0 ? void 0 : _d.tick(\"Initialize Rules - \" + rule.getMetadata().key);\n if (rule.initialize === undefined) {\n throw new Error(rule.getMetadata().key + \" missing initialize method\");\n }\n rule.initialize(this);\n rulePerformance[rule.getMetadata().key] = 0;\n }\n (_e = input === null || input === void 0 ? void 0 : input.progress) === null || _e === void 0 ? void 0 : _e.set(check.length, \"Finding Issues\");\n for (const obj of check) {\n (_f = input === null || input === void 0 ? void 0 : input.progress) === null || _f === void 0 ? void 0 : _f.tick(\"Finding Issues - \" + obj.getType() + \" \" + obj.getName());\n for (const rule of rules) {\n const before = Date.now();\n issues.push(...rule.run(obj));\n const runtime = Date.now() - before;\n rulePerformance[rule.getMetadata().key] = rulePerformance[rule.getMetadata().key] + runtime;\n }\n }\n if ((input === null || input === void 0 ? void 0 : input.outputPerformance) === true) {\n const perf = [];\n for (const p in rulePerformance) {\n if (rulePerformance[p] > 100) { // ignore rules if it takes less than 100ms\n perf.push({ name: p, time: rulePerformance[p] });\n }\n }\n perf.sort((a, b) => { return b.time - a.time; });\n for (const p of perf) {\n process.stderr.write(\"\\t\" + p.time + \"ms\\t\" + p.name + \"\\n\");\n }\n }\n return this.excludeIssues(issues);\n }\n excludeIssues(issues) {\n var _a;\n const ret = issues;\n const globalNoIssues = this.conf.getGlobal().noIssues || [];\n const globalNoIssuesPatterns = globalNoIssues.map(x => new RegExp(x, \"i\"));\n if (globalNoIssuesPatterns.length > 0) {\n for (let i = ret.length - 1; i >= 0; i--) {\n const filename = ret[i].getFilename();\n if (excludeHelper_1.ExcludeHelper.isExcluded(filename, globalNoIssuesPatterns)) {\n ret.splice(i, 1);\n }\n }\n }\n // exclude issues, as now we know both the filename and issue key\n for (const rule of artifacts_rules_1.ArtifactsRules.getRules()) {\n const key = rule.getMetadata().key;\n const ruleExclude = (_a = this.conf.readByKey(key, \"exclude\")) !== null && _a !== void 0 ? _a : [];\n if (ruleExclude.length === 0) {\n continue;\n }\n const ruleExcludePatterns = ruleExclude.map(x => new RegExp(x, \"i\"));\n for (let i = ret.length - 1; i >= 0; i--) {\n if (ret[i].getKey() !== key) {\n continue;\n }\n const filename = ret[i].getFilename();\n if (excludeHelper_1.ExcludeHelper.isExcluded(filename, ruleExcludePatterns)) {\n ret.splice(i, 1);\n }\n }\n }\n return ret;\n }\n findOrCreate(name, type) {\n try {\n return this.find(name, type);\n }\n catch (_a) {\n const newName = name.toUpperCase();\n const newType = type ? type : \"UNKNOWN\";\n const add = artifacts_objects_1.ArtifactsObjects.newObject(newName, newType);\n if (this.objects[newName] === undefined) {\n this.objects[newName] = {};\n }\n this.objects[newName][newType] = add;\n if (this.objectsByType[newType] === undefined) {\n this.objectsByType[newType] = {};\n }\n this.objectsByType[newType][newName] = add;\n return add;\n }\n }\n removeObject(remove) {\n if (remove === undefined) {\n return;\n }\n if (this.objects[remove.getName()][remove.getType()] === undefined) {\n throw new Error(\"removeObject: object not found\");\n }\n if (Object.keys(this.objects[remove.getName()]).length === 1) {\n delete this.objects[remove.getName()];\n }\n else {\n delete this.objects[remove.getName()][remove.getType()];\n }\n if (Object.keys(this.objectsByType[remove.getType()]).length === 1) {\n delete this.objectsByType[remove.getType()];\n }\n else {\n delete this.objectsByType[remove.getType()][remove.getName()];\n }\n }\n find(name, type) {\n const searchType = type ? type : \"UNKNOWN\";\n const searchName = name.toUpperCase();\n if (this.objects[searchName] !== undefined\n && this.objects[searchName][searchType]) {\n return this.objects[searchName][searchType];\n }\n throw new Error(\"find: object not found, \" + type + \" \" + name);\n }\n}\nexports.Registry = Registry;\n//# sourceMappingURL=registry.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/registry.js?");
11459
+ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Registry = void 0;\nconst config_1 = __webpack_require__(/*! ./config */ \"./node_modules/@abaplint/core/build/src/config.js\");\nconst artifacts_objects_1 = __webpack_require__(/*! ./artifacts_objects */ \"./node_modules/@abaplint/core/build/src/artifacts_objects.js\");\nconst find_global_definitions_1 = __webpack_require__(/*! ./abap/5_syntax/global_definitions/find_global_definitions */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/global_definitions/find_global_definitions.js\");\nconst excludeHelper_1 = __webpack_require__(/*! ./utils/excludeHelper */ \"./node_modules/@abaplint/core/build/src/utils/excludeHelper.js\");\nconst ddic_references_1 = __webpack_require__(/*! ./ddic_references */ \"./node_modules/@abaplint/core/build/src/ddic_references.js\");\nconst rules_runner_1 = __webpack_require__(/*! ./rules_runner */ \"./node_modules/@abaplint/core/build/src/rules_runner.js\");\n// todo, this should really be an instance in case there are multiple Registry'ies\nclass ParsingPerformance {\n static clear() {\n this.results = [];\n this.lexing = 0;\n this.statements = 0;\n this.structure = 0;\n }\n static push(obj, result) {\n if (result.runtimeExtra) {\n this.lexing += result.runtimeExtra.lexing;\n this.statements += result.runtimeExtra.statements;\n this.structure += result.runtimeExtra.structure;\n }\n if (result.runtime < 100) {\n return;\n }\n if (this.results === undefined) {\n this.results = [];\n }\n let extra = \"\";\n if (result.runtimeExtra) {\n extra = `\\t(lexing: ${result.runtimeExtra.lexing}ms, statements: ${result.runtimeExtra.statements}ms, structure: ${result.runtimeExtra.structure}ms)`;\n }\n this.results.push({\n runtime: result.runtime,\n extra,\n name: obj.getType() + \" \" + obj.getName(),\n });\n }\n static output() {\n const MAX = 10;\n this.results.sort((a, b) => { return b.runtime - a.runtime; });\n for (let i = 0; i < MAX; i++) {\n const row = this.results[i];\n if (row === undefined) {\n break;\n }\n process.stderr.write(`\\t${row.runtime}ms\\t${row.name} ${row.extra}\\n`);\n }\n process.stderr.write(`\\tTotal lexing: ${this.lexing}ms\\n`);\n process.stderr.write(`\\tTotal statements: ${this.statements}ms\\n`);\n process.stderr.write(`\\tTotal structure: ${this.structure}ms\\n`);\n }\n}\n///////////////////////////////////////////////////////////////////////////////////////////////\nclass Registry {\n constructor(conf) {\n this.objects = {};\n this.objectsByType = {};\n this.dependencies = {};\n this.conf = conf ? conf : config_1.Config.getDefault();\n this.references = new ddic_references_1.DDICReferences();\n }\n static abaplintVersion() {\n // magic, see build script \"version.sh\"\n return \"2.93.3\";\n }\n getDDICReferences() {\n return this.references;\n }\n *getObjects() {\n for (const name in this.objects) {\n for (const type in this.objects[name]) {\n yield this.objects[name][type];\n }\n }\n }\n *getObjectsByType(type) {\n for (const name in this.objectsByType[type] || []) {\n yield this.objectsByType[type][name];\n }\n }\n *getFiles() {\n for (const obj of this.getObjects()) {\n for (const file of obj.getFiles()) {\n yield file;\n }\n }\n }\n getFirstObject() {\n for (const name in this.objects) {\n for (const type in this.objects[name]) {\n return this.objects[name][type];\n }\n }\n return undefined;\n }\n getObjectCount(skipDependencies = true) {\n let res = 0;\n for (const o of this.getObjects()) {\n if (skipDependencies === true && this.isDependency(o)) {\n continue;\n }\n res = res + 1;\n }\n return res;\n }\n getFileByName(filename) {\n const upper = filename.toUpperCase();\n for (const o of this.getObjects()) {\n for (const f of o.getFiles()) {\n if (f.getFilename().toUpperCase() === upper) {\n return f;\n }\n }\n }\n return undefined;\n }\n getObject(type, name) {\n if (type === undefined || name === undefined) {\n return undefined;\n }\n const searchName = name.toUpperCase();\n if (this.objects[searchName]) {\n return this.objects[searchName][type];\n }\n return undefined;\n }\n getConfig() {\n return this.conf;\n }\n // assumption: Config is immutable, and can only be changed via this method\n setConfig(conf) {\n for (const obj of this.getObjects()) {\n obj.setDirty();\n }\n this.conf = conf;\n return this;\n }\n inErrorNamespace(name) {\n // todo: performance? cache regexp?\n const reg = new RegExp(this.getConfig().getSyntaxSetttings().errorNamespace, \"i\");\n return reg.test(name);\n }\n addFile(file) {\n return this.addFiles([file]);\n }\n updateFile(file) {\n const obj = this.find(file.getObjectName(), file.getObjectType());\n obj.updateFile(file);\n return this;\n }\n removeFile(file) {\n const obj = this.find(file.getObjectName(), file.getObjectType());\n obj.removeFile(file);\n if (obj.getFiles().length === 0) {\n this.references.clear(obj);\n this.removeObject(obj);\n }\n return this;\n }\n _addFiles(files, dependency) {\n var _a;\n const globalExclude = ((_a = this.conf.getGlobal().exclude) !== null && _a !== void 0 ? _a : [])\n .map(pattern => new RegExp(pattern, \"i\"));\n for (const f of files) {\n const filename = f.getFilename();\n const isNotAbapgitFile = filename.split(\".\").length <= 2;\n if (isNotAbapgitFile || excludeHelper_1.ExcludeHelper.isExcluded(filename, globalExclude)) {\n continue;\n }\n let found = this.findOrCreate(f.getObjectName(), f.getObjectType());\n if (dependency === false && found && this.isDependency(found)) {\n this.removeDependency(found);\n found = this.findOrCreate(f.getObjectName(), f.getObjectType());\n }\n found.addFile(f);\n }\n return this;\n }\n addFiles(files) {\n this._addFiles(files, false);\n return this;\n }\n addDependencies(files) {\n for (const f of files) {\n this.addDependency(f);\n }\n return this;\n }\n addDependency(file) {\n var _a;\n const type = (_a = file.getObjectType()) === null || _a === void 0 ? void 0 : _a.toUpperCase();\n if (type === undefined) {\n return this;\n }\n const name = file.getObjectName().toUpperCase();\n if (this.dependencies[type] === undefined) {\n this.dependencies[type] = {};\n }\n this.dependencies[type][name] = true;\n this._addFiles([file], true);\n return this;\n }\n removeDependency(obj) {\n var _a;\n (_a = this.dependencies[obj.getType()]) === null || _a === void 0 ? true : delete _a[obj.getName()];\n this.removeObject(obj);\n }\n isDependency(obj) {\n var _a;\n return ((_a = this.dependencies[obj.getType()]) === null || _a === void 0 ? void 0 : _a[obj.getName()]) === true;\n }\n isFileDependency(filename) {\n var _a, _b;\n const f = this.getFileByName(filename);\n if (f === undefined) {\n return false;\n }\n const type = (_a = f.getObjectType()) === null || _a === void 0 ? void 0 : _a.toUpperCase();\n if (type === undefined) {\n return false;\n }\n const name = f.getObjectName().toUpperCase();\n return ((_b = this.dependencies[type]) === null || _b === void 0 ? void 0 : _b[name]) === true;\n }\n // assumption: the file is already in the registry\n findObjectForFile(file) {\n const filename = file.getFilename();\n for (const obj of this.getObjects()) {\n for (const ofile of obj.getFiles()) {\n if (ofile.getFilename() === filename) {\n return obj;\n }\n }\n }\n return undefined;\n }\n // todo, this will be changed to async sometime\n findIssues(input) {\n if (this.isDirty() === true) {\n this.parse();\n }\n return new rules_runner_1.RulesRunner(this).runRules(this.getObjects(), input);\n }\n // todo, this will be changed to async sometime\n findIssuesObject(iobj) {\n if (this.isDirty() === true) {\n this.parse();\n }\n return new rules_runner_1.RulesRunner(this).runRules([iobj]);\n }\n // todo, this will be changed to async sometime\n parse() {\n if (this.isDirty() === false) {\n return this;\n }\n ParsingPerformance.clear();\n for (const o of this.getObjects()) {\n this.parsePrivate(o);\n }\n new find_global_definitions_1.FindGlobalDefinitions(this).run();\n return this;\n }\n async parseAsync(input) {\n var _a, _b;\n if (this.isDirty() === false) {\n return this;\n }\n ParsingPerformance.clear();\n (_a = input === null || input === void 0 ? void 0 : input.progress) === null || _a === void 0 ? void 0 : _a.set(this.getObjectCount(false), \"Lexing and parsing\");\n for (const o of this.getObjects()) {\n await ((_b = input === null || input === void 0 ? void 0 : input.progress) === null || _b === void 0 ? void 0 : _b.tick(\"Lexing and parsing(\" + this.conf.getVersion() + \") - \" + o.getType() + \" \" + o.getName()));\n this.parsePrivate(o);\n }\n if ((input === null || input === void 0 ? void 0 : input.outputPerformance) === true) {\n ParsingPerformance.output();\n }\n new find_global_definitions_1.FindGlobalDefinitions(this).run(input === null || input === void 0 ? void 0 : input.progress);\n return this;\n }\n //////////////////////////////////////////\n // todo, refactor, this is a mess, see where-used, a lot of the code should be in this method instead\n parsePrivate(input) {\n const config = this.getConfig();\n const result = input.parse(config.getVersion(), config.getSyntaxSetttings().globalMacros, this);\n ParsingPerformance.push(input, result);\n }\n isDirty() {\n for (const o of this.getObjects()) {\n const dirty = o.isDirty();\n if (dirty === true) {\n return true;\n }\n }\n return false;\n }\n findOrCreate(name, type) {\n try {\n return this.find(name, type);\n }\n catch (_a) {\n const newName = name.toUpperCase();\n const newType = type ? type : \"UNKNOWN\";\n const add = artifacts_objects_1.ArtifactsObjects.newObject(newName, newType);\n if (this.objects[newName] === undefined) {\n this.objects[newName] = {};\n }\n this.objects[newName][newType] = add;\n if (this.objectsByType[newType] === undefined) {\n this.objectsByType[newType] = {};\n }\n this.objectsByType[newType][newName] = add;\n return add;\n }\n }\n removeObject(remove) {\n if (remove === undefined) {\n return;\n }\n if (this.objects[remove.getName()][remove.getType()] === undefined) {\n throw new Error(\"removeObject: object not found\");\n }\n if (Object.keys(this.objects[remove.getName()]).length === 1) {\n delete this.objects[remove.getName()];\n }\n else {\n delete this.objects[remove.getName()][remove.getType()];\n }\n if (Object.keys(this.objectsByType[remove.getType()]).length === 1) {\n delete this.objectsByType[remove.getType()];\n }\n else {\n delete this.objectsByType[remove.getType()][remove.getName()];\n }\n }\n find(name, type) {\n const searchType = type ? type : \"UNKNOWN\";\n const searchName = name.toUpperCase();\n if (this.objects[searchName] !== undefined\n && this.objects[searchName][searchType]) {\n return this.objects[searchName][searchType];\n }\n throw new Error(\"find: object not found, \" + type + \" \" + name);\n }\n}\nexports.Registry = Registry;\n//# sourceMappingURL=registry.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/registry.js?");
11460
11460
 
11461
11461
  /***/ }),
11462
11462
 
@@ -12611,7 +12611,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
12611
12611
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
12612
12612
 
12613
12613
  "use strict";
12614
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ParserError = exports.ParserErrorConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _statement_1 = __webpack_require__(/*! ../abap/2_statements/statements/_statement */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/_statement.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst statement_parser_1 = __webpack_require__(/*! ../abap/2_statements/statement_parser */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statement_parser.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst version_1 = __webpack_require__(/*! ../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\r\nclass ParserErrorConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.ParserErrorConf = ParserErrorConf;\r\nclass ParserError extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new ParserErrorConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"parser_error\",\r\n title: \"Parser error\",\r\n shortDescription: `Checks for syntax not recognized by abaplint.\r\n\r\nSee recognized syntax at https://syntax.abaplint.org`,\r\n tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.SingleFile],\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n const issues = [];\r\n for (const statement of file.getStatements()) {\r\n if (!(statement.get() instanceof _statement_1.Unknown)) {\r\n continue;\r\n }\r\n if (statement.getTokens().length > statement_parser_1.STATEMENT_MAX_TOKENS) {\r\n const message = \"Statement too long, refactor statement\";\r\n const issue = issue_1.Issue.atToken(file, statement.getTokens()[0], message, this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n else {\r\n const tok = statement.getFirstToken();\r\n const message = \"Statement does not exist in ABAP\" + this.reg.getConfig().getVersion() + \"(or a parser error), \\\"\" + tok.getStr() + \"\\\"\";\r\n const issue = issue_1.Issue.atStatement(file, statement, message, this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n }\r\n if (this.reg.getConfig().getVersion() === version_1.Version.v700) {\r\n for (const statement of file.getStatements()) {\r\n if (statement.getPragmas().length > 0) {\r\n const message = \"Pragmas not allowed in v700\";\r\n const issue = issue_1.Issue.atStatement(file, statement, message, this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n }\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.ParserError = ParserError;\r\n//# sourceMappingURL=parser_error.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/parser_error.js?");
12614
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ParserError = exports.ParserErrorConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _statement_1 = __webpack_require__(/*! ../abap/2_statements/statements/_statement */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/_statement.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst statement_parser_1 = __webpack_require__(/*! ../abap/2_statements/statement_parser */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statement_parser.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst version_1 = __webpack_require__(/*! ../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\r\nconst _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ \"./node_modules/@abaplint/core/build/src/objects/_abap_object.js\");\r\nclass ParserErrorConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.ParserErrorConf = ParserErrorConf;\r\nclass ParserError {\r\n constructor() {\r\n this.conf = new ParserErrorConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"parser_error\",\r\n title: \"Parser error\",\r\n shortDescription: `Checks for syntax not recognized by abaplint.\r\n\r\nSee recognized syntax at https://syntax.abaplint.org`,\r\n tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.SingleFile],\r\n };\r\n }\r\n initialize(reg) {\r\n this.reg = reg;\r\n return this;\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n run(obj) {\r\n const issues = [];\r\n issues.push(...obj.getParsingIssues());\r\n if (obj instanceof _abap_object_1.ABAPObject) {\r\n for (const file of obj.getABAPFiles()) {\r\n for (const statement of file.getStatements()) {\r\n if (!(statement.get() instanceof _statement_1.Unknown)) {\r\n continue;\r\n }\r\n if (statement.getTokens().length > statement_parser_1.STATEMENT_MAX_TOKENS) {\r\n const message = \"Statement too long, refactor statement\";\r\n const issue = issue_1.Issue.atToken(file, statement.getTokens()[0], message, this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n else {\r\n const tok = statement.getFirstToken();\r\n const message = \"Statement does not exist in ABAP\" + this.reg.getConfig().getVersion() + \"(or a parser error), \\\"\" + tok.getStr() + \"\\\"\";\r\n const issue = issue_1.Issue.atStatement(file, statement, message, this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n }\r\n if (this.reg.getConfig().getVersion() === version_1.Version.v700) {\r\n for (const statement of file.getStatements()) {\r\n if (statement.getPragmas().length > 0) {\r\n const message = \"Pragmas not allowed in v700\";\r\n const issue = issue_1.Issue.atStatement(file, statement, message, this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.ParserError = ParserError;\r\n//# sourceMappingURL=parser_error.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/parser_error.js?");
12615
12615
 
12616
12616
  /***/ }),
12617
12617
 
@@ -13165,6 +13165,17 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
13165
13165
 
13166
13166
  /***/ }),
13167
13167
 
13168
+ /***/ "./node_modules/@abaplint/core/build/src/rules_runner.js":
13169
+ /*!***************************************************************!*\
13170
+ !*** ./node_modules/@abaplint/core/build/src/rules_runner.js ***!
13171
+ \***************************************************************/
13172
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
13173
+
13174
+ "use strict";
13175
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.RulesRunner = void 0;\r\nconst syntax_1 = __webpack_require__(/*! ./abap/5_syntax/syntax */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js\");\r\nconst artifacts_rules_1 = __webpack_require__(/*! ./artifacts_rules */ \"./node_modules/@abaplint/core/build/src/artifacts_rules.js\");\r\nconst _abap_object_1 = __webpack_require__(/*! ./objects/_abap_object */ \"./node_modules/@abaplint/core/build/src/objects/_abap_object.js\");\r\nconst skip_logic_1 = __webpack_require__(/*! ./skip_logic */ \"./node_modules/@abaplint/core/build/src/skip_logic.js\");\r\nconst excludeHelper_1 = __webpack_require__(/*! ./utils/excludeHelper */ \"./node_modules/@abaplint/core/build/src/utils/excludeHelper.js\");\r\nclass RulesRunner {\r\n constructor(reg) {\r\n this.reg = reg;\r\n }\r\n objectsToCheck(objects) {\r\n const check = [];\r\n const skipLogic = new skip_logic_1.SkipLogic(this.reg);\r\n for (const obj of objects) {\r\n if (skipLogic.skip(obj) || this.reg.isDependency(obj)) {\r\n continue;\r\n }\r\n check.push(obj);\r\n }\r\n return check;\r\n }\r\n runRules(objects, input) {\r\n var _a, _b, _c, _d, _e, _f;\r\n const rulePerformance = {};\r\n const issues = [];\r\n const rules = this.reg.getConfig().getEnabledRules();\r\n const check = this.objectsToCheck(objects);\r\n // note: SyntaxLogic is cached, logic is run as first step in order\r\n // not to penalize the performance of the first rule using SyntaxLogic information\r\n (_a = input === null || input === void 0 ? void 0 : input.progress) === null || _a === void 0 ? void 0 : _a.set(check.length, \"Run Syntax\");\r\n for (const obj of check) {\r\n (_b = input === null || input === void 0 ? void 0 : input.progress) === null || _b === void 0 ? void 0 : _b.tick(\"Run Syntax - \" + obj.getName());\r\n if (obj instanceof _abap_object_1.ABAPObject) {\r\n new syntax_1.SyntaxLogic(this.reg, obj).run();\r\n }\r\n }\r\n (_c = input === null || input === void 0 ? void 0 : input.progress) === null || _c === void 0 ? void 0 : _c.set(rules.length, \"Initialize Rules\");\r\n for (const rule of rules) {\r\n (_d = input === null || input === void 0 ? void 0 : input.progress) === null || _d === void 0 ? void 0 : _d.tick(\"Initialize Rules - \" + rule.getMetadata().key);\r\n if (rule.initialize === undefined) {\r\n throw new Error(rule.getMetadata().key + \" missing initialize method\");\r\n }\r\n rule.initialize(this.reg);\r\n rulePerformance[rule.getMetadata().key] = 0;\r\n }\r\n (_e = input === null || input === void 0 ? void 0 : input.progress) === null || _e === void 0 ? void 0 : _e.set(check.length, \"Finding Issues\");\r\n for (const obj of check) {\r\n (_f = input === null || input === void 0 ? void 0 : input.progress) === null || _f === void 0 ? void 0 : _f.tick(\"Finding Issues - \" + obj.getType() + \" \" + obj.getName());\r\n for (const rule of rules) {\r\n const before = Date.now();\r\n issues.push(...rule.run(obj));\r\n const runtime = Date.now() - before;\r\n rulePerformance[rule.getMetadata().key] = rulePerformance[rule.getMetadata().key] + runtime;\r\n }\r\n }\r\n if ((input === null || input === void 0 ? void 0 : input.outputPerformance) === true) {\r\n const perf = [];\r\n for (const p in rulePerformance) {\r\n if (rulePerformance[p] > 100) { // ignore rules if it takes less than 100ms\r\n perf.push({ name: p, time: rulePerformance[p] });\r\n }\r\n }\r\n perf.sort((a, b) => { return b.time - a.time; });\r\n for (const p of perf) {\r\n process.stderr.write(\"\\t\" + p.time + \"ms\\t\" + p.name + \"\\n\");\r\n }\r\n }\r\n return this.excludeIssues(issues);\r\n }\r\n excludeIssues(issues) {\r\n var _a;\r\n const ret = issues;\r\n const globalNoIssues = this.reg.getConfig().getGlobal().noIssues || [];\r\n const globalNoIssuesPatterns = globalNoIssues.map(x => new RegExp(x, \"i\"));\r\n if (globalNoIssuesPatterns.length > 0) {\r\n for (let i = ret.length - 1; i >= 0; i--) {\r\n const filename = ret[i].getFilename();\r\n if (excludeHelper_1.ExcludeHelper.isExcluded(filename, globalNoIssuesPatterns)) {\r\n ret.splice(i, 1);\r\n }\r\n }\r\n }\r\n // exclude issues, as now we know both the filename and issue key\r\n for (const rule of artifacts_rules_1.ArtifactsRules.getRules()) {\r\n const key = rule.getMetadata().key;\r\n const ruleExclude = (_a = this.reg.getConfig().readByKey(key, \"exclude\")) !== null && _a !== void 0 ? _a : [];\r\n if (ruleExclude.length === 0) {\r\n continue;\r\n }\r\n const ruleExcludePatterns = ruleExclude.map(x => new RegExp(x, \"i\"));\r\n for (let i = ret.length - 1; i >= 0; i--) {\r\n if (ret[i].getKey() !== key) {\r\n continue;\r\n }\r\n const filename = ret[i].getFilename();\r\n if (excludeHelper_1.ExcludeHelper.isExcluded(filename, ruleExcludePatterns)) {\r\n ret.splice(i, 1);\r\n }\r\n }\r\n }\r\n return ret;\r\n }\r\n}\r\nexports.RulesRunner = RulesRunner;\r\n//# sourceMappingURL=rules_runner.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules_runner.js?");
13176
+
13177
+ /***/ }),
13178
+
13168
13179
  /***/ "./node_modules/@abaplint/core/build/src/severity.js":
13169
13180
  /*!***********************************************************!*\
13170
13181
  !*** ./node_modules/@abaplint/core/build/src/severity.js ***!
@@ -6,21 +6,36 @@ class ApplyFixes {
6
6
  constructor() {
7
7
  this.changedFiles = new Set();
8
8
  }
9
- applyFixes(inputIssues, reg, fs, bar) {
10
- let changed = [];
9
+ // Strategy:
10
+ // Execute one rule at a time and apply fixes for that rule
11
+ // Some rules are quite expensive to initialize(like downport),
12
+ // so running all rules every time is expensive.
13
+ async applyFixes(reg, fs, bar) {
11
14
  let iteration = 1;
12
- let issues = inputIssues;
13
15
  this.changedFiles.clear();
14
16
  const MAX_ITERATIONS = 50000;
15
17
  bar === null || bar === void 0 ? void 0 : bar.set(MAX_ITERATIONS, "Apply Fixes");
18
+ const objects = new core_1.RulesRunner(reg).objectsToCheck(reg.getObjects());
19
+ const rules = reg.getConfig().getEnabledRules();
16
20
  while (iteration <= MAX_ITERATIONS) {
17
- bar === null || bar === void 0 ? void 0 : bar.tick("Apply Fixes, iteration " + iteration + ", " + issues.length + " candidates");
18
- changed = this.applyList(issues, reg);
19
- if (changed.length === 0) {
21
+ bar === null || bar === void 0 ? void 0 : bar.tick("Apply Fixes, iteration " + iteration);
22
+ let changed = 0;
23
+ for (const rule of rules) {
24
+ rule.initialize(reg);
25
+ const issues = [];
26
+ for (const obj of objects) {
27
+ issues.push(...rule.run(obj));
28
+ }
29
+ const appliedCount = this.applyList(issues, reg).length;
30
+ if (appliedCount > 0) {
31
+ changed += appliedCount;
32
+ reg.parse();
33
+ }
34
+ }
35
+ if (changed === 0) {
20
36
  break;
21
37
  }
22
38
  iteration++;
23
- issues = reg.parse().findIssues();
24
39
  }
25
40
  this.writeChangesToFS(fs, reg);
26
41
  // always end the progress indicator at 100%
@@ -28,8 +43,8 @@ class ApplyFixes {
28
43
  bar === null || bar === void 0 ? void 0 : bar.tick("Fixes Applied");
29
44
  iteration++;
30
45
  }
31
- return issues;
32
46
  }
47
+ ///////////////////////////////////////////////////
33
48
  writeChangesToFS(fs, reg) {
34
49
  for (const filename of this.changedFiles.values()) {
35
50
  const file = reg.getFileByName(filename);
@@ -186,7 +186,7 @@ async function run(arg) {
186
186
  }
187
187
  let extra = "";
188
188
  if (arg.runFix === true && reg) {
189
- issues = new fixes_1.ApplyFixes().applyFixes(issues, reg, fs, progress);
189
+ await new fixes_1.ApplyFixes().applyFixes(reg, fs, progress);
190
190
  extra = "Fixes applied";
191
191
  }
192
192
  else if (arg.runRename === true && reg) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.93.2",
3
+ "version": "2.93.3",
4
4
  "description": "abaplint - Command Line Interface",
5
5
  "bin": {
6
6
  "abaplint": "./abaplint"
@@ -39,12 +39,12 @@
39
39
  },
40
40
  "homepage": "https://abaplint.org",
41
41
  "devDependencies": {
42
- "@abaplint/core": "^2.93.2",
42
+ "@abaplint/core": "^2.93.3",
43
43
  "@types/chai": "^4.3.3",
44
44
  "@types/glob": "^7.2.0",
45
45
  "@types/minimist": "^1.2.2",
46
46
  "@types/mocha": "^9.1.1",
47
- "@types/node": "^18.7.13",
47
+ "@types/node": "^18.7.14",
48
48
  "@types/progress": "^2.0.5",
49
49
  "chai": "^4.3.6",
50
50
  "chalk": "^5.0.1",