1
0
mirror of https://github.com/sasjs/lint.git synced 2026-01-10 05:50:05 +00:00

chore(*): rename macro properties

This commit is contained in:
Krishna Acondy
2021-04-21 15:10:28 +01:00
parent 060b838f21
commit abc2f75dc0
4 changed files with 38 additions and 40 deletions

View File

@@ -24,8 +24,7 @@ const test = (value: string, config?: LintConfig) => {
lineNumber: macro.endLineNumber,
startColumnNumber: getColumnNumber(endLine, '%mend'),
endColumnNumber:
getColumnNumber(endLine, '%mend') +
macro.terminationTrimmedStatement.length,
getColumnNumber(endLine, '%mend') + macro.termination.length,
severity: Severity.Warning
})
} else if (macro.endLineNumber === null && macro.startLineNumber !== null) {
@@ -79,8 +78,7 @@ const fix = (value: string, config?: LintConfig): string => {
const endLine = lines[macro.endLineNumber - 1]
const startColumnNumber = getColumnNumber(endLine, '%mend')
const endColumnNumber =
getColumnNumber(endLine, '%mend') +
macro.terminationTrimmedStatement.length
getColumnNumber(endLine, '%mend') + macro.termination.length
const beforeStatement = endLine.slice(0, startColumnNumber - 1)
const afterStatement = endLine.slice(endColumnNumber)