forked from open-telemetry/semantic-conventions
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.textlintrc.yml
More file actions
213 lines (212 loc) · 6.13 KB
/
Copy path.textlintrc.yml
File metadata and controls
213 lines (212 loc) · 6.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
# cspell:ignore ebpf matic postgres protable
plugins:
"@textlint/textlint-plugin-text":
extensions:
- ".yaml"
- ".yml"
filters:
allowlist:
allow:
# Don't check registry .yml file fields for language, repo,URL and tags:
- '/^\s*(?:language|repo|name|docs|url|website): .*$/m'
- /^(?:tags):(\s*-.+$)*/m
# Hugo template syntax:
- /{{.*?}}/
- /{{%.*?%}}/
# Custom header anchors in markdown headings:
- /{#.*?}/
# src attribute in figure Hugo template:
- /src=".*?"/
# Other:
- /(<|\()https?:\/\/.*?(>|\))/ # Raw URLs
- /`.*?`/ # Raw code in backticks
- /attributes-registry, \(e.g. http, cloud, db\)/ # Example of Component names in changelog files
- /\(e.g., http, databases/ # Example of domains names in migration notes
- /\"id\":/ # IDs in JSON files
- /\n\s*(-\s)?(\S+):/ # YAML keys, with optional list marker
- /\n\s*(-\s)?(id|value|examples|metric_name|ref|component):\s(\[.+\]|.+)/ # Values for YAML keys in allowed list are not checked
- /examples:\n?.+\[(.|\n)([^\]])*]/ # Examples YAML key with list of values, allowing for multi-line lists
comments:
# enable comment directive
# if comment has the value, then enable textlint rule
enablingComment: "textlint-enable"
# disable comment directive
# if comment has the value, then disable textlint rule
disablingComment: "textlint-disable"
rules:
common-misspellings:
# Misspellings to be ignored (case-insensitive)
ignore: [
GAE
]
period-in-header: true
terminology:
defaultTerms: true
skip: []
exclude:
- 'bug[- ]fix(es)?'
- 'client ?side'
- "indexes\\b"
- 'readme(s)?'
- 'server ?side'
- 'to-?do(s)?(?=[ ,.])'
- 'web[- ]?site(s)?'
terms:
- Actix
- Ajax
- Apache
- API
- application/json
- AWS
- Azure
- Caml
- Cassandra
- Clojure
- CNCF
- eBPF
- ECMAScript
- Elixir
- Erlang
- GAE
- GCP
- GitHub
- Gitpod
- GraphQL
- gRPC
- Haskell
- HTTP
- HTTPS
- ID
- iOS
- Istio
- Jaeger
- JavaScript
- JBoss
- Jetty
- JMX
- JSON
- Julia
- K8s
- Kafka
- KubeCon
- Kubernetes
- Laravel
- MacBook
- macOS
- Markdown
- MongoDB
- mTLS
- MySQL
- NDJSON
- Netlify
- NGINX
- OCaml
- OK
- OpAMP
- OpenSearch
- OpenTelemetry Collector
- OTel
- OTEP
- PDF
- Phoenix
- PHP
- PostgreSQL
- protobuf
- Python
- Quarkus
- Rails
- README
- Redis
- Ruby
- Rust
- SDK
- SemVer
- SQL
- SQLite
- Swift
- Symfony
- Thanos
- Traefik
- TypeScript
- UNIX
- URL
- WordPress
- WSGI
- YouTube
- Zend
- Zipkin
#
# ADVANCED RULES given as `[pattern, replacement]`, take as arguments to a
# search-and-replace of the form /pattern/replacement/.
#
# If the regex pattern starts with `(?<` or `(?=` or `(?!`, the
# terminology linter rule will use the regex AS IS to match strings in
# checked files. Otherwise, the pattern is wrapped into a regex with other
# constraints, such as requiring that is be at word boundaries. For
# details, see
# https://github.com/sapegin/textlint-rule-terminology/blob/ca36a645c56d21f27cb9d902b5fb9584030c59e3/index.js#L137-L142.
#
- ['3rd[- ]party', third-party]
- ['auto[- ]c(onfigur)(es?|ations?)', 'autoc$1$2'] # cSpell:disable-line
- ['back[- ]end(s)?', 'backend$1']
- ['bugfix(es?)', 'bug fix$1']
- [byte code, bytecode]
- ['cicd', 'CI/CD']
- ['(cloud)-(native)', '$1 $2']
- [cpp, C++]
- # dotnet|.net -> .NET, but NOT for strings like:
# - File extension: file.net
# - Repo names: opentelemetry-dotnet
# - Compound names: System.Net.Http.HttpClient
- '(?<=(^|\s))(?:\bdot|\.)net\b'
- .NET
- [ebpf, eBPF]
- [epbf, eBPF]
- ['http[ /]?2(?:\.0)?', HTTP/2]
- [he(/| or )she, they]
- [\(s\)he, they]
- ["indices\\b", "indexes"]
- ["id['’]?s", IDs]
- # Capitalize Java, but NOT for strings like:
# - File names: file.java
# - Repo names: opentelemetry-java
# - Compound names: java.util.List
- '(?<![.-])java\b(?![.])'
- Java
- ['java[- ]?agent', Java agent]
- ['java ?doc(s)?', 'Javadoc$1']
- ['mac ?os', macOS]
- ['meta[- ]data', metadata]
- ['nd-?json', NDJSON]
- ['node\.?js', Node.js]
- [open-source, open source]
- # OpenTelemetry
# Catch typos like: OpenTelemtry, opentelementry
# Exclude occurrences like:
# - Compound names: go.opentelemetry.io
# - Paths: medium.com/opentelemetry
# - Repo names: opentelemetry-cpp or ocaml-opentelemetry
# - Repo names: open-telemetry/opentelemetry-cpp
# - Slack or social media anchors: #opentelemetry or @opentelemetry
# cSpell:ignore teleme
- '(?<![-#@./])\bopen[- ]?teleme?n?try\b(?![-./])'
- OpenTelemetry
- [os x, macOS]
- [protable, portable]
- [postgres, PostgreSQL]
- ['psr[ -]?([0-9]+)', PSR-$1]
- ['react[ .]js', React]
- ['regexp?(s)?', regular expression$1]
- [repo\b, repository]
- [repos, repositories]
- ['screen[- ]shot(s)?', screenshot$1]
- ['time[- ]stamp(s)?', timestamp$1]
- ["to-?do(s)?", "TODO$1"]
- ["uid['’]?(s)?", UID$1]
- ['(walk)-(throughs?)', $1$2] # cSpell:disable-line
- ['(work)-(arounds?)', $1$2]
# Enable the following to find and replace "instrumentation module/package" with "instrumentation library":
# - ["(auto(matic)?[- ])?instrumentation (module|package)", "instrumentation library"]
# - ["(auto(matic)?[- ])?instrumentation (modules|packages)", "instrumentation libraries"]
- snake_case
- location_indices