1
0
mirror of https://github.com/sasjs/lint.git synced 2025-12-11 01:44:36 +00:00

chore: quick fix

This commit is contained in:
2023-01-11 21:34:07 +05:00
parent 7a46e9857e
commit b5b8e7b00b
3 changed files with 8 additions and 6 deletions

View File

@@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: Install Dependencies - name: Install Dependencies
run: npm ci run: npm ci
- name: Check Code Style - name: Check Code Style
@@ -21,7 +21,7 @@ jobs:
- name: Build Project - name: Build Project
run: npm run build run: npm run build
- name: Semantic Release - name: Semantic Release
uses: cycjimmy/semantic-release-action@v2 uses: cycjimmy/semantic-release-action@v3
env: env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

View File

@@ -48,8 +48,8 @@ describe('getDataSectionsDetail', () => {
]) ])
}) })
it(`should return the detail of data section when it begins and ends with '${datalinesBeginPattern4}' and '${datalinesEndPattern1}' markers`, () => { it(`should return the detail of data section when it begins and ends with '${datalinesBeginPattern4}' and '${datalinesEndPattern2}' markers`, () => {
const text = `%put hello\n${datalinesBeginPattern4}\n${datalines}\n${datalinesEndPattern1}\n%put world;` const text = `%put hello\n${datalinesBeginPattern4}\n${datalines}\n${datalinesEndPattern2}\n%put world;`
expect(getDataSectionsDetail(text, config)).toEqual([ expect(getDataSectionsDetail(text, config)).toEqual([
{ {
start: 1, start: 1,

View File

@@ -11,10 +11,12 @@ export const getDataSectionsDetail = (text: string, config: LintConfig) => {
const lines = splitText(text, config) const lines = splitText(text, config)
const dataSectionStartRegex1 = new RegExp( const dataSectionStartRegex1 = new RegExp(
'^(datalines;)|(cards;)|(cards4;)|(parmcards;)' '^(datalines;)|(cards;)|(parmcards;)'
) )
const dataSectionEndRegex1 = new RegExp(';') const dataSectionEndRegex1 = new RegExp(';')
const dataSectionStartRegex2 = new RegExp('^(datalines4)|(parmcards4);') const dataSectionStartRegex2 = new RegExp(
'^(datalines4;)|(cards4;)|(parmcards4;)'
)
const dataSectionEndRegex2 = new RegExp(';;;;') const dataSectionEndRegex2 = new RegExp(';;;;')
let dataSectionStarted = false let dataSectionStarted = false