Skip to content

Commit 5c90e5f

Browse files
committed
Formatting, naming consistency.
1 parent 256890f commit 5c90e5f

File tree

7 files changed

+15
-15
lines changed

7 files changed

+15
-15
lines changed

extensions/ql-vscode/src/interface-types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ export enum SortDirection {
117117

118118
export interface RawResultsSortState {
119119
columnIndex: number;
120-
direction: SortDirection;
120+
sortDirection: SortDirection;
121121
}
122122

123123
export type InterpretedResultsSortColumn =

extensions/ql-vscode/src/query-results.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ export class CompletedQuery implements QueryWithResults {
113113
sortState
114114
};
115115

116-
await server.sortBqrs(this.query.resultsPaths.resultsPath, sortedResultSetInfo.resultsPath, resultSetName, [sortState.columnIndex], [sortState.direction]);
116+
await server.sortBqrs(this.query.resultsPaths.resultsPath, sortedResultSetInfo.resultsPath, resultSetName, [sortState.columnIndex], [sortState.sortDirection]);
117117
this.sortedResultsInfo.set(resultSetName, sortedResultSetInfo);
118118
}
119119

extensions/ql-vscode/src/view/raw-results-table.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export class RawTable extends React.Component<RawTableProps, {}> {
5454
<th key={-1}><b>#</b></th>,
5555
...resultSet.schema.columns.map((col, index) => {
5656
const displayName = col.name || `[${index}]`;
57-
const sortDirection = this.props.sortState && index === this.props.sortState.columnIndex ? this.props.sortState.direction : undefined;
57+
const sortDirection = this.props.sortState && index === this.props.sortState.columnIndex ? this.props.sortState.sortDirection : undefined;
5858
return <th className={"sort-" + (sortDirection !== undefined ? SortDirection[sortDirection] : "none")} key={index} onClick={() => this.toggleSortStateForColumn(index)}><b>{displayName}</b></th>;
5959
})
6060
]
@@ -69,11 +69,11 @@ export class RawTable extends React.Component<RawTableProps, {}> {
6969

7070
private toggleSortStateForColumn(index: number) {
7171
const sortState = this.props.sortState;
72-
const prevDirection = sortState && sortState.columnIndex === index ? sortState.direction : undefined;
72+
const prevDirection = sortState && sortState.columnIndex === index ? sortState.sortDirection : undefined;
7373
const nextDirection = nextSortDirection(prevDirection);
7474
const nextSortState = nextDirection === undefined ? undefined : {
7575
columnIndex: index,
76-
direction: nextDirection
76+
sortDirection: nextDirection
7777
};
7878
vscode.postMessage({
7979
t: 'changeSort',

extensions/ql-vscode/src/vscode-tests/minimal-workspace/activation.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ describe('launching with a minimal workspace', async () => {
1010
it('should not activate the extension at first', () => {
1111
assert(ext!.isActive === false);
1212
});
13-
it('should activate the extension when a .ql file is opened', async function () {
13+
it('should activate the extension when a .ql file is opened', async function() {
1414
const folders = vscode.workspace.workspaceFolders;
1515
assert(folders && folders.length === 1);
1616
const folderPath = folders![0].uri.fsPath;

extensions/ql-vscode/src/vscode-tests/no-workspace/archive-filesystem-provider.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ describe("archive filesystem provider", () => {
1414
});
1515
});
1616

17-
describe('source archive uri encoding', function () {
17+
describe('source archive uri encoding', function() {
1818
const testCases: { name: string, input: ZipFileReference }[] = [
1919
{
2020
name: 'mixed case and unicode',
@@ -30,7 +30,7 @@ describe('source archive uri encoding', function () {
3030
}
3131
];
3232
for (const testCase of testCases) {
33-
it(`should work round trip with ${testCase.name}`, function () {
33+
it(`should work round trip with ${testCase.name}`, function() {
3434
const output = decodeSourceArchiveUri(encodeSourceArchiveUri(testCase.input));
3535
expect(output).to.eql(testCase.input);
3636
});

extensions/ql-vscode/src/vscode-tests/no-workspace/distribution.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,8 @@ describe("Release version ordering", () => {
151151
patchVersion,
152152
prereleaseVersion,
153153
rawString: `${majorVersion}.${minorVersion}.${patchVersion}` +
154-
prereleaseVersion ? `-${prereleaseVersion}` : "" +
155-
buildMetadata ? `+${buildMetadata}` : ""
154+
prereleaseVersion ? `-${prereleaseVersion}` : "" +
155+
buildMetadata ? `+${buildMetadata}` : ""
156156
};
157157
}
158158

extensions/ql-vscode/src/vscode-tests/no-workspace/webview-uri.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import * as tmp from "tmp";
44
import { window, ViewColumn, Uri } from "vscode";
55
import { fileUriToWebviewUri, webviewUriToFileUri } from '../../interface';
66

7-
describe('webview uri conversion', function () {
7+
describe('webview uri conversion', function() {
88
const fileSuffix = '.bqrs';
99

1010
function setupWebview(filePrefix: string) {
@@ -21,7 +21,7 @@ describe('webview uri conversion', function () {
2121
]
2222
}
2323
);
24-
after(function () {
24+
after(function() {
2525
panel.dispose();
2626
tmpFile.removeCallback();
2727
});
@@ -34,15 +34,15 @@ describe('webview uri conversion', function () {
3434
panel
3535
}
3636
}
37-
38-
it('should correctly round trip from filesystem to webview and back', function () {
37+
38+
it('should correctly round trip from filesystem to webview and back', function() {
3939
const { fileUriOnDisk, panel } = setupWebview('');
4040
const webviewUri = fileUriToWebviewUri(panel, fileUriOnDisk);
4141
const reconstructedFileUri = webviewUriToFileUri(webviewUri);
4242
expect(reconstructedFileUri.toString(true)).to.equal(fileUriOnDisk.toString(true));
4343
});
4444

45-
it("does not double-encode # in URIs", function () {
45+
it("does not double-encode # in URIs", function() {
4646
const { fileUriOnDisk, panel } = setupWebview('#');
4747
const webviewUri = fileUriToWebviewUri(panel, fileUriOnDisk);
4848
const parsedUri = Uri.parse(webviewUri);

0 commit comments

Comments
 (0)