Skip to content

Commit d36fcd0

Browse files
committed
Address feedback and also fix linting issues
1 parent a9da5de commit d36fcd0

File tree

2 files changed

+11
-17
lines changed

2 files changed

+11
-17
lines changed

src/lsptoolshost/optionNameConverter.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,7 @@ export function convertServerOptionNameToClientConfigurationName(section: string
2929
const prefixes = ['dotnet', 'csharp'];
3030
const optionNamePrefix = getPrefix(optionName, prefixes);
3131

32-
let featureName = optionNamePrefix == '' ? optionName: optionName.substring(optionNamePrefix.length + 1);
33-
34-
// Handle special case for background analysis option: we want to avoid
35-
// 'solution crawler' terminology in the user facing VSCode option.
36-
if (featureName =="solution_crawler_background_analysis_scope") {
37-
featureName = "analyzer_diagnostics_scope";
38-
}
32+
const featureName = optionNamePrefix == '' ? optionName : optionName.substring(optionNamePrefix.length + 1);
3933

4034
// Finally, convert everything to camel case and put them together.
4135
const camelCaseGroupName = convertToCamelCase(optionGroupName, '_');

test/unitTests/lspToolHost/configurationMiddleware.test.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -190,24 +190,24 @@ const testData = [
190190
declareInPackageJson: false,
191191
},
192192
{
193-
serverOption: "csharp|background_analysis.dotnet_solution_crawler_background_analysis_scope",
194-
vsCodeConfiguration: "dotnet.backgroundAnalysis.analyzerDiagnosticsScope",
195-
declareInPackageJson: true
193+
serverOption: 'csharp|background_analysis.dotnet_analyzer_diagnostics_scope',
194+
vsCodeConfiguration: 'dotnet.backgroundAnalysis.analyzerDiagnosticsScope',
195+
declareInPackageJson: true,
196196
},
197197
{
198-
serverOption: "mystery_language|background_analysis.dotnet_solution_crawler_background_analysis_scope",
198+
serverOption: 'mystery_language|background_analysis.dotnet_analyzer_diagnostics_scope',
199199
vsCodeConfiguration: null,
200-
declareInPackageJson: false
200+
declareInPackageJson: false,
201201
},
202202
{
203-
serverOption: "csharp|background_analysis.dotnet_compiler_diagnostics_scope",
204-
vsCodeConfiguration: "dotnet.backgroundAnalysis.compilerDiagnosticsScope",
205-
declareInPackageJson: true
203+
serverOption: 'csharp|background_analysis.dotnet_compiler_diagnostics_scope',
204+
vsCodeConfiguration: 'dotnet.backgroundAnalysis.compilerDiagnosticsScope',
205+
declareInPackageJson: true,
206206
},
207207
{
208-
serverOption: "mystery_language|background_analysis.dotnet_compiler_diagnostics_scope",
208+
serverOption: 'mystery_language|background_analysis.dotnet_compiler_diagnostics_scope',
209209
vsCodeConfiguration: null,
210-
declareInPackageJson: false
210+
declareInPackageJson: false,
211211
},
212212
];
213213

0 commit comments

Comments
 (0)