From 54ded5362c4724d48ef858c8c08367f69cc0a2af Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 4 Feb 2026 08:59:57 +0000 Subject: [PATCH 1/6] Initial plan From a8fb05a6750bf0c68917a7c5d089a92db7f3c95c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 4 Feb 2026 09:04:07 +0000 Subject: [PATCH 2/6] Add missing official keywords to EditorConfig schema Co-authored-by: madskristensen <1258877+madskristensen@users.noreply.github.com> --- src/Completion/CompletionSource.cs | 1 + src/Schema/Category.cs | 1 + src/Schema/EditorConfig.json | 39 ++++++++++++++++++++++++++++++ src/Schema/Keyword.cs | 3 +++ 4 files changed, 44 insertions(+) diff --git a/src/Completion/CompletionSource.cs b/src/Completion/CompletionSource.cs index 173603e4d0c..0475b43aa1b 100644 --- a/src/Completion/CompletionSource.cs +++ b/src/Completion/CompletionSource.cs @@ -350,6 +350,7 @@ private static void CreateCompletionSet(string moniker, IList com new(KnownMonikers.CSFileNode, "C# analysis rules (Alt + C)", "c", Category.CSharp.ToString()), new(KnownMonikers.DotNET, ".NET analysis rules (Alt + D)", "d", Category.DotNet.ToString()), new(KnownMonikers.VBFileNode, "VB.NET analysis rules (Alt + V)", "v", Category.VisualBasic.ToString()), + new(KnownMonikers.VisualStudio, "Visual Studio rules (Alt + U)", "u", Category.VisualStudio.ToString()), }; // Add dynamic filters for custom schemas diff --git a/src/Schema/Category.cs b/src/Schema/Category.cs index c238451c485..a4f2d153fa8 100644 --- a/src/Schema/Category.cs +++ b/src/Schema/Category.cs @@ -8,6 +8,7 @@ public enum Category DotNet, VisualBasic, CPP, + VisualStudio, Custom, } } diff --git a/src/Schema/EditorConfig.json b/src/Schema/EditorConfig.json index 1c16c7c9b03..9cd367e0141 100644 --- a/src/Schema/EditorConfig.json +++ b/src/Schema/EditorConfig.json @@ -1764,6 +1764,45 @@ "values": [ "one_liners", "all_one_line_scopes", "never" ], "defaultValue": [ "one_liners" ], "documentationLink": "https://learn.microsoft.com/en-us/visualstudio/ide/cpp-editorconfig-properties" + }, + { + "name": "cpp_include_cleanup_add_missing", + "description": "Add missing direct includes. Determines the suggestion level for adding missing direct includes (content is used but only available transitively).", + "values": [ "refactoring_only", "suggestion", "warning", "error" ], + "defaultValue": [ "suggestion" ], + "documentationLink": "https://learn.microsoft.com/en-us/cpp/ide/include-cleanup-config?view=msvc-170" + }, + { + "name": "cpp_include_cleanup_remove_unused", + "description": "Remove unused includes. Determines the suggestion level for removing unused includes (include is not used in the file).", + "values": [ "refactoring_only", "suggestion", "warning", "error" ], + "defaultValue": [ "suggestion" ], + "documentationLink": "https://learn.microsoft.com/en-us/cpp/ide/include-cleanup-config?view=msvc-170" + }, + { + "name": "cpp_include_cleanup_add_missing_error_tag_type", + "description": "Error tag type for missing direct includes. Sets the diagnostic level for VCIC001 messages about missing direct includes.", + "values": [ "refactoring_only", "suggestion", "warning", "error" ], + "defaultValue": [ "suggestion" ], + "documentationLink": "https://learn.microsoft.com/en-us/cpp/ide/include-cleanup-config?view=msvc-170" + }, + + // Visual Studio specific properties + { + "name": "spelling_languages", + "description": "Specifies which language dictionaries to use for spell checking. Comma-separated culture codes (e.g., 'en-us,fr-fr,de-de'). Requires Windows language packs.", + "values": [ "en-us", "fr-fr", "de-de", "es-es", "it-it", "pt-br", "ja-jp", "zh-cn", "zh-tw", "ko-kr" ], + "defaultValue": [ "en-us" ], + "multiple": true, + "documentationLink": "https://learn.microsoft.com/en-us/visualstudio/ide/text-spell-checker?view=visualstudio" + }, + { + "name": "spelling_checkable_types", + "description": "Specifies which code elements to include in spell checking. Comma-separated list of types: identifiers, comments, strings, plainText.", + "values": [ "identifiers", "comments", "strings", "plainText" ], + "defaultValue": [ "comments", "strings" ], + "multiple": true, + "documentationLink": "https://learn.microsoft.com/en-us/visualstudio/ide/text-spell-checker?view=visualstudio" } ] } diff --git a/src/Schema/Keyword.cs b/src/Schema/Keyword.cs index 1337c599293..8775e8b33c9 100644 --- a/src/Schema/Keyword.cs +++ b/src/Schema/Keyword.cs @@ -76,6 +76,8 @@ public Category Category return Category.VisualBasic; else if (Name.StartsWith("cpp_", StringComparison.OrdinalIgnoreCase)) return Category.CPP; + else if (Name.StartsWith("spelling_", StringComparison.OrdinalIgnoreCase)) + return Category.VisualStudio; else return Category.Standard; } @@ -101,6 +103,7 @@ public ImageMoniker Moniker Category.DotNet => KnownMonikers.DotNET, Category.VisualBasic => KnownMonikers.VBFileNode, Category.CPP => KnownMonikers.CPPFileNode, + Category.VisualStudio => KnownMonikers.VisualStudio, _ => KnownMonikers.Property, }; } From c111d0680b91f330a20a9cdf4463d283a18b7731 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 4 Feb 2026 09:05:23 +0000 Subject: [PATCH 3/6] Add tests for new official keywords Co-authored-by: madskristensen <1258877+madskristensen@users.noreply.github.com> --- Test/EditorConfigTest/SchemaCatalogTest.cs | 55 ++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/Test/EditorConfigTest/SchemaCatalogTest.cs b/Test/EditorConfigTest/SchemaCatalogTest.cs index cd631e9ad3f..2c460dbd774 100644 --- a/Test/EditorConfigTest/SchemaCatalogTest.cs +++ b/Test/EditorConfigTest/SchemaCatalogTest.cs @@ -131,5 +131,60 @@ public void Severities_ContainsExpectedValues() Assert.IsTrue(exists, $"Severity '{severityName}' should exist"); } } + + [TestMethod] + public void TryGetKeyword_SpellingLanguages_ReturnsTrue() + { + bool result = SchemaCatalog.TryGetKeyword("spelling_languages", out Keyword keyword); + + Assert.IsTrue(result); + Assert.IsNotNull(keyword); + Assert.AreEqual("spelling_languages", keyword.Name); + Assert.AreEqual(Category.VisualStudio, keyword.Category); + } + + [TestMethod] + public void TryGetKeyword_SpellingCheckableTypes_ReturnsTrue() + { + bool result = SchemaCatalog.TryGetKeyword("spelling_checkable_types", out Keyword keyword); + + Assert.IsTrue(result); + Assert.IsNotNull(keyword); + Assert.AreEqual("spelling_checkable_types", keyword.Name); + Assert.AreEqual(Category.VisualStudio, keyword.Category); + } + + [TestMethod] + public void TryGetKeyword_CppIncludeCleanupAddMissing_ReturnsTrue() + { + bool result = SchemaCatalog.TryGetKeyword("cpp_include_cleanup_add_missing", out Keyword keyword); + + Assert.IsTrue(result); + Assert.IsNotNull(keyword); + Assert.AreEqual("cpp_include_cleanup_add_missing", keyword.Name); + Assert.AreEqual(Category.CPP, keyword.Category); + } + + [TestMethod] + public void TryGetKeyword_CppIncludeCleanupRemoveUnused_ReturnsTrue() + { + bool result = SchemaCatalog.TryGetKeyword("cpp_include_cleanup_remove_unused", out Keyword keyword); + + Assert.IsTrue(result); + Assert.IsNotNull(keyword); + Assert.AreEqual("cpp_include_cleanup_remove_unused", keyword.Name); + Assert.AreEqual(Category.CPP, keyword.Category); + } + + [TestMethod] + public void TryGetKeyword_CppIncludeCleanupAddMissingErrorTagType_ReturnsTrue() + { + bool result = SchemaCatalog.TryGetKeyword("cpp_include_cleanup_add_missing_error_tag_type", out Keyword keyword); + + Assert.IsTrue(result); + Assert.IsNotNull(keyword); + Assert.AreEqual("cpp_include_cleanup_add_missing_error_tag_type", keyword.Name); + Assert.AreEqual(Category.CPP, keyword.Category); + } } } From 50c614642892a79d0cc8e204c2f34d6a32e58267 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 4 Feb 2026 09:06:21 +0000 Subject: [PATCH 4/6] Fix documentation links to include specific VS version Co-authored-by: madskristensen <1258877+madskristensen@users.noreply.github.com> --- src/Schema/EditorConfig.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Schema/EditorConfig.json b/src/Schema/EditorConfig.json index 9cd367e0141..555b2ebb588 100644 --- a/src/Schema/EditorConfig.json +++ b/src/Schema/EditorConfig.json @@ -1794,7 +1794,7 @@ "values": [ "en-us", "fr-fr", "de-de", "es-es", "it-it", "pt-br", "ja-jp", "zh-cn", "zh-tw", "ko-kr" ], "defaultValue": [ "en-us" ], "multiple": true, - "documentationLink": "https://learn.microsoft.com/en-us/visualstudio/ide/text-spell-checker?view=visualstudio" + "documentationLink": "https://learn.microsoft.com/en-us/visualstudio/ide/text-spell-checker?view=vs-2022" }, { "name": "spelling_checkable_types", @@ -1802,7 +1802,7 @@ "values": [ "identifiers", "comments", "strings", "plainText" ], "defaultValue": [ "comments", "strings" ], "multiple": true, - "documentationLink": "https://learn.microsoft.com/en-us/visualstudio/ide/text-spell-checker?view=visualstudio" + "documentationLink": "https://learn.microsoft.com/en-us/visualstudio/ide/text-spell-checker?view=vs-2022" } ] } From c80d94b15a27692f12bbee60925dd49db9f43d93 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 4 Feb 2026 09:12:24 +0000 Subject: [PATCH 5/6] Add all missing properties from Microsoft documentation Co-authored-by: madskristensen <1258877+madskristensen@users.noreply.github.com> --- Test/EditorConfigTest/SchemaCatalogTest.cs | 66 ++++++++++++++++++++++ src/Schema/EditorConfig.json | 46 +++++++++++++++ 2 files changed, 112 insertions(+) diff --git a/Test/EditorConfigTest/SchemaCatalogTest.cs b/Test/EditorConfigTest/SchemaCatalogTest.cs index 2c460dbd774..f9853ad269d 100644 --- a/Test/EditorConfigTest/SchemaCatalogTest.cs +++ b/Test/EditorConfigTest/SchemaCatalogTest.cs @@ -186,5 +186,71 @@ public void TryGetKeyword_CppIncludeCleanupAddMissingErrorTagType_ReturnsTrue() Assert.AreEqual("cpp_include_cleanup_add_missing_error_tag_type", keyword.Name); Assert.AreEqual(Category.CPP, keyword.Category); } + + [TestMethod] + public void TryGetKeyword_CppIncludeCleanupEnabled_ReturnsTrue() + { + bool result = SchemaCatalog.TryGetKeyword("cpp_include_cleanup_enabled", out Keyword keyword); + + Assert.IsTrue(result); + Assert.IsNotNull(keyword); + Assert.AreEqual("cpp_include_cleanup_enabled", keyword.Name); + Assert.AreEqual(Category.CPP, keyword.Category); + } + + [TestMethod] + public void TryGetKeyword_CppIncludeCleanupExcludedFiles_ReturnsTrue() + { + bool result = SchemaCatalog.TryGetKeyword("cpp_include_cleanup_excluded_files", out Keyword keyword); + + Assert.IsTrue(result); + Assert.IsNotNull(keyword); + Assert.AreEqual("cpp_include_cleanup_excluded_files", keyword.Name); + Assert.AreEqual(Category.CPP, keyword.Category); + } + + [TestMethod] + public void TryGetKeyword_CppIncludeCleanupRequiredFiles_ReturnsTrue() + { + bool result = SchemaCatalog.TryGetKeyword("cpp_include_cleanup_required_files", out Keyword keyword); + + Assert.IsTrue(result); + Assert.IsNotNull(keyword); + Assert.AreEqual("cpp_include_cleanup_required_files", keyword.Name); + Assert.AreEqual(Category.CPP, keyword.Category); + } + + [TestMethod] + public void TryGetKeyword_CppIncludeCleanupHeaderRemappings_ReturnsTrue() + { + bool result = SchemaCatalog.TryGetKeyword("cpp_include_cleanup_header_remappings", out Keyword keyword); + + Assert.IsTrue(result); + Assert.IsNotNull(keyword); + Assert.AreEqual("cpp_include_cleanup_header_remappings", keyword.Name); + Assert.AreEqual(Category.CPP, keyword.Category); + } + + [TestMethod] + public void TryGetKeyword_CppIncludeCleanupAlternateFiles_ReturnsTrue() + { + bool result = SchemaCatalog.TryGetKeyword("cpp_include_cleanup_alternate_files", out Keyword keyword); + + Assert.IsTrue(result); + Assert.IsNotNull(keyword); + Assert.AreEqual("cpp_include_cleanup_alternate_files", keyword.Name); + Assert.AreEqual(Category.CPP, keyword.Category); + } + + [TestMethod] + public void TryGetKeyword_SpellingExclusionPath_ReturnsTrue() + { + bool result = SchemaCatalog.TryGetKeyword("spelling_exclusion_path", out Keyword keyword); + + Assert.IsTrue(result); + Assert.IsNotNull(keyword); + Assert.AreEqual("spelling_exclusion_path", keyword.Name); + Assert.AreEqual(Category.VisualStudio, keyword.Category); + } } } diff --git a/src/Schema/EditorConfig.json b/src/Schema/EditorConfig.json index 555b2ebb588..f00892393b9 100644 --- a/src/Schema/EditorConfig.json +++ b/src/Schema/EditorConfig.json @@ -1765,6 +1765,13 @@ "defaultValue": [ "one_liners" ], "documentationLink": "https://learn.microsoft.com/en-us/visualstudio/ide/cpp-editorconfig-properties" }, + { + "name": "cpp_include_cleanup_enabled", + "description": "Controls whether include cleanup is enabled. Set to true to enable automatic detection of unused and missing includes.", + "values": [ true, false ], + "defaultValue": [ true ], + "documentationLink": "https://learn.microsoft.com/en-us/cpp/ide/include-cleanup-config?view=msvc-170" + }, { "name": "cpp_include_cleanup_add_missing", "description": "Add missing direct includes. Determines the suggestion level for adding missing direct includes (content is used but only available transitively).", @@ -1786,6 +1793,38 @@ "defaultValue": [ "suggestion" ], "documentationLink": "https://learn.microsoft.com/en-us/cpp/ide/include-cleanup-config?view=msvc-170" }, + { + "name": "cpp_include_cleanup_excluded_files", + "description": "Comma-separated list of header files to exclude from being marked as unused (e.g., 'io.h, windows.h'). Wildcards are not supported.", + "values": [ "" ], + "defaultValue": [ "" ], + "multiple": true, + "documentationLink": "https://learn.microsoft.com/en-us/cpp/ide/include-cleanup-config?view=msvc-170" + }, + { + "name": "cpp_include_cleanup_required_files", + "description": "Comma-separated list of header files which are always considered required, preventing them from being flagged as unused (e.g., 'mycompany/musthave.h').", + "values": [ "" ], + "defaultValue": [ "" ], + "multiple": true, + "documentationLink": "https://learn.microsoft.com/en-us/cpp/ide/include-cleanup-config?view=msvc-170" + }, + { + "name": "cpp_include_cleanup_header_remappings", + "description": "Defines header file remappings for suggesting alternative includes (e.g., 'corecrt_io.h=io.h').", + "values": [ "=" ], + "defaultValue": [ "" ], + "multiple": true, + "documentationLink": "https://learn.microsoft.com/en-us/cpp/ide/include-cleanup-config?view=msvc-170" + }, + { + "name": "cpp_include_cleanup_alternate_files", + "description": "Specifies alternative header files that should be suggested instead of the transitive include (e.g., '; ').", + "values": [ "" ], + "defaultValue": [ "" ], + "multiple": true, + "documentationLink": "https://learn.microsoft.com/en-us/cpp/ide/include-cleanup-config?view=msvc-170" + }, // Visual Studio specific properties { @@ -1803,6 +1842,13 @@ "defaultValue": [ "comments", "strings" ], "multiple": true, "documentationLink": "https://learn.microsoft.com/en-us/visualstudio/ide/text-spell-checker?view=vs-2022" + }, + { + "name": "spelling_exclusion_path", + "description": "Specifies a path to a custom dictionary file where ignored words are stored. When using 'Ignore', Visual Studio adds words to this file.", + "values": [ "" ], + "defaultValue": [ "" ], + "documentationLink": "https://learn.microsoft.com/en-us/visualstudio/ide/text-spell-checker?view=vs-2022" } ] } From d9c83da427585b0ac2071b3308e1a6a4d9a4e7d4 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 4 Feb 2026 09:18:16 +0000 Subject: [PATCH 6/6] Add missing spelling properties: spelling_use_default_exclusion_dictionary and spelling_error_severity Co-authored-by: madskristensen <1258877+madskristensen@users.noreply.github.com> --- Test/EditorConfigTest/SchemaCatalogTest.cs | 22 ++++++++++++++++++++++ src/Schema/EditorConfig.json | 14 ++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/Test/EditorConfigTest/SchemaCatalogTest.cs b/Test/EditorConfigTest/SchemaCatalogTest.cs index f9853ad269d..19c398e3b07 100644 --- a/Test/EditorConfigTest/SchemaCatalogTest.cs +++ b/Test/EditorConfigTest/SchemaCatalogTest.cs @@ -252,5 +252,27 @@ public void TryGetKeyword_SpellingExclusionPath_ReturnsTrue() Assert.AreEqual("spelling_exclusion_path", keyword.Name); Assert.AreEqual(Category.VisualStudio, keyword.Category); } + + [TestMethod] + public void TryGetKeyword_SpellingUseDefaultExclusionDictionary_ReturnsTrue() + { + bool result = SchemaCatalog.TryGetKeyword("spelling_use_default_exclusion_dictionary", out Keyword keyword); + + Assert.IsTrue(result); + Assert.IsNotNull(keyword); + Assert.AreEqual("spelling_use_default_exclusion_dictionary", keyword.Name); + Assert.AreEqual(Category.VisualStudio, keyword.Category); + } + + [TestMethod] + public void TryGetKeyword_SpellingErrorSeverity_ReturnsTrue() + { + bool result = SchemaCatalog.TryGetKeyword("spelling_error_severity", out Keyword keyword); + + Assert.IsTrue(result); + Assert.IsNotNull(keyword); + Assert.AreEqual("spelling_error_severity", keyword.Name); + Assert.AreEqual(Category.VisualStudio, keyword.Category); + } } } diff --git a/src/Schema/EditorConfig.json b/src/Schema/EditorConfig.json index f00892393b9..614d21bfbcd 100644 --- a/src/Schema/EditorConfig.json +++ b/src/Schema/EditorConfig.json @@ -1849,6 +1849,20 @@ "values": [ "" ], "defaultValue": [ "" ], "documentationLink": "https://learn.microsoft.com/en-us/visualstudio/ide/text-spell-checker?view=vs-2022" + }, + { + "name": "spelling_use_default_exclusion_dictionary", + "description": "Determines whether Visual Studio uses its built-in exclusion dictionary of common programming terms and identifiers. Set to false to use only custom exclusion files.", + "values": [ true, false ], + "defaultValue": [ true ], + "documentationLink": "https://learn.microsoft.com/en-us/visualstudio/ide/text-spell-checker?view=vs-2022" + }, + { + "name": "spelling_error_severity", + "description": "Sets the severity level for detected spelling errors in the editor.", + "values": [ "none", "information", "warning", "error" ], + "defaultValue": [ "information" ], + "documentationLink": "https://learn.microsoft.com/en-us/visualstudio/ide/text-spell-checker?view=vs-2022" } ] }