Merge branch 'dev' of ssh://gitlab.prod.dtstack.cn:10022/dt-insight-front/infrastructure/dt-sql-parser into dev

This commit is contained in:
Erindcl 2020-12-30 10:40:17 +08:00
commit 996d875167
5 changed files with 49 additions and 6 deletions

45
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,45 @@
# Read more: https://docs.gitlab.com/12.7/ee/ci/yaml/README.html
cache:
paths:
- .yarn
- node_modules/
before_script:
- yarn install --cache-folder .yarn
stages:
- static-checking
- type-checking
- test
- build
static-checking:
stage: static-checking
script:
- yarn eslint
only:
- merge_requests
- dev
type-checking:
stage: type-checking
script:
- yarn check-types
only:
- merge_requests
- dev
test:
stage: test
script:
- yarn test
only:
- merge_requests
- dev
build:
stage: build
script:
- yarn build
only:
- dev

View File

@ -15,10 +15,10 @@
"main": "dist/index.js",
"scripts": {
"antlr4": "node build/antlr4.js",
"build": "npm test && rm -rf dist && tsc",
"build": "rm -rf dist && tsc",
"eslint": "eslint ./src/**/*.ts",
"check-types": "tsc --skipLibCheck",
"test": "jest --coverage"
"test": "jest"
},
"author": "dt-insight-front",
"license": "ISC",

View File

@ -10,6 +10,7 @@ describe('PLSQL Listener Tests', () => {
test('Listener enterTableName', async () => {
let result = '';
class MyListener extends PlSqlParserListener {
// eslint-disable-next-line camelcase
enterTable_ref_list(ctx): void {
result = ctx.getText().toLowerCase();
}

View File

@ -10,6 +10,7 @@ describe('PLSQL Visitor Tests', () => {
test('Visitor visitTable_ref_list', () => {
let result = '';
class MyVisitor extends PlSqlParserVisitor {
// eslint-disable-next-line camelcase
visitTable_ref_list(ctx): void {
result = ctx.getText().toLowerCase();
super.visitTable_ref_list(ctx);

View File

@ -17,10 +17,6 @@
"include": [
"./src/**/*"
],
"exclude": [
"./src/peg/*",
"./src/jison/*"
],
"typeAcquisition": {
"include": [
"jest"