Skip to content

Commit 5b0cad5

Browse files
more custom words
1 parent f931b92 commit 5b0cad5

File tree

2 files changed

+67
-1
lines changed

2 files changed

+67
-1
lines changed

tools/spectral/ipa/rulesets/IPA-100.yaml

Lines changed: 64 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ functions:
66

77
rules:
88
xgen-IPA-100-spellcheck:
9-
description: Test
9+
description: Spell check. Ignores camel case if encased in backticks.
1010
message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-100-spellcheck'
1111
severity: warn
1212
resolved: false
@@ -33,10 +33,32 @@ rules:
3333
- 'X.509'
3434
- 'X.509.'
3535
- 'OpenAPI'
36+
- 'API'
37+
- 'APIs'
38+
- 'hostname'
39+
- 'Hostname'
40+
- 'json'
41+
- 'gzip'
42+
- 'dataset'
43+
- 'Dataset'
3644
- 'Serverless'
3745
- 'serverless'
46+
- 'namespace'
47+
- 'namespaces'
48+
- 'Namespace'
49+
- 'Namespaces'
50+
- 'whitelist'
51+
- 'whitelists'
52+
- 'E.g.'
53+
- 'e.g.'
54+
- 'I.e.'
55+
- 'i.e.'
56+
- 'subnet'
57+
- 'Subnet'
58+
- 'N-10'
3859
- 'OAuth'
3960
- 'WiredTiger'
61+
- 'IdP'
4062
- 'mongod'
4163
- 'mongos'
4264
- 'SCRAM-SHA'
@@ -53,6 +75,47 @@ rules:
5375
- 'AWS'
5476
- 'GCP'
5577
- 'Azure'
78+
- 'aws'
79+
- 'gcp'
80+
- 'US_EAST_1'
81+
- 'v4.2'
82+
- 'vnd.atlas.YYYY'
83+
- 'Profiler'
84+
- 'PrivateLink'
85+
- '22-character'
86+
- 'Regionalized'
87+
- 'sharded'
88+
- 'Sharded'
89+
- 'metadata'
90+
- 'Metadata'
91+
- 'CIDR-notated'
92+
- 'oplog'
93+
- 'x.509'
94+
- 'Deauthorize'
95+
- 'deauthorize'
96+
- 'unassign'
97+
- 'Unassign'
98+
- 'X.509'
99+
- '90-day'
100+
- '20-hexadecimal'
101+
- 'Versioning'
102+
- 'versioning'
103+
- 'matchers'
104+
- 'Matchers'
105+
- 'tokenizer'
106+
- 'Tokenizer'
107+
- 'autocomplete'
108+
- 'whitespace'
109+
- 'stemmer'
110+
- 'Daitch-Mokotoff'
111+
- 'encodings'
112+
- "Lucene's"
113+
- 'Webhook'
114+
- 'webhook'
115+
- 'webhook-based'
116+
- 'PagerDuty'
117+
- 'Failover'
118+
- 'failover'
56119
spellcheckOptions:
57120
ignoreAcronyms: true
58121
ignoreNumbers: true

tools/spectral/ipa/rulesets/functions/IPA100Spellcheck.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ import { evaluateAndCollectAdoptionStatus, handleInternalError } from './utils/c
33
import spellcheck from 'markdown-spellcheck';
44

55
export default (input, { customWords, spellcheckOptions }, { path, rule }) => {
6+
if (typeof input !== 'string') {
7+
return;
8+
}
69
const errors = checkViolationsAndReturnErrors(input, customWords, spellcheckOptions, path, rule.name);
710
return evaluateAndCollectAdoptionStatus(errors, rule.name, input, path);
811
};

0 commit comments

Comments
 (0)