mirror of
https://github.com/sasjs/lint.git
synced 2026-01-19 02:00:05 +00:00
fix(hasMacroNameInMend): default sets to true
This commit is contained in:
@@ -7,7 +7,7 @@
|
|||||||
"lowerCaseFileNames": true,
|
"lowerCaseFileNames": true,
|
||||||
"noTabIndentation": true,
|
"noTabIndentation": true,
|
||||||
"indentationMultiple": 2,
|
"indentationMultiple": 2,
|
||||||
"hasMacroNameInMend": false,
|
"hasMacroNameInMend": true,
|
||||||
"noNestedMacros": true,
|
"noNestedMacros": true,
|
||||||
"hasMacroParentheses": true
|
"hasMacroParentheses": true
|
||||||
}
|
}
|
||||||
@@ -8,7 +8,7 @@ describe('lintFile', () => {
|
|||||||
path.join(__dirname, '..', 'Example File.sas')
|
path.join(__dirname, '..', 'Example File.sas')
|
||||||
)
|
)
|
||||||
|
|
||||||
expect(results.length).toEqual(8)
|
expect(results.length).toEqual(9)
|
||||||
expect(results).toContainEqual({
|
expect(results).toContainEqual({
|
||||||
message: 'Line contains trailing spaces',
|
message: 'Line contains trailing spaces',
|
||||||
lineNumber: 1,
|
lineNumber: 1,
|
||||||
@@ -65,5 +65,12 @@ describe('lintFile', () => {
|
|||||||
endColumnNumber: 1,
|
endColumnNumber: 1,
|
||||||
severity: Severity.Warning
|
severity: Severity.Warning
|
||||||
})
|
})
|
||||||
|
expect(results).toContainEqual({
|
||||||
|
message: '%mend statement is missing macro name - mf_getuniquelibref',
|
||||||
|
lineNumber: 17,
|
||||||
|
startColumnNumber: 3,
|
||||||
|
endColumnNumber: 9,
|
||||||
|
severity: 1
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ describe('lintFolder', () => {
|
|||||||
const diagnostics = results.get(
|
const diagnostics = results.get(
|
||||||
path.join(__dirname, '..', 'Example File.sas')
|
path.join(__dirname, '..', 'Example File.sas')
|
||||||
)!
|
)!
|
||||||
expect(diagnostics.length).toEqual(8)
|
expect(diagnostics.length).toEqual(9)
|
||||||
expect(diagnostics).toContainEqual({
|
expect(diagnostics).toContainEqual({
|
||||||
message: 'Line contains trailing spaces',
|
message: 'Line contains trailing spaces',
|
||||||
lineNumber: 1,
|
lineNumber: 1,
|
||||||
@@ -67,5 +67,12 @@ describe('lintFolder', () => {
|
|||||||
endColumnNumber: 1,
|
endColumnNumber: 1,
|
||||||
severity: Severity.Warning
|
severity: Severity.Warning
|
||||||
})
|
})
|
||||||
|
expect(diagnostics).toContainEqual({
|
||||||
|
message: '%mend statement is missing macro name - mf_getuniquelibref',
|
||||||
|
lineNumber: 17,
|
||||||
|
startColumnNumber: 3,
|
||||||
|
endColumnNumber: 9,
|
||||||
|
severity: 1
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ describe('lintProject', () => {
|
|||||||
const diagnostics = results.get(
|
const diagnostics = results.get(
|
||||||
path.join(__dirname, '..', 'Example File.sas')
|
path.join(__dirname, '..', 'Example File.sas')
|
||||||
)!
|
)!
|
||||||
expect(diagnostics.length).toEqual(8)
|
expect(diagnostics.length).toEqual(9)
|
||||||
expect(diagnostics).toContainEqual({
|
expect(diagnostics).toContainEqual({
|
||||||
message: 'Line contains trailing spaces',
|
message: 'Line contains trailing spaces',
|
||||||
lineNumber: 1,
|
lineNumber: 1,
|
||||||
@@ -72,6 +72,13 @@ describe('lintProject', () => {
|
|||||||
endColumnNumber: 1,
|
endColumnNumber: 1,
|
||||||
severity: Severity.Warning
|
severity: Severity.Warning
|
||||||
})
|
})
|
||||||
|
expect(diagnostics).toContainEqual({
|
||||||
|
message: '%mend statement is missing macro name - mf_getuniquelibref',
|
||||||
|
lineNumber: 17,
|
||||||
|
startColumnNumber: 3,
|
||||||
|
endColumnNumber: 9,
|
||||||
|
severity: 1
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
it('should throw an error when a project root is not found', async () => {
|
it('should throw an error when a project root is not found', async () => {
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ describe('getLintConfig', () => {
|
|||||||
const config = await getLintConfig()
|
const config = await getLintConfig()
|
||||||
|
|
||||||
expect(config).toBeInstanceOf(LintConfig)
|
expect(config).toBeInstanceOf(LintConfig)
|
||||||
expect(config.fileLintRules.length).toEqual(3)
|
expect(config.fileLintRules.length).toEqual(4)
|
||||||
expect(config.lineLintRules.length).toEqual(5)
|
expect(config.lineLintRules.length).toEqual(5)
|
||||||
expect(config.pathLintRules.length).toEqual(2)
|
expect(config.pathLintRules.length).toEqual(2)
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ export const DefaultLintConfiguration = {
|
|||||||
maxLineLength: 80,
|
maxLineLength: 80,
|
||||||
noTabIndentation: true,
|
noTabIndentation: true,
|
||||||
indentationMultiple: 2,
|
indentationMultiple: 2,
|
||||||
hasMacroNameInMend: false,
|
hasMacroNameInMend: true,
|
||||||
noNestedMacros: true,
|
noNestedMacros: true,
|
||||||
hasMacroParentheses: true
|
hasMacroParentheses: true
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user