Skip to content

Commit

Permalink
ci: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaoge committed Aug 2, 2024
2 parents f810b12 + 1d9dc1c commit 4e71e0b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
21 changes: 11 additions & 10 deletions test/parser/postgresql/contextCollect/entityCollector.test.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
import { ParseTreeListener } from 'antlr4ng';
import fs from 'fs';
import path from 'path';
import { PostgreSqlParserListener } from 'src/lib/postgresql/PostgreSqlParserListener';
import {
PostgreSqlParserListener,
} from 'src/lib/postgresql/PostgreSqlParserListener';
import {
isCommonEntityContext,
isFuncEntityContext,
StmtContextType,
isCommonEntityContext,
isFuncEntityContext,
StmtContextType,
} from 'src/parser/common/entityCollector';
import { EntityContextType } from 'src/parser/common/types';
import {
PostgreSQL,
PostgreSqlEntityCollector,
PostgreSqlSplitListener,
PostgreSQL,
PostgreSqlEntityCollector,
PostgreSqlSplitListener,
} from 'src/parser/postgresql';

const commonSql = fs.readFileSync(path.join(__dirname, 'fixtures', 'common.sql'), 'utf-8');
Expand Down Expand Up @@ -151,7 +149,10 @@ describe('PostgreSql entity collector tests', () => {
expect(columEntity.entityContextType).toBe(EntityContextType.COLUMN_CREATE);
expect(columEntity.belongStmt).toBe(tableCreateEntity.belongStmt);
expect(columEntity.text).toBe(
commonSql.slice(columEntity.position.startIndex, columEntity.position.endIndex + 1)
commonSql.slice(
columEntity.position.startIndex,
columEntity.position.endIndex + 1
)
);
});
}
Expand Down
5 changes: 1 addition & 4 deletions test/parser/trino/suggestion/tokenSuggestion.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import fs from 'fs';
import path from 'path';
import {
CaretPosition,
EntityContextType,
} from 'src/parser/common/types';
import { CaretPosition, EntityContextType } from 'src/parser/common/types';
import { TrinoSQL } from 'src/parser/trino';
import { commentOtherLine } from 'test/helper';

Expand Down

0 comments on commit 4e71e0b

Please sign in to comment.