From c56887d6e6160c128d36de0483db625e28c72798 Mon Sep 17 00:00:00 2001 From: Saad Jutt Date: Thu, 15 Apr 2021 16:33:31 +0500 Subject: [PATCH 1/4] fix(hasMacroNameInMend): default sets to true --- .sasjslint | 2 +- src/lint/lintFile.spec.ts | 9 ++++++++- src/lint/lintFolder.spec.ts | 9 ++++++++- src/lint/lintProject.spec.ts | 9 ++++++++- src/utils/getLintConfig.spec.ts | 2 +- src/utils/getLintConfig.ts | 2 +- 6 files changed, 27 insertions(+), 6 deletions(-) diff --git a/.sasjslint b/.sasjslint index 2d6a33f..1d5ba7c 100644 --- a/.sasjslint +++ b/.sasjslint @@ -7,7 +7,7 @@ "lowerCaseFileNames": true, "noTabIndentation": true, "indentationMultiple": 2, - "hasMacroNameInMend": false, + "hasMacroNameInMend": true, "noNestedMacros": true, "hasMacroParentheses": true } \ No newline at end of file diff --git a/src/lint/lintFile.spec.ts b/src/lint/lintFile.spec.ts index a7de9ef..96a2af1 100644 --- a/src/lint/lintFile.spec.ts +++ b/src/lint/lintFile.spec.ts @@ -8,7 +8,7 @@ describe('lintFile', () => { path.join(__dirname, '..', 'Example File.sas') ) - expect(results.length).toEqual(8) + expect(results.length).toEqual(9) expect(results).toContainEqual({ message: 'Line contains trailing spaces', lineNumber: 1, @@ -65,5 +65,12 @@ describe('lintFile', () => { endColumnNumber: 1, severity: Severity.Warning }) + expect(results).toContainEqual({ + message: '%mend statement is missing macro name - mf_getuniquelibref', + lineNumber: 17, + startColumnNumber: 3, + endColumnNumber: 9, + severity: 1 + }) }) }) diff --git a/src/lint/lintFolder.spec.ts b/src/lint/lintFolder.spec.ts index 7124d3e..6cde363 100644 --- a/src/lint/lintFolder.spec.ts +++ b/src/lint/lintFolder.spec.ts @@ -10,7 +10,7 @@ describe('lintFolder', () => { const diagnostics = results.get( path.join(__dirname, '..', 'Example File.sas') )! - expect(diagnostics.length).toEqual(8) + expect(diagnostics.length).toEqual(9) expect(diagnostics).toContainEqual({ message: 'Line contains trailing spaces', lineNumber: 1, @@ -67,5 +67,12 @@ describe('lintFolder', () => { endColumnNumber: 1, severity: Severity.Warning }) + expect(diagnostics).toContainEqual({ + message: '%mend statement is missing macro name - mf_getuniquelibref', + lineNumber: 17, + startColumnNumber: 3, + endColumnNumber: 9, + severity: 1 + }) }) }) diff --git a/src/lint/lintProject.spec.ts b/src/lint/lintProject.spec.ts index 3a0b200..223c88e 100644 --- a/src/lint/lintProject.spec.ts +++ b/src/lint/lintProject.spec.ts @@ -15,7 +15,7 @@ describe('lintProject', () => { const diagnostics = results.get( path.join(__dirname, '..', 'Example File.sas') )! - expect(diagnostics.length).toEqual(8) + expect(diagnostics.length).toEqual(9) expect(diagnostics).toContainEqual({ message: 'Line contains trailing spaces', lineNumber: 1, @@ -72,6 +72,13 @@ describe('lintProject', () => { endColumnNumber: 1, 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 () => { diff --git a/src/utils/getLintConfig.spec.ts b/src/utils/getLintConfig.spec.ts index 1ea0d94..f59570d 100644 --- a/src/utils/getLintConfig.spec.ts +++ b/src/utils/getLintConfig.spec.ts @@ -17,7 +17,7 @@ describe('getLintConfig', () => { const config = await getLintConfig() expect(config).toBeInstanceOf(LintConfig) - expect(config.fileLintRules.length).toEqual(3) + expect(config.fileLintRules.length).toEqual(4) expect(config.lineLintRules.length).toEqual(5) expect(config.pathLintRules.length).toEqual(2) }) diff --git a/src/utils/getLintConfig.ts b/src/utils/getLintConfig.ts index 43df7c4..69b179e 100644 --- a/src/utils/getLintConfig.ts +++ b/src/utils/getLintConfig.ts @@ -15,7 +15,7 @@ export const DefaultLintConfiguration = { maxLineLength: 80, noTabIndentation: true, indentationMultiple: 2, - hasMacroNameInMend: false, + hasMacroNameInMend: true, noNestedMacros: true, hasMacroParentheses: true } From 36b3a7f319a1dd641871533bf04bbd5d2081990a Mon Sep 17 00:00:00 2001 From: Saad Jutt Date: Thu, 15 Apr 2021 20:45:27 +0500 Subject: [PATCH 2/4] chore(tests): changed numeric literals -> consts --- src/lint/lintFile.spec.ts | 4 +++- src/lint/lintFolder.spec.ts | 7 +++++-- src/lint/lintProject.spec.ts | 7 +++++-- src/utils/getLintConfig.spec.ts | 10 +++++++--- 4 files changed, 20 insertions(+), 8 deletions(-) diff --git a/src/lint/lintFile.spec.ts b/src/lint/lintFile.spec.ts index 96a2af1..1658e43 100644 --- a/src/lint/lintFile.spec.ts +++ b/src/lint/lintFile.spec.ts @@ -2,13 +2,15 @@ import { lintFile } from './lintFile' import { Severity } from '../types/Severity' import path from 'path' +const expectedDiagnosticsCount = 9 + describe('lintFile', () => { it('should identify lint issues in a given file', async () => { const results = await lintFile( path.join(__dirname, '..', 'Example File.sas') ) - expect(results.length).toEqual(9) + expect(results.length).toEqual(expectedDiagnosticsCount) expect(results).toContainEqual({ message: 'Line contains trailing spaces', lineNumber: 1, diff --git a/src/lint/lintFolder.spec.ts b/src/lint/lintFolder.spec.ts index 6cde363..ae5dae4 100644 --- a/src/lint/lintFolder.spec.ts +++ b/src/lint/lintFolder.spec.ts @@ -2,15 +2,18 @@ import { lintFolder } from './lintFolder' import { Severity } from '../types/Severity' import path from 'path' +const expectedFilesCount = 1 +const expectedDiagnosticsCount = 9 + describe('lintFolder', () => { it('should identify lint issues in a given folder', async () => { const results = await lintFolder(path.join(__dirname, '..')) - expect(results.size).toEqual(1) + expect(results.size).toEqual(expectedFilesCount) const diagnostics = results.get( path.join(__dirname, '..', 'Example File.sas') )! - expect(diagnostics.length).toEqual(9) + expect(diagnostics.length).toEqual(expectedDiagnosticsCount) expect(diagnostics).toContainEqual({ message: 'Line contains trailing spaces', lineNumber: 1, diff --git a/src/lint/lintProject.spec.ts b/src/lint/lintProject.spec.ts index 223c88e..4544be5 100644 --- a/src/lint/lintProject.spec.ts +++ b/src/lint/lintProject.spec.ts @@ -4,6 +4,9 @@ import * as utils from '../utils' import path from 'path' jest.mock('../utils') +const expectedFilesCount = 1 +const expectedDiagnosticsCount = 9 + describe('lintProject', () => { it('should identify lint issues in a given project', async () => { jest @@ -11,11 +14,11 @@ describe('lintProject', () => { .mockImplementationOnce(() => Promise.resolve(path.join(__dirname, '..'))) const results = await lintProject() - expect(results.size).toEqual(1) + expect(results.size).toEqual(expectedFilesCount) const diagnostics = results.get( path.join(__dirname, '..', 'Example File.sas') )! - expect(diagnostics.length).toEqual(9) + expect(diagnostics.length).toEqual(expectedDiagnosticsCount) expect(diagnostics).toContainEqual({ message: 'Line contains trailing spaces', lineNumber: 1, diff --git a/src/utils/getLintConfig.spec.ts b/src/utils/getLintConfig.spec.ts index f59570d..5ada859 100644 --- a/src/utils/getLintConfig.spec.ts +++ b/src/utils/getLintConfig.spec.ts @@ -2,6 +2,10 @@ import * as fileModule from '@sasjs/utils/file' import { LintConfig } from '../types/LintConfig' import { getLintConfig } from './getLintConfig' +const expectedFileLintRulesCount = 4 +const expectedLineLintRulesCount = 5 +const expectedPathLintRulesCount = 2 + describe('getLintConfig', () => { it('should get the lint config', async () => { const config = await getLintConfig() @@ -17,8 +21,8 @@ describe('getLintConfig', () => { const config = await getLintConfig() expect(config).toBeInstanceOf(LintConfig) - expect(config.fileLintRules.length).toEqual(4) - expect(config.lineLintRules.length).toEqual(5) - expect(config.pathLintRules.length).toEqual(2) + expect(config.fileLintRules.length).toEqual(expectedFileLintRulesCount) + expect(config.lineLintRules.length).toEqual(expectedLineLintRulesCount) + expect(config.pathLintRules.length).toEqual(expectedPathLintRulesCount) }) }) From 1402802f0aec69a3e94273e4c404ffff80b43fc6 Mon Sep 17 00:00:00 2001 From: Saad Jutt Date: Fri, 16 Apr 2021 16:16:22 +0500 Subject: [PATCH 3/4] tests: added expectedDiagnostics array --- src/lint/lintFile.spec.ts | 140 +++++++++++++++++++---------------- src/lint/lintFolder.spec.ts | 140 +++++++++++++++++++---------------- src/lint/lintProject.spec.ts | 140 +++++++++++++++++++---------------- 3 files changed, 225 insertions(+), 195 deletions(-) diff --git a/src/lint/lintFile.spec.ts b/src/lint/lintFile.spec.ts index 1658e43..5754d8b 100644 --- a/src/lint/lintFile.spec.ts +++ b/src/lint/lintFile.spec.ts @@ -2,7 +2,71 @@ import { lintFile } from './lintFile' import { Severity } from '../types/Severity' import path from 'path' -const expectedDiagnosticsCount = 9 +const expectedDiagnostics = [ + { + message: 'Line contains trailing spaces', + lineNumber: 1, + startColumnNumber: 1, + endColumnNumber: 2, + severity: Severity.Warning + }, + { + message: 'Line contains trailing spaces', + lineNumber: 2, + startColumnNumber: 1, + endColumnNumber: 2, + severity: Severity.Warning + }, + { + message: 'File name contains spaces', + lineNumber: 1, + startColumnNumber: 1, + endColumnNumber: 1, + severity: Severity.Warning + }, + { + message: 'File name contains uppercase characters', + lineNumber: 1, + startColumnNumber: 1, + endColumnNumber: 1, + severity: Severity.Warning + }, + { + message: 'File missing Doxygen header', + lineNumber: 1, + startColumnNumber: 1, + endColumnNumber: 1, + severity: Severity.Warning + }, + { + message: 'Line contains encoded password', + lineNumber: 5, + startColumnNumber: 10, + endColumnNumber: 18, + severity: Severity.Error + }, + { + message: 'Line is indented with a tab', + lineNumber: 7, + startColumnNumber: 1, + endColumnNumber: 1, + severity: Severity.Warning + }, + { + message: 'Line has incorrect indentation - 3 spaces', + lineNumber: 6, + startColumnNumber: 1, + endColumnNumber: 1, + severity: Severity.Warning + }, + { + message: '%mend statement is missing macro name - mf_getuniquelibref', + lineNumber: 17, + startColumnNumber: 3, + endColumnNumber: 9, + severity: 1 + } +] describe('lintFile', () => { it('should identify lint issues in a given file', async () => { @@ -10,69 +74,15 @@ describe('lintFile', () => { path.join(__dirname, '..', 'Example File.sas') ) - expect(results.length).toEqual(expectedDiagnosticsCount) - expect(results).toContainEqual({ - message: 'Line contains trailing spaces', - lineNumber: 1, - startColumnNumber: 1, - endColumnNumber: 2, - severity: Severity.Warning - }) - expect(results).toContainEqual({ - message: 'Line contains trailing spaces', - lineNumber: 2, - startColumnNumber: 1, - endColumnNumber: 2, - severity: Severity.Warning - }) - expect(results).toContainEqual({ - message: 'File name contains spaces', - lineNumber: 1, - startColumnNumber: 1, - endColumnNumber: 1, - severity: Severity.Warning - }) - expect(results).toContainEqual({ - message: 'File name contains uppercase characters', - lineNumber: 1, - startColumnNumber: 1, - endColumnNumber: 1, - severity: Severity.Warning - }) - expect(results).toContainEqual({ - message: 'File missing Doxygen header', - lineNumber: 1, - startColumnNumber: 1, - endColumnNumber: 1, - severity: Severity.Warning - }) - expect(results).toContainEqual({ - message: 'Line contains encoded password', - lineNumber: 5, - startColumnNumber: 10, - endColumnNumber: 18, - severity: Severity.Error - }) - expect(results).toContainEqual({ - message: 'Line is indented with a tab', - lineNumber: 7, - startColumnNumber: 1, - endColumnNumber: 1, - severity: Severity.Warning - }) - expect(results).toContainEqual({ - message: 'Line has incorrect indentation - 3 spaces', - lineNumber: 6, - startColumnNumber: 1, - endColumnNumber: 1, - severity: Severity.Warning - }) - expect(results).toContainEqual({ - message: '%mend statement is missing macro name - mf_getuniquelibref', - lineNumber: 17, - startColumnNumber: 3, - endColumnNumber: 9, - severity: 1 - }) + expect(results.length).toEqual(expectedDiagnostics.length) + expect(results).toContainEqual(expectedDiagnostics[0]) + expect(results).toContainEqual(expectedDiagnostics[1]) + expect(results).toContainEqual(expectedDiagnostics[2]) + expect(results).toContainEqual(expectedDiagnostics[3]) + expect(results).toContainEqual(expectedDiagnostics[4]) + expect(results).toContainEqual(expectedDiagnostics[5]) + expect(results).toContainEqual(expectedDiagnostics[6]) + expect(results).toContainEqual(expectedDiagnostics[7]) + expect(results).toContainEqual(expectedDiagnostics[8]) }) }) diff --git a/src/lint/lintFolder.spec.ts b/src/lint/lintFolder.spec.ts index ae5dae4..4368b22 100644 --- a/src/lint/lintFolder.spec.ts +++ b/src/lint/lintFolder.spec.ts @@ -3,7 +3,71 @@ import { Severity } from '../types/Severity' import path from 'path' const expectedFilesCount = 1 -const expectedDiagnosticsCount = 9 +const expectedDiagnostics = [ + { + message: 'Line contains trailing spaces', + lineNumber: 1, + startColumnNumber: 1, + endColumnNumber: 2, + severity: Severity.Warning + }, + { + message: 'Line contains trailing spaces', + lineNumber: 2, + startColumnNumber: 1, + endColumnNumber: 2, + severity: Severity.Warning + }, + { + message: 'File name contains spaces', + lineNumber: 1, + startColumnNumber: 1, + endColumnNumber: 1, + severity: Severity.Warning + }, + { + message: 'File name contains uppercase characters', + lineNumber: 1, + startColumnNumber: 1, + endColumnNumber: 1, + severity: Severity.Warning + }, + { + message: 'File missing Doxygen header', + lineNumber: 1, + startColumnNumber: 1, + endColumnNumber: 1, + severity: Severity.Warning + }, + { + message: 'Line contains encoded password', + lineNumber: 5, + startColumnNumber: 10, + endColumnNumber: 18, + severity: Severity.Error + }, + { + message: 'Line is indented with a tab', + lineNumber: 7, + startColumnNumber: 1, + endColumnNumber: 1, + severity: Severity.Warning + }, + { + message: 'Line has incorrect indentation - 3 spaces', + lineNumber: 6, + startColumnNumber: 1, + endColumnNumber: 1, + severity: Severity.Warning + }, + { + message: '%mend statement is missing macro name - mf_getuniquelibref', + lineNumber: 17, + startColumnNumber: 3, + endColumnNumber: 9, + severity: 1 + } +] describe('lintFolder', () => { it('should identify lint issues in a given folder', async () => { @@ -13,69 +77,15 @@ describe('lintFolder', () => { const diagnostics = results.get( path.join(__dirname, '..', 'Example File.sas') )! - expect(diagnostics.length).toEqual(expectedDiagnosticsCount) - expect(diagnostics).toContainEqual({ - message: 'Line contains trailing spaces', - lineNumber: 1, - startColumnNumber: 1, - endColumnNumber: 2, - severity: Severity.Warning - }) - expect(diagnostics).toContainEqual({ - message: 'Line contains trailing spaces', - lineNumber: 2, - startColumnNumber: 1, - endColumnNumber: 2, - severity: Severity.Warning - }) - expect(diagnostics).toContainEqual({ - message: 'File name contains spaces', - lineNumber: 1, - startColumnNumber: 1, - endColumnNumber: 1, - severity: Severity.Warning - }) - expect(diagnostics).toContainEqual({ - message: 'File name contains uppercase characters', - lineNumber: 1, - startColumnNumber: 1, - endColumnNumber: 1, - severity: Severity.Warning - }) - expect(diagnostics).toContainEqual({ - message: 'File missing Doxygen header', - lineNumber: 1, - startColumnNumber: 1, - endColumnNumber: 1, - severity: Severity.Warning - }) - expect(diagnostics).toContainEqual({ - message: 'Line contains encoded password', - lineNumber: 5, - startColumnNumber: 10, - endColumnNumber: 18, - severity: Severity.Error - }) - expect(diagnostics).toContainEqual({ - message: 'Line is indented with a tab', - lineNumber: 7, - startColumnNumber: 1, - endColumnNumber: 1, - severity: Severity.Warning - }) - expect(diagnostics).toContainEqual({ - message: 'Line has incorrect indentation - 3 spaces', - lineNumber: 6, - startColumnNumber: 1, - endColumnNumber: 1, - severity: Severity.Warning - }) - expect(diagnostics).toContainEqual({ - message: '%mend statement is missing macro name - mf_getuniquelibref', - lineNumber: 17, - startColumnNumber: 3, - endColumnNumber: 9, - severity: 1 - }) + expect(diagnostics.length).toEqual(expectedDiagnostics.length) + expect(diagnostics).toContainEqual(expectedDiagnostics[0]) + expect(diagnostics).toContainEqual(expectedDiagnostics[1]) + expect(diagnostics).toContainEqual(expectedDiagnostics[2]) + expect(diagnostics).toContainEqual(expectedDiagnostics[3]) + expect(diagnostics).toContainEqual(expectedDiagnostics[4]) + expect(diagnostics).toContainEqual(expectedDiagnostics[5]) + expect(diagnostics).toContainEqual(expectedDiagnostics[6]) + expect(diagnostics).toContainEqual(expectedDiagnostics[7]) + expect(diagnostics).toContainEqual(expectedDiagnostics[8]) }) }) diff --git a/src/lint/lintProject.spec.ts b/src/lint/lintProject.spec.ts index 4544be5..de261b6 100644 --- a/src/lint/lintProject.spec.ts +++ b/src/lint/lintProject.spec.ts @@ -5,7 +5,71 @@ import path from 'path' jest.mock('../utils') const expectedFilesCount = 1 -const expectedDiagnosticsCount = 9 +const expectedDiagnostics = [ + { + message: 'Line contains trailing spaces', + lineNumber: 1, + startColumnNumber: 1, + endColumnNumber: 2, + severity: Severity.Warning + }, + { + message: 'Line contains trailing spaces', + lineNumber: 2, + startColumnNumber: 1, + endColumnNumber: 2, + severity: Severity.Warning + }, + { + message: 'File name contains spaces', + lineNumber: 1, + startColumnNumber: 1, + endColumnNumber: 1, + severity: Severity.Warning + }, + { + message: 'File name contains uppercase characters', + lineNumber: 1, + startColumnNumber: 1, + endColumnNumber: 1, + severity: Severity.Warning + }, + { + message: 'File missing Doxygen header', + lineNumber: 1, + startColumnNumber: 1, + endColumnNumber: 1, + severity: Severity.Warning + }, + { + message: 'Line contains encoded password', + lineNumber: 5, + startColumnNumber: 10, + endColumnNumber: 18, + severity: Severity.Error + }, + { + message: 'Line is indented with a tab', + lineNumber: 7, + startColumnNumber: 1, + endColumnNumber: 1, + severity: Severity.Warning + }, + { + message: 'Line has incorrect indentation - 3 spaces', + lineNumber: 6, + startColumnNumber: 1, + endColumnNumber: 1, + severity: Severity.Warning + }, + { + message: '%mend statement is missing macro name - mf_getuniquelibref', + lineNumber: 17, + startColumnNumber: 3, + endColumnNumber: 9, + severity: 1 + } +] describe('lintProject', () => { it('should identify lint issues in a given project', async () => { @@ -18,70 +82,16 @@ describe('lintProject', () => { const diagnostics = results.get( path.join(__dirname, '..', 'Example File.sas') )! - expect(diagnostics.length).toEqual(expectedDiagnosticsCount) - expect(diagnostics).toContainEqual({ - message: 'Line contains trailing spaces', - lineNumber: 1, - startColumnNumber: 1, - endColumnNumber: 2, - severity: Severity.Warning - }) - expect(diagnostics).toContainEqual({ - message: 'Line contains trailing spaces', - lineNumber: 2, - startColumnNumber: 1, - endColumnNumber: 2, - severity: Severity.Warning - }) - expect(diagnostics).toContainEqual({ - message: 'File name contains spaces', - lineNumber: 1, - startColumnNumber: 1, - endColumnNumber: 1, - severity: Severity.Warning - }) - expect(diagnostics).toContainEqual({ - message: 'File name contains uppercase characters', - lineNumber: 1, - startColumnNumber: 1, - endColumnNumber: 1, - severity: Severity.Warning - }) - expect(diagnostics).toContainEqual({ - message: 'File missing Doxygen header', - lineNumber: 1, - startColumnNumber: 1, - endColumnNumber: 1, - severity: Severity.Warning - }) - expect(diagnostics).toContainEqual({ - message: 'Line contains encoded password', - lineNumber: 5, - startColumnNumber: 10, - endColumnNumber: 18, - severity: Severity.Error - }) - expect(diagnostics).toContainEqual({ - message: 'Line is indented with a tab', - lineNumber: 7, - startColumnNumber: 1, - endColumnNumber: 1, - severity: Severity.Warning - }) - expect(diagnostics).toContainEqual({ - message: 'Line has incorrect indentation - 3 spaces', - lineNumber: 6, - startColumnNumber: 1, - endColumnNumber: 1, - severity: Severity.Warning - }) - expect(diagnostics).toContainEqual({ - message: '%mend statement is missing macro name - mf_getuniquelibref', - lineNumber: 17, - startColumnNumber: 3, - endColumnNumber: 9, - severity: 1 - }) + expect(diagnostics.length).toEqual(expectedDiagnostics.length) + expect(diagnostics).toContainEqual(expectedDiagnostics[0]) + expect(diagnostics).toContainEqual(expectedDiagnostics[1]) + expect(diagnostics).toContainEqual(expectedDiagnostics[2]) + expect(diagnostics).toContainEqual(expectedDiagnostics[3]) + expect(diagnostics).toContainEqual(expectedDiagnostics[4]) + expect(diagnostics).toContainEqual(expectedDiagnostics[5]) + expect(diagnostics).toContainEqual(expectedDiagnostics[6]) + expect(diagnostics).toContainEqual(expectedDiagnostics[7]) + expect(diagnostics).toContainEqual(expectedDiagnostics[8]) }) it('should throw an error when a project root is not found', async () => { From fe974050f715fa720a06789fe67d27c2e99aa45c Mon Sep 17 00:00:00 2001 From: Saad Jutt Date: Fri, 16 Apr 2021 16:20:02 +0500 Subject: [PATCH 4/4] chore: replaced with Severity.Warning --- src/lint/lintFile.spec.ts | 2 +- src/lint/lintFolder.spec.ts | 2 +- src/lint/lintProject.spec.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lint/lintFile.spec.ts b/src/lint/lintFile.spec.ts index 5754d8b..69bbad5 100644 --- a/src/lint/lintFile.spec.ts +++ b/src/lint/lintFile.spec.ts @@ -64,7 +64,7 @@ const expectedDiagnostics = [ lineNumber: 17, startColumnNumber: 3, endColumnNumber: 9, - severity: 1 + severity: Severity.Warning } ] diff --git a/src/lint/lintFolder.spec.ts b/src/lint/lintFolder.spec.ts index 4368b22..69938fd 100644 --- a/src/lint/lintFolder.spec.ts +++ b/src/lint/lintFolder.spec.ts @@ -65,7 +65,7 @@ const expectedDiagnostics = [ lineNumber: 17, startColumnNumber: 3, endColumnNumber: 9, - severity: 1 + severity: Severity.Warning } ] diff --git a/src/lint/lintProject.spec.ts b/src/lint/lintProject.spec.ts index de261b6..47e09d9 100644 --- a/src/lint/lintProject.spec.ts +++ b/src/lint/lintProject.spec.ts @@ -67,7 +67,7 @@ const expectedDiagnostics = [ lineNumber: 17, startColumnNumber: 3, endColumnNumber: 9, - severity: 1 + severity: Severity.Warning } ]