Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1285,6 +1285,38 @@
"description": "Show regular expressions in completion list.",
"order": 20
},
"dotnet.backgroundAnalysis.analyzerDiagnosticsScope": {
"type": "string",
"enum": [
"openFiles",
"fullSolution",
"none"
],
"default": "openFiles",
"enumDescriptions": [
"Open documents",
"Entire solution",
"None"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would have loved the descriptions and the enum member names to match :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These match the enum field names and user facing descriptions in VS. I think it would be reasonable to change the enum field names in Roslyn, and once the new values flow into this repo, we can rename the field names here as well. However, these are just internal implementation details, so not sure if it critical to make these changes.

],
"description": "Run background code analysis for:",
"order": 30
},
"dotnet.backgroundAnalysis.compilerDiagnosticsScope": {
"type": "string",
"enum": [
"openFiles",
"fullSolution",
"none"
],
"default": "openFiles",
"enumDescriptions": [
"Open documents",
"Entire solution",
"None"
],
"description": "Show compiler errors and warnings for:",
"order": 30
},
"dotnet.highlighting.highlightRelatedRegexComponents": {
"type": "boolean",
"default": "true",
Expand Down
20 changes: 20 additions & 0 deletions test/unitTests/lspToolHost/configurationMiddleware.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,26 @@ const testData = [
vsCodeConfiguration: 'codeStyle.formatting.newLine.insertFinalNewline',
declareInPackageJson: false,
},
{
serverOption: 'csharp|background_analysis.dotnet_analyzer_diagnostics_scope',
vsCodeConfiguration: 'dotnet.backgroundAnalysis.analyzerDiagnosticsScope',
declareInPackageJson: true,
},
{
serverOption: 'mystery_language|background_analysis.dotnet_analyzer_diagnostics_scope',
vsCodeConfiguration: null,
declareInPackageJson: false,
},
{
serverOption: 'csharp|background_analysis.dotnet_compiler_diagnostics_scope',
vsCodeConfiguration: 'dotnet.backgroundAnalysis.compilerDiagnosticsScope',
declareInPackageJson: true,
},
{
serverOption: 'mystery_language|background_analysis.dotnet_compiler_diagnostics_scope',
vsCodeConfiguration: null,
declareInPackageJson: false,
},
];

suite('Server option name to vscode configuration name test', () => {
Expand Down