Skip to content

Commit 46cdb64

Browse files
committed
Minor update
Added note about needing to modify the project to include code analysis dictionaries for identifier spell checking.
1 parent b81c455 commit 46cdb64

3 files changed

Lines changed: 32 additions & 1 deletion

File tree

Docs/Content/ConfigOptions/CodeAnalysisDictionaries.aml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,26 @@ strings, XML content, attribute values, etc.). To be imported, the code analysi
88
project of the file being spell checked and must have its <ui>Build Action</ui> property set to
99
<codeInline>CodeAnalysisDictionary</codeInline>.</para>
1010

11+
<alert class="important">
12+
<para>For the code analysis dictionaries to be recognized by the code analyzer for use in spell checking
13+
identifiers, an additional step is required so that they are passed as additional files to the analyzers. Add
14+
the <codeInline>AdditionalFileItemNames</codeInline> property to a property group in each project in the solution
15+
and update it so that it includes all <codeInline>CodeAnalysisDictionary</codeInline> items as additional files
16+
as shown in the example below.</para>
17+
</alert>
18+
19+
<code language="xml" title="Specifying Code Analysis Dictionaries as Additional Files">
20+
&lt;PropertyGroup&gt;
21+
&lt;!-- Update the property to include all code analysis dictionary files --&gt;
22+
&lt;AdditionalFileItemNames&gt;$(AdditionalFileItemNames);CodeAnalysisDictionary&lt;/AdditionalFileItemNames&gt;
23+
&lt;/PropertyGroup&gt;
24+
</code>
1125
</introduction>
1226

1327
<section>
1428
<content>
29+
<para>The following options are available.</para>
30+
1531
<list class="bullet">
1632
<listItem>
1733
<para><ui>Import project code analysis dictionaries if present</ui> - This option is enabled by

Docs/Content/KnownIssues.aml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,14 @@ limitation with symbol renaming and I was unable to find a workaround. If anyon
3333
fix it, feel free to do so and submit a pull request with the changes.</para>
3434
</listItem>
3535

36+
<listItem>
37+
<para>Code analyzers are designed to work with source code. Unfortunately, the do not work well for
38+
updating non-code files or files outside of the project. As such, there are no fixes to allow adding a word
39+
in a misspelled identifier to ignored words files in the solution or project or the global configuration nor to
40+
the dictionary itself. If you want a word flagged by the code analyzer added to either of those files, you must
41+
do so manually or through the spell checker configuration editor.</para>
42+
</listItem>
43+
3644
<listItem>
3745
<para>The Spell Check Active Document tool window relies on the <ui>Spell check as you type</ui>
3846
configuration option being enabled. If disabled, spell checking will be unavailable until it is turned back on.

Source/VSSpellCheckerShared/Editors/Pages/CodeAnalysisDictionaryUserControl.xaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
44
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
55
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
6-
mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="500"
6+
mc:Ignorable="d" d:DesignHeight="350" d:DesignWidth="500"
77
Background="{DynamicResource ToolWindowBackgroundBrushKey}">
88
<UserControl.Resources>
99
<ResourceDictionary>
@@ -18,6 +18,7 @@
1818
<Grid.RowDefinitions>
1919
<RowDefinition Height="Auto" />
2020
<RowDefinition Height="Auto" />
21+
<RowDefinition Height="Auto" />
2122
</Grid.RowDefinitions>
2223
<GroupBox Grid.Row="0">
2324
<StackPanel>
@@ -54,6 +55,12 @@
5455
Checked="Property_Changed" />
5556
</StackPanel>
5657
</GroupBox>
58+
<TextBlock Grid.Row="2" Name="tbParentConfigs" TextWrapping="Wrap" Margin="3,10,3,10" Padding="3"
59+
Style="{StaticResource NotificationText}">
60+
An additional modification is required to each project in the solution in order to have code analysis dictionaries
61+
recognized and used by the code analyzers for identifier spell checking. See the help topic for details.
62+
</TextBlock>
63+
5764
</Grid>
5865
</ScrollViewer>
5966
</UserControl>

0 commit comments

Comments
 (0)