mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
turn on noUnusedParameters in Schema Compare (#22452)
* turn on noUnusedParameters in Schema Compare * use _click * Add names to unused parameters in test files
This commit is contained in:
@@ -736,7 +736,7 @@ export class SchemaCompareMainWindow {
|
|||||||
title: loc.compare
|
title: loc.compare
|
||||||
}).component();
|
}).component();
|
||||||
|
|
||||||
this.compareButton.onDidClick(async (click) => {
|
this.compareButton.onDidClick(async (_click) => {
|
||||||
await this.startCompare();
|
await this.startCompare();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -751,7 +751,7 @@ export class SchemaCompareMainWindow {
|
|||||||
title: loc.stop
|
title: loc.stop
|
||||||
}).component();
|
}).component();
|
||||||
|
|
||||||
this.cancelCompareButton.onDidClick(async (click) => {
|
this.cancelCompareButton.onDidClick(async (_click) => {
|
||||||
await this.cancelCompare();
|
await this.cancelCompare();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -806,7 +806,7 @@ export class SchemaCompareMainWindow {
|
|||||||
},
|
},
|
||||||
}).component();
|
}).component();
|
||||||
|
|
||||||
this.generateScriptButton.onDidClick(async (click) => {
|
this.generateScriptButton.onDidClick(async (_click) => {
|
||||||
await this.generateScript();
|
await this.generateScript();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -843,7 +843,7 @@ export class SchemaCompareMainWindow {
|
|||||||
title: loc.options
|
title: loc.options
|
||||||
}).component();
|
}).component();
|
||||||
|
|
||||||
this.optionsButton.onDidClick(async (click) => {
|
this.optionsButton.onDidClick(async (_click) => {
|
||||||
TelemetryReporter.sendActionEvent(TelemetryViews.SchemaCompareMainWindow, 'SchemaCompareOptionsOpened');
|
TelemetryReporter.sendActionEvent(TelemetryViews.SchemaCompareMainWindow, 'SchemaCompareOptionsOpened');
|
||||||
// create fresh every time
|
// create fresh every time
|
||||||
this.schemaCompareOptionDialog = new SchemaCompareOptionsDialog(this.deploymentOptions, this);
|
this.schemaCompareOptionDialog = new SchemaCompareOptionsDialog(this.deploymentOptions, this);
|
||||||
@@ -861,7 +861,7 @@ export class SchemaCompareMainWindow {
|
|||||||
},
|
},
|
||||||
}).component();
|
}).component();
|
||||||
|
|
||||||
this.applyButton.onDidClick(async (click) => {
|
this.applyButton.onDidClick(async (_click) => {
|
||||||
await this.publishChanges();
|
await this.publishChanges();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -998,7 +998,7 @@ export class SchemaCompareMainWindow {
|
|||||||
title: loc.switchDirectionDescription
|
title: loc.switchDirectionDescription
|
||||||
}).component();
|
}).component();
|
||||||
|
|
||||||
this.switchButton.onDidClick(async (click) => {
|
this.switchButton.onDidClick(async (_click) => {
|
||||||
TelemetryReporter.sendActionEvent(TelemetryViews.SchemaCompareMainWindow, 'SchemaCompareSwitch');
|
TelemetryReporter.sendActionEvent(TelemetryViews.SchemaCompareMainWindow, 'SchemaCompareSwitch');
|
||||||
// switch source and target
|
// switch source and target
|
||||||
[this.sourceEndpointInfo, this.targetEndpointInfo] = [this.targetEndpointInfo, this.sourceEndpointInfo];
|
[this.sourceEndpointInfo, this.targetEndpointInfo] = [this.targetEndpointInfo, this.sourceEndpointInfo];
|
||||||
@@ -1032,7 +1032,7 @@ export class SchemaCompareMainWindow {
|
|||||||
secondary: true
|
secondary: true
|
||||||
}).component();
|
}).component();
|
||||||
|
|
||||||
this.selectSourceButton.onDidClick(async () => {
|
this.selectSourceButton.onDidClick(async (_click) => {
|
||||||
TelemetryReporter.sendActionEvent(TelemetryViews.SchemaCompareMainWindow, 'SchemaCompareSelectSource');
|
TelemetryReporter.sendActionEvent(TelemetryViews.SchemaCompareMainWindow, 'SchemaCompareSelectSource');
|
||||||
this.schemaCompareDialog = new SchemaCompareDialog(this, undefined, this.extensionContext);
|
this.schemaCompareDialog = new SchemaCompareDialog(this, undefined, this.extensionContext);
|
||||||
this.promise = this.schemaCompareDialog.openDialog();
|
this.promise = this.schemaCompareDialog.openDialog();
|
||||||
@@ -1046,7 +1046,7 @@ export class SchemaCompareMainWindow {
|
|||||||
secondary: true
|
secondary: true
|
||||||
}).component();
|
}).component();
|
||||||
|
|
||||||
this.selectTargetButton.onDidClick(async () => {
|
this.selectTargetButton.onDidClick(async (_click) => {
|
||||||
TelemetryReporter.sendActionEvent(TelemetryViews.SchemaCompareMainWindow, 'SchemaCompareSelectTarget');
|
TelemetryReporter.sendActionEvent(TelemetryViews.SchemaCompareMainWindow, 'SchemaCompareSelectTarget');
|
||||||
this.schemaCompareDialog = new SchemaCompareDialog(this, undefined, this.extensionContext);
|
this.schemaCompareDialog = new SchemaCompareDialog(this, undefined, this.extensionContext);
|
||||||
this.promise = await this.schemaCompareDialog.openDialog();
|
this.promise = await this.schemaCompareDialog.openDialog();
|
||||||
@@ -1064,7 +1064,7 @@ export class SchemaCompareMainWindow {
|
|||||||
title: loc.openScmpDescription
|
title: loc.openScmpDescription
|
||||||
}).component();
|
}).component();
|
||||||
|
|
||||||
this.openScmpButton.onDidClick(async (click) => {
|
this.openScmpButton.onDidClick(async (_click) => {
|
||||||
await this.openScmp();
|
await this.openScmp();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -1180,7 +1180,7 @@ export class SchemaCompareMainWindow {
|
|||||||
enabled: false
|
enabled: false
|
||||||
}).component();
|
}).component();
|
||||||
|
|
||||||
this.saveScmpButton.onDidClick(async (click) => {
|
this.saveScmpButton.onDidClick(async (_click) => {
|
||||||
await this.saveScmp();
|
await this.saveScmp();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -363,7 +363,7 @@ describe('SchemaCompareMainWindow.results @DacFx@', function (): void {
|
|||||||
function createServiceMock() {
|
function createServiceMock() {
|
||||||
let sc = new SchemaCompareTestService(testStateScmp.SUCCESS_NOT_EQUAL);
|
let sc = new SchemaCompareTestService(testStateScmp.SUCCESS_NOT_EQUAL);
|
||||||
let service = TypeMoq.Mock.ofInstance(new SchemaCompareTestService());
|
let service = TypeMoq.Mock.ofInstance(new SchemaCompareTestService());
|
||||||
service.setup(x => x.schemaCompareGetDefaultOptions()).returns(x => sc.schemaCompareGetDefaultOptions());
|
service.setup(x => x.schemaCompareGetDefaultOptions()).returns(() => sc.schemaCompareGetDefaultOptions());
|
||||||
service.setup(x => x.schemaCompare(TypeMoq.It.isAny(), TypeMoq.It.isAny(), TypeMoq.It.isAny(), TypeMoq.It.isAny(), TypeMoq.It.isAny())).returns(() => sc.schemaCompare('', undefined, undefined, undefined, undefined));
|
service.setup(x => x.schemaCompare(TypeMoq.It.isAny(), TypeMoq.It.isAny(), TypeMoq.It.isAny(), TypeMoq.It.isAny(), TypeMoq.It.isAny())).returns(() => sc.schemaCompare('', undefined, undefined, undefined, undefined));
|
||||||
return service;
|
return service;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -295,7 +295,7 @@ export function createViewContext(): ViewTestContext {
|
|||||||
columns: [] as string[],
|
columns: [] as string[],
|
||||||
onRowSelected: onClick.event,
|
onRowSelected: onClick.event,
|
||||||
onCellAction: onClick.event,
|
onCellAction: onClick.event,
|
||||||
appendData: (data: any[][]) => undefined
|
appendData: (_data: any[][]) => undefined
|
||||||
});
|
});
|
||||||
let tableBuilder: azdata.ComponentBuilder<azdata.TableComponent, azdata.TableComponentProperties> = {
|
let tableBuilder: azdata.ComponentBuilder<azdata.TableComponent, azdata.TableComponentProperties> = {
|
||||||
component: () => table(),
|
component: () => table(),
|
||||||
|
|||||||
@@ -20,11 +20,11 @@ export class SchemaCompareTestService implements mssql.ISchemaCompareService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
schemaComparePublishDatabaseChanges(operationId: string, targetServerName: string, targetDatabaseName: string, taskExecutionMode: azdata.TaskExecutionMode): Thenable<azdata.ResultStatus> {
|
schemaComparePublishDatabaseChanges(_operationId: string, _targetServerName: string, _targetDatabaseName: string, _taskExecutionMode: azdata.TaskExecutionMode): Thenable<azdata.ResultStatus> {
|
||||||
throw new Error('Method not implemented.');
|
throw new Error('Method not implemented.');
|
||||||
}
|
}
|
||||||
|
|
||||||
schemaComparePublishProjectChanges(operationId: string, targetProjectPath: string, targetFolderStructure: mssql.ExtractTarget, taskExecutionMode: azdata.TaskExecutionMode): Thenable<mssql.SchemaComparePublishProjectResult> {
|
schemaComparePublishProjectChanges(_operationId: string, _targetProjectPath: string, _targetFolderStructure: mssql.ExtractTarget, _taskExecutionMode: azdata.TaskExecutionMode): Thenable<mssql.SchemaComparePublishProjectResult> {
|
||||||
throw new Error('Method not implemented.');
|
throw new Error('Method not implemented.');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -38,19 +38,19 @@ export class SchemaCompareTestService implements mssql.ISchemaCompareService {
|
|||||||
return Promise.resolve(result);
|
return Promise.resolve(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
schemaCompareIncludeExcludeNode(operationId: string, diffEntry: mssql.DiffEntry, IncludeRequest: boolean, taskExecutionMode: azdata.TaskExecutionMode): Thenable<mssql.SchemaCompareIncludeExcludeResult> {
|
schemaCompareIncludeExcludeNode(_operationId: string, _diffEntry: mssql.DiffEntry, _IncludeRequest: boolean, _taskExecutionMode: azdata.TaskExecutionMode): Thenable<mssql.SchemaCompareIncludeExcludeResult> {
|
||||||
throw new Error('Method not implemented.');
|
throw new Error('Method not implemented.');
|
||||||
}
|
}
|
||||||
|
|
||||||
schemaCompareOpenScmp(filePath: string): Thenable<mssql.SchemaCompareOpenScmpResult> {
|
schemaCompareOpenScmp(_filePath: string): Thenable<mssql.SchemaCompareOpenScmpResult> {
|
||||||
throw new Error('Method not implemented.');
|
throw new Error('Method not implemented.');
|
||||||
}
|
}
|
||||||
|
|
||||||
schemaCompareSaveScmp(sourceEndpointInfo: mssql.SchemaCompareEndpointInfo, targetEndpointInfo: mssql.SchemaCompareEndpointInfo, taskExecutionMode: azdata.TaskExecutionMode, deploymentOptions: mssql.DeploymentOptions, scmpFilePath: string, excludedSourceObjects: mssql.SchemaCompareObjectId[], excludedTargetObjects: mssql.SchemaCompareObjectId[]): Thenable<azdata.ResultStatus> {
|
schemaCompareSaveScmp(_sourceEndpointInfo: mssql.SchemaCompareEndpointInfo, _targetEndpointInfo: mssql.SchemaCompareEndpointInfo, _taskExecutionMode: azdata.TaskExecutionMode, _deploymentOptions: mssql.DeploymentOptions, _scmpFilePath: string, _excludedSourceObjects: mssql.SchemaCompareObjectId[], _excludedTargetObjects: mssql.SchemaCompareObjectId[]): Thenable<azdata.ResultStatus> {
|
||||||
throw new Error('Method not implemented.');
|
throw new Error('Method not implemented.');
|
||||||
}
|
}
|
||||||
|
|
||||||
schemaCompare(operationId: string, sourceEndpointInfo: mssql.SchemaCompareEndpointInfo, targetEndpointInfo: mssql.SchemaCompareEndpointInfo, taskExecutionMode: azdata.TaskExecutionMode, deploymentOptions: mssql.DeploymentOptions): Thenable<mssql.SchemaCompareResult> {
|
schemaCompare(_operationId: string, _sourceEndpointInfo: mssql.SchemaCompareEndpointInfo, _targetEndpointInfo: mssql.SchemaCompareEndpointInfo, _taskExecutionMode: azdata.TaskExecutionMode, _deploymentOptions: mssql.DeploymentOptions): Thenable<mssql.SchemaCompareResult> {
|
||||||
let result: mssql.SchemaCompareResult;
|
let result: mssql.SchemaCompareResult;
|
||||||
if (this.testState === testStateScmp.FAILURE) {
|
if (this.testState === testStateScmp.FAILURE) {
|
||||||
result = {
|
result = {
|
||||||
@@ -105,7 +105,7 @@ export class SchemaCompareTestService implements mssql.ISchemaCompareService {
|
|||||||
return Promise.resolve(result);
|
return Promise.resolve(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
schemaCompareGenerateScript(operationId: string, targetServerName: string, targetDatabaseName: string, taskExecutionMode: azdata.TaskExecutionMode): Thenable<azdata.ResultStatus> {
|
schemaCompareGenerateScript(_operationId: string, _targetServerName: string, _targetDatabaseName: string, _taskExecutionMode: azdata.TaskExecutionMode): Thenable<azdata.ResultStatus> {
|
||||||
let result: azdata.ResultStatus;
|
let result: azdata.ResultStatus;
|
||||||
if (this.testState === testStateScmp.FAILURE) {
|
if (this.testState === testStateScmp.FAILURE) {
|
||||||
result = {
|
result = {
|
||||||
@@ -123,7 +123,7 @@ export class SchemaCompareTestService implements mssql.ISchemaCompareService {
|
|||||||
return Promise.resolve(result);
|
return Promise.resolve(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
schemaCompareCancel(operationId: string): Thenable<azdata.ResultStatus> {
|
schemaCompareCancel(_operationId: string): Thenable<azdata.ResultStatus> {
|
||||||
let result: azdata.ResultStatus;
|
let result: azdata.ResultStatus;
|
||||||
if (this.testState === testStateScmp.FAILURE) {
|
if (this.testState === testStateScmp.FAILURE) {
|
||||||
result = {
|
result = {
|
||||||
@@ -144,7 +144,7 @@ export class SchemaCompareTestService implements mssql.ISchemaCompareService {
|
|||||||
handle?: number;
|
handle?: number;
|
||||||
readonly providerId: string = 'MSSQL';
|
readonly providerId: string = 'MSSQL';
|
||||||
|
|
||||||
registerOnUpdated(handler: () => any): void {
|
registerOnUpdated(_handler: () => any): void {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,6 @@
|
|||||||
"declaration": false,
|
"declaration": false,
|
||||||
"strict": false,
|
"strict": false,
|
||||||
"noImplicitAny": false,
|
"noImplicitAny": false,
|
||||||
"noUnusedParameters": false,
|
|
||||||
"noImplicitReturns": false,
|
"noImplicitReturns": false,
|
||||||
"noUnusedLocals": false,
|
"noUnusedLocals": false,
|
||||||
"strictNullChecks": false
|
"strictNullChecks": false
|
||||||
|
|||||||
Reference in New Issue
Block a user