Skip to content

Commit 8f4e706

Browse files
authored
CSpell update for POMs (Azure#28996)
* CSpell update for POMs * revert a change I didn't mean to make to the comment * Skip verification of yml files * add link to azure-sdk-tools spellcheck md file
1 parent 751f216 commit 8f4e706

File tree

4 files changed

+251
-22
lines changed

4 files changed

+251
-22
lines changed

.vscode/README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# CSpell Extension Configuration
2+
3+
## Setup for testing changes locally before submit
4+
5+
1. Install VS Code.
6+
2. Install the Code Spell Checker by Street Side Software.
7+
This will allow testing of the changes locally with minimal effort. Literally, you'll just need to load a file and anything it flags will be underlined in blue. The configuration definition can be found at <https://cspell.org/configuration/>
8+
3. The main spellcheck document can be found [here](https://github.com/Azure/azure-sdk-tools/blob/main/doc/common/spellcheck.md) in the [azure-sdk-tools](https://github.com/Azure/azure-sdk-tools) repository.
9+
10+
## Words and word boundaries
11+
12+
"-" and "." are word boundaries. For example: An artifactId, azure-core-amqp, will verify azure, core and amqp.AMQP, not being in the dictionary would get flagged and that's the only word that would be required to add to the list.
13+
14+
## Case insensitivity
15+
16+
The ignored words are case insensitive. AMQP, amqp, Amqp etc would all be picked up from "amqp"
17+
18+
## Regular expressions
19+
20+
There are times when a single word really isn't enough. For example: Instead of adding each unique word from each and every groupId and artifactId from every Azure SDK library and external dependency, it's cleaner to regex away the line that contains the artifactId. Always match
21+
22+
### Multi-line regular expression
23+
24+
Multi-line regular expressions should be used with extreme caution as it's far too easy to accidentally regex away too much. Any multi-line regular expression should have hard tags that delineate a clear beginning and a clear ending with the multi-line regular expression in between these tags. These tags should be as close to what you want to regex away as possible. For example: A `<properties>` tag may contain a number other tags that you with to regex away but they can also contain things, like a `<legal>`, which contains a string that needs to get checked. For any set of tags that may contain sub-tags, only the sub-tags should be regex'd unless you can guarantee that the all of possible sub-tags will never need to be scanned. `<compilerArguments>` would be an example where all of the sub-tags would be skipped.
25+
26+
**If a multi-line regular expression is needed then a member of the Azure SDK Engineering System Team should be added to the code review.**
27+
28+
### What type of things should regular expressions be used for?
29+
30+
1. Anything that would contain a groupId
31+
2. Anything that would contain an artifactId
32+
3. Anything that would contain a version. There are two reasons for this. The first reason because of version tags in pom files. Each version tag should have a version update tag which contains the group and artifact. The second reason is that while our Azure SDK for Java versions will successfully pass spelling checks, it's not a guarantee that external dependency version will. For ex. 2.0-groovy-3.0. Maven accepts these type of version strings.
33+
4. Anything that contains class names. Classes often contain abbreviations or words that won't pass spellcheck. For example: AMQP.
34+
5. Anything that contain lists 1-4. For example `<excludePackageNames>` is a multi-line regular expression because it contains a list of packages to exclude.
35+
36+
## Do nots
37+
38+
1. Do not add a name, initials or aliases to the skip list. Individual names, initials or aliases does not belong in anything that ships.
39+
2. Do not exclude a filetype or directory that contains artifacts that ship.
40+
3. Do not write a multi-line regular expression for a tag that contains other tags. Unless you can guarantee each sub-tag won't contain items that need to be scanned.

.vscode/cspell.json

Lines changed: 210 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
{
2-
"version": "0.1",
2+
"version": "0.2",
33
"language": "en",
44
"languageId": "java",
55
"dictionaries": ["powershell"],
66
"ignorePaths": [
7+
"eng",
78
"**/session-records/**",
89
"*.jar",
910
"*.zip",
@@ -35,28 +36,217 @@
3536
"*.x509",
3637
"*.certificate",
3738
"*.crt",
38-
".vscode/cspell.json",
39-
"eng/code-quality-reports/src/main/resources"
39+
"*.yml",
40+
".vscode/cspell.json"
41+
],
42+
"words": [
43+
"azsdk",
44+
"codesnippet",
45+
"revapi",
46+
"checkstyle",
47+
"spotbugs",
48+
"OLTP",
49+
"jacoco",
50+
"branchcoverage",
51+
"linecoverage",
52+
"javadoc",
53+
"javadocs",
54+
"fileset",
55+
"toFile",
56+
"scalastyle",
57+
"scalatest",
58+
"junitxml",
59+
"filereports",
60+
"Classpath",
61+
"boringssl",
62+
"SBOM",
63+
"credscan",
64+
"gdnbaselines",
65+
"Sonatype",
66+
"graalvm",
67+
"doclinting",
68+
"doclint",
69+
"requireReleaseDeps",
70+
"XLint",
71+
"linksource",
72+
"doctitle",
73+
"windowtitle",
74+
"autodetection",
75+
"databind",
76+
"Intellij",
77+
"destfile",
78+
"pwsh",
79+
"Dgenerate",
80+
"amqp",
81+
"gson",
82+
"VNET"
4083
],
41-
"words": ["azsdk", "pwsh"],
4284
"overrides": [
4385
{
44-
"filename": "**/eng/pipelines/templates/jobs/ci.yml",
45-
"words": [
46-
"dskip",
47-
"dinject",
48-
"codesnippets",
49-
"dgenerate",
50-
"dspotbugs",
51-
"dcheckstyle",
52-
"drevapi",
53-
"dalt",
54-
"apireview",
55-
"setuptools",
56-
"dgpg",
57-
"dmaven",
58-
"checkstyle",
59-
"dverify"
86+
"filename": "**/pom.xml",
87+
"patterns": [
88+
{
89+
"name": "artifactName",
90+
"pattern": ".*<artifactId>.*"
91+
},
92+
{
93+
"name": "groupId",
94+
"pattern": ".*<groupId>.*"
95+
},
96+
{
97+
"name": "version",
98+
"pattern": ".*<version>.*"
99+
},
100+
{
101+
"name": "include",
102+
"pattern": ".*<include>.*"
103+
},
104+
{
105+
"name": "exclude",
106+
"pattern": ".*<exclude>.*"
107+
},
108+
{
109+
"name": "id",
110+
"pattern": ".*<id>.*"
111+
},
112+
{
113+
"name": "exists",
114+
"pattern": ".*<exists>.*"
115+
},
116+
{
117+
"name": "pattern",
118+
"pattern": ".*<pattern>.*"
119+
},
120+
{
121+
"name": "shadedPattern",
122+
"pattern": ".*<shadedPattern>.*"
123+
},
124+
{
125+
"name": "stylesheet",
126+
"pattern": ".*<stylesheet>.*"
127+
},
128+
{
129+
"name": "value",
130+
"pattern": ".*<value>.*"
131+
},
132+
{
133+
"name": "arg",
134+
"pattern": ".*<arg>.*"
135+
},
136+
{
137+
"name": "propertyExpansion",
138+
"pattern": ".*<propertyExpansion>.*"
139+
},
140+
{
141+
"name": "fileMapper",
142+
"pattern": ".*<fileMapper.*"
143+
},
144+
{
145+
"name": "packages",
146+
"pattern": ".*<packages>.*"
147+
},
148+
{
149+
"name": "sourceFileExclude",
150+
"pattern": ".*<sourceFileExclude>.*"
151+
},
152+
{
153+
"name": "filesets",
154+
"pattern": ".*<filesets>.*"
155+
},
156+
{
157+
"name": "checkstyle.excludes",
158+
"pattern": ".*<checkstyle.excludes>.*"
159+
},
160+
{
161+
"name": "module",
162+
"pattern": ".*<module>.*"
163+
},
164+
{
165+
"name": "suiteXmlFile",
166+
"pattern": ".*<suiteXmlFile>.*"
167+
},
168+
{
169+
"name": "test.groups",
170+
"pattern": ".*<test.groups>.*"
171+
},
172+
{
173+
"name": "perf.test",
174+
"pattern": ".*<perf.test..*"
175+
},
176+
{
177+
"name": "excludePackageNames",
178+
"pattern": "/<excludePackageNames>([\\s\\S]*?)<\/excludePackageNames>/im"
179+
},
180+
{
181+
"name": "heapDumpOnOom",
182+
"pattern": "/<heapDumpOnOom>([\\s\\S]*?)<\/heapDumpOnOom>/im"
183+
},
184+
{
185+
"name": "environmentVariables",
186+
"pattern": "/<environmentVariables>([\\s\\S]*?)<\/environmentVariables>/im"
187+
},
188+
{
189+
"name": "javaModulesSurefireArgLine",
190+
"pattern": "/<javaModulesSurefireArgLine>([\\s\\S]*?)<\/javaModulesSurefireArgLine>/im"
191+
},
192+
{
193+
"name": "additionalSurefireArgLine",
194+
"pattern": "/<additionalSurefireArgLine>([\\s\\S]*?)<\/additionalSurefireArgLine>/im"
195+
},
196+
{
197+
"name": "argLine",
198+
"pattern": "/<argLine>([\\s\\S]*?)<\/argLine>/im"
199+
},
200+
{
201+
"name": "property",
202+
"pattern": "/<property>([\\s\\S]*?)<\/property>/im"
203+
},
204+
{
205+
"name": "manifestEntries",
206+
"pattern": "/<manifestEntries>([\\s\\S]*?)<\/manifestEntries>/im"
207+
},
208+
{
209+
"name": "compilerArguments",
210+
"pattern": "/<compilerArguments>([\\s\\S]*?)<\/compilerArguments>/im"
211+
},
212+
{
213+
"name": "annotationProcessors",
214+
"pattern": "/<annotationProcessors>([\\s\\S]*?)<\/annotationProcessors>/im"
215+
}
216+
],
217+
"ignoreRegExpList": [
218+
"artifactName",
219+
"groupId",
220+
"version",
221+
"include",
222+
"exclude",
223+
"id",
224+
"exists",
225+
"pattern",
226+
"shadedPattern",
227+
"stylesheet",
228+
"value",
229+
"arg",
230+
"propertyExpansion",
231+
"fileMapper",
232+
"packages",
233+
"sourceFileExclude",
234+
"filesets",
235+
"checkstyle.excludes",
236+
"module",
237+
"suiteXmlFile",
238+
"test.groups",
239+
"perf.test",
240+
"excludePackageNames",
241+
"heapDumpOnOom",
242+
"environmentVariables",
243+
"javaModulesSurefireArgLine",
244+
"additionalSurefireArgLine",
245+
"argLine",
246+
"property",
247+
"manifestEntries",
248+
"compilerArguments",
249+
"annotationProcessors"
60250
]
61251
}
62252
],

sdk/parents/azure-data-sdk-parent/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@
478478
</build>
479479
</profile>
480480

481-
<!-- Customise the javadoc plugin to not include module directories in links. We don't
481+
<!-- Customize the javadoc plugin to not include module directories in links. We don't
482482
currently use modules, so search results were being directed to an 'undefined'
483483
directory (for an 'undefined' module). This no-module-directories flag fixes
484484
this, but it is only required for JDK 9+ -->

sdk/spring/spring-cloud-azure-resourcemanager/pom.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
<version>4.2.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-core;current} -->
4141
</dependency>
4242

43-
<!-- com.azure.resourcemanager dependencies -->
4443
<dependency>
4544
<groupId>com.azure.resourcemanager</groupId>
4645
<artifactId>azure-resourcemanager</artifactId>

0 commit comments

Comments
 (0)