Skip to content

Commit 2ca8620

Browse files
authored
Add codespell support (config, workflow to detect/not fix) and make it fix some typos (#7864)
* Add github action to codespell preview on push and PRs * Add rudimentary codespell config * [DATALAD RUNCMD] chore: run codespell throughout fixing a few typos interactively === Do not change lines below === { "chain": [], "cmd": "codespell -w -i 3 -C 4 ./apps/web/core/components/workspace/delete-workspace-form.tsx ./deployments/cli/community/README.md", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [], "pwd": "." } ^^^ Do not change lines above ^^^ * Adjust coespell regex to ignore all camelCased words * [DATALAD RUNCMD] chore: run codespell throughout fixing a few new typos automagically === Do not change lines below === { "chain": [], "cmd": "codespell -w", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [], "pwd": "." } ^^^ Do not change lines above ^^^
1 parent 07ff457 commit 2ca8620

22 files changed

Lines changed: 61 additions & 29 deletions

File tree

.codespellrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[codespell]
2+
# Ref: https://github.com/codespell-project/codespell#using-a-config-file
3+
skip = .git*,*.svg,i18n,*-lock.yaml,*.css,.codespellrc,migrations,*.js,*.map,*.mjs
4+
check-hidden = true
5+
# ignore all CamelCase and camelCase
6+
ignore-regex = \b[A-Za-z][a-z]+[A-Z][a-zA-Z]+\b
7+
ignore-words-list = tread

.github/workflows/codespell.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Codespell configuration is within .codespellrc
2+
---
3+
name: Codespell
4+
5+
on:
6+
push:
7+
branches: [preview]
8+
pull_request:
9+
branches: [preview]
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
codespell:
16+
name: Check for spelling errors
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
- name: Annotate locations with typos
23+
uses: codespell-project/codespell-problem-matcher@v1
24+
- name: Codespell
25+
uses: codespell-project/actions-codespell@v2

apps/api/plane/api/serializers/intake.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Module improts
1+
# Module imports
22
from .base import BaseSerializer
33
from .issue import IssueExpandSerializer
44
from plane.db.models import IntakeIssue, Issue

apps/api/plane/app/views/cycle/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1196,7 +1196,7 @@ def get(self, request, slug, project_id, cycle_id):
11961196
if the issues were transferred to the new cycle, then the progress_snapshot will be present
11971197
return the progress_snapshot data in the analytics for each date
11981198
1199-
else issues were not transferred to the new cycle then generate the stats from the cycle isssue bridge tables
1199+
else issues were not transferred to the new cycle then generate the stats from the cycle issue bridge tables
12001200
"""
12011201

12021202
if cycle.progress_snapshot:

apps/api/plane/app/views/project/member.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def create(self, request, slug, project_id):
4848
# Check if the members array is empty
4949
if not len(members):
5050
return Response(
51-
{"error": "Atleast one member is required"},
51+
{"error": "At least one member is required"},
5252
status=status.HTTP_400_BAD_REQUEST,
5353
)
5454

apps/api/plane/authentication/adapter/error.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"INCORRECT_OLD_PASSWORD": 5135,
4949
"MISSING_PASSWORD": 5138,
5050
"INVALID_NEW_PASSWORD": 5140,
51-
# set passowrd
51+
# set password
5252
"PASSWORD_ALREADY_SET": 5145,
5353
# Admin
5454
"ADMIN_ALREADY_EXIST": 5150,

apps/api/plane/db/management/commands/activate_user.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ def handle(self, *args, **options):
3131
user.is_active = True
3232
user.save()
3333

34-
self.stdout.write(self.style.SUCCESS("User activated succesfully"))
34+
self.stdout.write(self.style.SUCCESS("User activated successfully"))

apps/api/plane/db/management/commands/reset_password.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,4 @@ def handle(self, *args, **options):
5959
user.is_password_autoset = False
6060
user.save()
6161

62-
self.stdout.write(self.style.SUCCESS("User password updated succesfully"))
62+
self.stdout.write(self.style.SUCCESS("User password updated successfully"))

apps/api/plane/db/management/commands/update_bucket.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def check_s3_permissions(self, bucket_name):
7070
try:
7171
s3_client.delete_object(Bucket=bucket_name, Key="test_permission_check.txt")
7272
except ClientError:
73-
self.stdout.write("Coudn't delete test object")
73+
self.stdout.write("Couldn't delete test object")
7474

7575
# 4. Test s3:PutBucketPolicy (attempt to put a bucket policy)
7676
try:

apps/space/helpers/authentication.helper.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export enum EAuthenticationErrorCodes {
6666
INCORRECT_OLD_PASSWORD = "5135",
6767
MISSING_PASSWORD = "5138",
6868
INVALID_NEW_PASSWORD = "5140",
69-
// set passowrd
69+
// set password
7070
PASSWORD_ALREADY_SET = "5145",
7171
// Admin
7272
ADMIN_ALREADY_EXIST = "5150",

0 commit comments

Comments
 (0)