Skip to content

Commit 3814d0e

Browse files
authored
Fix typos across file types & add automation (#15385)
<!-- Use this checklist to make sure your PR is ready for merge. You may delete any sections you don't need. --> ## DESCRIBE YOUR PR I found repeat typos in a few files so decided to dig deeper. Turns out this was overdue. - Scanned repo and fixed a number of typos across various file types - mostly non-functional (comments, etc) but found some that could effect conditional logic - Added typo rules for special cases and files to ignore - Added GH action to run spell checking tool on PRs. It's snappy - written in Rust, shouldn't add much overhead if any. - Also included it as a pre-commit hook, although this flow (`.pre-commit-config.yaml`) is optional and not clear how many users use this - Renamed the GH Action workflow, was appearing twice and now will show as: CI / Lint CI / Check Typos CI / Test ## IS YOUR CHANGE URGENT? Help us prioritize incoming PRs by letting us know when the change needs to go live. - [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE --> - [ ] Other deadline: <!-- ENTER DATE HERE --> - [x] None: Not urgent, can wait up to 1 week+ ## SLA - Teamwork makes the dream work, so please add a reviewer to your PRs. - Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it. Thanks in advance for your help! ## PRE-MERGE CHECKLIST *Make sure you've checked the following before merging your changes:* - [ ] Checked Vercel preview for correctness, including links - [ ] PR was reviewed and approved by any necessary SMEs (subject matter experts) - [ ] PR was reviewed and approved by a member of the [Sentry docs team](https://github.com/orgs/getsentry/teams/docs) ## LEGAL BOILERPLATE <!-- Sentry employees and contractors can delete or ignore this section. --> Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms. ## EXTRA RESOURCES - [Sentry Docs contributor guide](https://docs.sentry.io/contributing/)
1 parent f1bc5c8 commit 3814d0e

File tree

145 files changed

+315
-204
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

145 files changed

+315
-204
lines changed

.github/workflows/test.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Lint, and Test
1+
name: CI
22

33
on:
44
push:
@@ -11,7 +11,7 @@ jobs:
1111
name: Lint
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v4.1.1
14+
- uses: actions/checkout@v5
1515

1616
- name: Internal github app token
1717
id: token
@@ -62,11 +62,19 @@ jobs:
6262
with:
6363
github-token: ${{ steps.token.outputs.token }}
6464

65+
job_typos:
66+
name: Check Typos
67+
runs-on: ubuntu-latest
68+
steps:
69+
- uses: actions/checkout@v5
70+
- name: Check spelling with typos
71+
uses: crate-ci/typos@master
72+
6573
job_test:
6674
name: Test
6775
runs-on: ubuntu-latest
6876
steps:
69-
- uses: actions/checkout@v4.1.1
77+
- uses: actions/checkout@v5
7078
- name: Set up Node
7179
uses: actions/setup-node@v4
7280
with:

.pre-commit-config.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,15 @@ repos:
2222
- id: debug-statements
2323
- id: flake8
2424
- id: fix-encoding-pragma
25-
args: ["--remove"]
25+
args: ['--remove']
2626
- repo: https://github.com/getsentry/pre-commit-hooks
2727
rev: f3237d2d65af81d435c49dee3593dc8f03d23c2d
2828
hooks:
2929
- id: prettier
3030
entry: node_modules/.bin/prettier
3131
- id: eslint
3232
entry: node_modules/.bin/eslint
33+
- repo: https://github.com/crate-ci/typos
34+
rev: v1.39.0
35+
hooks:
36+
- id: typos

_typos.toml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
[default]
2+
# Regex patterns to ignore
3+
extend-ignore-re = [
4+
"\\bUE\\b", # Unreal Engine abbreviation
5+
"\\bUE_LOG\\b", # Unreal Engine logging macro
6+
"\\bue4\\b", # Unreal Engine 4
7+
"\\bue5\\b", # Unreal Engine 5
8+
"\\bue\\d+\\b", # Any UE version (ue5, ue6, etc.)
9+
]
10+
11+
[files]
12+
# Files and patterns to exclude from spell checking
13+
extend-exclude = [
14+
# Design and binary files
15+
"*.excalidraw", # Diagram files contain random IDs
16+
"*.png",
17+
"*.jpg",
18+
"*.jpeg",
19+
"*.gif",
20+
"*.svg",
21+
"*.webp",
22+
23+
# Data and configuration files
24+
"*.json", # JSON files have many false positives
25+
"*.lock", # Package lock files
26+
"yarn.lock", # Yarn lock file
27+
"package-lock.json", # NPM lock file
28+
29+
# Documentation assets
30+
"public/_platforms/*.json", # Platform metadata
31+
"public/pdfs/*.pdf", # PDFs can't be edited programmatically
32+
33+
# Build artifacts and dependencies
34+
".next/**", # Next.js build output
35+
"node_modules/**", # Dependencies
36+
"dist/**", # Distribution builds
37+
"build/**", # Build output
38+
]
39+
40+
[default.extend-words]
41+
# Technical terms and product names that are spelled correctly
42+
# .NET ecosystem
43+
Paket = "Paket" # .NET package manager (legitimate tool)
44+
paket = "paket" # .NET package manager CLI command
45+
46+
# Platform-specific terms
47+
ITMS = "ITMS" # Apple error code prefix (legitimate)
48+
SEH = "SEH" # Structured Exception Handling (Windows API)
49+
EDE = "EDE" # Cipher name component (3DES_EDE_CBC_SHA)
50+
UE = "UE" # Unreal Engine abbreviation
51+
UE4 = "UE4" # Unreal Engine 4
52+
UE5 = "UE5" # Unreal Engine 5
53+
54+
# Cloud/Infrastructure
55+
nodejs_als = "nodejs_als" # Cloudflare compatibility flag (correct spelling)
56+
als = "als" # Part of nodejs_als flag
57+
58+
# Common abbreviations in tech docs
59+
DSN = "DSN" # Data Source Name (Sentry)
60+
DSNs = "DSNs" # Plural
61+
SDK = "SDK" # Software Development Kit
62+
SDKs = "SDKs" # Plural
63+
API = "API" # Application Programming Interface
64+
APIs = "APIs" # Plural
65+
MCP = "MCP" # Model Context Protocol
66+
NPM = "NPM" # Node Package Manager
67+
68+
# Code identifiers that are intentionally "misspelled" or match external systems
69+
# Note: These should ONLY include cases where the spelling is intentional
70+
# (e.g., matching an external API/constant name we don't control)
71+
childs = "childs" # Intentional variable name in mdx-deflist.ts
72+
aso = "aso" # Intentional variable name in utils.ts (short for "a sidebar order")
73+
MIGRATED_GETTING_STARTD_DOCS = "MIGRATED_GETTING_STARTD_DOCS" # Matches actual constant in Sentry backend (external)
74+
STARTD = "STARTD" # Part of MIGRATED_GETTING_STARTD_DOCS - needed because typos parses words in markdown text
75+
ERRO = "ERRO" # Special case - Part of "ERRORs" in legacy-sdk/integrations.mdx (logging level context)

app/[[...path]]/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ export async function generateMetadata(props: MetadataProps): Promise<Metadata>
234234
const domain = isDeveloperDocs
235235
? 'https://develop.sentry.dev'
236236
: 'https://docs.sentry.io';
237-
// enable og iamge preview on preview deployments
237+
// enable og image preview on preview deployments
238238
const previewDomain = process.env.VERCEL_URL
239239
? `https://${process.env.VERCEL_URL}`
240240
: domain;

develop-docs/application-architecture/multi-region-deployment/cross-region-rpc.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Service classes act as stubs that define the interface a service will have. In t
5959
- `local_mode` defines which silo mode this service uses it’s ‘local implementation’. Services can have local implementations in either silo mode.
6060
- `get_local_implementation` is used by the RPC machinery to find the implementation service when the silo mode matches or is `MONOLITH`.
6161

62-
RPC methods like `get_org_by_slug` must be defined as `abstractmethod` and must have either `rpc_method` or `regional_rpc_method` applied. If a method has `local_mode = REGION` it should use `regional_rpc_method` with a resolve ‘resolver’. There are several resolvers that accomodate a variety of method call signatures:
62+
RPC methods like `get_org_by_slug` must be defined as `abstractmethod` and must have either `rpc_method` or `regional_rpc_method` applied. If a method has `local_mode = REGION` it should use `regional_rpc_method` with a resolve ‘resolver’. There are several resolvers that accommodate a variety of method call signatures:
6363

6464
- `ByOrganizationSlug` will extract the `organization_slug` parameter and use it to locate the region using `sentry_organizationmapping`.
6565
- `ByOrganizationId` will extract the `organization_id` parameter and use it to locate the organization’s region using `sentry_organizationmapping`

develop-docs/application-architecture/overview.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ This graph is extremely simplified mostly due to layout constraints. Missing fro
4040
* How Relay fetches project configs. Answer: from sentry-web
4141
* How Relay caches project configs. Answer: In memory, and in Redis
4242
* How Relay counts events and keeps track of quotas. Answer: more Redis
43-
* Symbolicator as auxilliary service to symbolicate-event
43+
* Symbolicator as auxiliary service to symbolicate-event
4444
* How alerting is triggered. Answer: postprocess-event, a Celery task which is responsible for alerting (spawned by a Kafka consumer in Sentry reading from eventstream)
4545
* Possibly more
4646

develop-docs/backend/api/design.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Design Principles
33
sidebar_order: 2
44
---
55

6-
This document contains a set of design principles and requirements whish should be applied to all Sentry APIs. These are _requirements_ when designing public APIs (such as Sentry's Web API), but internal APIs (such as an an internal service that Sentry communicates with) should attempt to adhere to these principles as well where it makes sense.
6+
This document contains a set of design principles and requirements which should be applied to all Sentry APIs. These are _requirements_ when designing public APIs (such as Sentry's Web API), but internal APIs (such as an an internal service that Sentry communicates with) should attempt to adhere to these principles as well where it makes sense.
77

88
In the Sentry monolith, we use [Django REST framework](https://www.django-rest-framework.org/) (DRF).
99

develop-docs/backend/api/serializers.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ class ModelSerializer(Serializer):
163163

164164
**get_attrs Method**
165165

166-
Why do this when Django Rest Framework has similar functionality? The `get_attrs` method is the reason. It allows you to do a bulk query versus multiple queries. In our example, instead of calling `ExampleTypes.objects.get(...)` multiple items, I can filter for the ones I want and assign them to the item in question using python. In the case of `attr` dictionary, the `key` is the item iteself. and the `value` is a dictionary with the name of the attribute you want to add and it's values.
166+
Why do this when Django Rest Framework has similar functionality? The `get_attrs` method is the reason. It allows you to do a bulk query versus multiple queries. In our example, instead of calling `ExampleTypes.objects.get(...)` multiple items, I can filter for the ones I want and assign them to the item in question using python. In the case of `attr` dictionary, the `key` is the item itself. and the `value` is a dictionary with the name of the attribute you want to add and it's values.
167167

168168
```python
169169
attrs[item] = {'attribute_name': attribute}

develop-docs/backend/application-domains/feature-flags/flagpole.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,11 @@ Flagpole currently supports the following `operator` types:
8484

8585
`contains`
8686

87-
: Given a single int, string, float, or boolean value, evalutes to `True` if the context property value is a list containing the provided value.
87+
: Given a single int, string, float, or boolean value, evaluates to `True` if the context property value is a list containing the provided value.
8888

8989
`not_contains`
9090

91-
: The inverse of `contains`, evalutes to `True` if the context property value is a list which does not contain the provided value.
91+
: The inverse of `contains`, evaluates to `True` if the context property value is a list which does not contain the provided value.
9292

9393
`equals`
9494

@@ -114,7 +114,7 @@ Here are some common properties we surface via our Sentry and GetSentry context
114114

115115
`sentry_region` [str]
116116

117-
: The sentry region or single-tenant the flag check is being perfomed in.
117+
: The sentry region or single-tenant the flag check is being performed in.
118118

119119
`sentry_singletenant` [bool]
120120

develop-docs/backend/application-domains/grouping.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ which can be customized [on the client](https://docs.sentry.io/platforms/python/
88
and on the server via [fingerprint rules](https://docs.sentry.io/product/data-management-settings/event-grouping/fingerprint-rules/)
99
and [stack trace rules](https://docs.sentry.io/product/data-management-settings/event-grouping/stack-trace-rules/).
1010

11-
This documentation attemps to explain how the system currently functions and what limitations exist presently with it.
11+
This documentation attempts to explain how the system currently functions and what limitations exist presently with it.
1212

1313
# Basics
1414

@@ -192,8 +192,8 @@ The following general paths forward are current envisioned:
192192

193193
The consequences of making too many groups today are alert spam and the inability to work with multiple
194194
issues at once. If Sentry were to no longer be alerting on all new groups and tools existed to work
195-
across multiple groups more opportunies arise. In particular the grouping algorithm could continue to
196-
just fingerprint the stack trace but a secondary process could come in peridically and sweep up related
195+
across multiple groups more opportunities arise. In particular the grouping algorithm could continue to
196+
just fingerprint the stack trace but a secondary process could come in periodically and sweep up related
197197
fingerprints into a larger group. If we take the `get_current_user` example the creation of 50 independent
198198
groups is not much of an issue if no alerts are fired. If after 5 minute the system detected that they are
199199
in fact all very related (eg: the bug is "in `get_current_user`") it could leave the 50 generated groups

0 commit comments

Comments
 (0)