mirror of
https://github.com/sasjs/lint.git
synced 2025-12-10 17:34:36 +00:00
fix(*): add SAS Macros section to Doxygen header
This commit is contained in:
@@ -9,5 +9,5 @@ module.exports = {
|
||||
statements: -10
|
||||
}
|
||||
},
|
||||
collectCoverageFrom: ['src/**/{!(index|example),}.ts']
|
||||
collectCoverageFrom: ['src/**/{!(index|formatExample|lintExample),}.ts']
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ describe('formatText', () => {
|
||||
const expectedOutput = `/**
|
||||
@file
|
||||
@brief <Your brief here>
|
||||
<h4> SAS Macros </h4>
|
||||
**/\n%macro test
|
||||
%put 'hello';\n%mend test;\n`
|
||||
|
||||
@@ -39,7 +40,7 @@ describe('formatText', () => {
|
||||
)
|
||||
const text = `%macro test\n %put 'hello';\r\n%mend; `
|
||||
|
||||
const expectedOutput = `/**\r\n @file\r\n @brief <Your brief here>\r\n**/\r\n%macro test\r\n %put 'hello';\r\n%mend test;\r\n`
|
||||
const expectedOutput = `/**\r\n @file\r\n @brief <Your brief here>\r\n <h4> SAS Macros </h4>\r\n**/\r\n%macro test\r\n %put 'hello';\r\n%mend test;\r\n`
|
||||
|
||||
const output = await formatText(text)
|
||||
|
||||
|
||||
@@ -94,6 +94,7 @@ describe('hasDoxygenHeader', () => {
|
||||
`/**
|
||||
@file
|
||||
@brief <Your brief here>
|
||||
<h4> SAS Macros </h4>
|
||||
**/` +
|
||||
'\n' +
|
||||
content
|
||||
@@ -105,7 +106,9 @@ describe('hasDoxygenHeader', () => {
|
||||
const config = new LintConfig({ lineEndings: 'crlf' })
|
||||
|
||||
expect(hasDoxygenHeader.fix!(content, config)).toEqual(
|
||||
`/**\r\n @file\r\n @brief <Your brief here>\r\n**/` + '\r\n' + content
|
||||
`/**\r\n @file\r\n @brief <Your brief here>\r\n <h4> SAS Macros </h4>\r\n**/` +
|
||||
'\r\n' +
|
||||
content
|
||||
)
|
||||
})
|
||||
})
|
||||
|
||||
@@ -4,7 +4,7 @@ import { FileLintRule } from '../../types/LintRule'
|
||||
import { LintRuleType } from '../../types/LintRuleType'
|
||||
import { Severity } from '../../types/Severity'
|
||||
|
||||
const DoxygenHeader = `/**{lineEnding} @file{lineEnding} @brief <Your brief here>{lineEnding}**/`
|
||||
const DoxygenHeader = `/**{lineEnding} @file{lineEnding} @brief <Your brief here>{lineEnding} <h4> SAS Macros </h4>{lineEnding}**/`
|
||||
|
||||
const name = 'hasDoxygenHeader'
|
||||
const description =
|
||||
|
||||
Reference in New Issue
Block a user