Skip to content

Commit 23f0f01

Browse files
hofbialexeagle
andauthored
chore: Add typos pre-commit hook (#503)
Automated typo fixes --- ### Changes are visible to end-users: yes Typos were mainly fixed in the docs/docstrings --------- Co-authored-by: Alex Eagle <[email protected]>
1 parent 0090277 commit 23f0f01

File tree

14 files changed

+29
-14
lines changed

14 files changed

+29
-14
lines changed

.github/workflows/ci.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ jobs:
5454

5555
test-release:
5656
runs-on: ubuntu-latest
57+
permissions:
58+
pull-requests: write # allow commenting to the PR with the token
5759
defaults:
5860
run:
5961
working-directory: e2e/use_release
@@ -71,6 +73,7 @@ jobs:
7173
# The github-actions-report-lcov doesn't follow symlinks, so get an absolute path
7274
- run: echo "bazel_testlogs=$(bazel info bazel-testlogs)" >> $GITHUB_ENV
7375
- name: Report code coverage
76+
if: github.event.pull_request.head.repo.fork == false # Forks always have read-only tokens
7477
uses: zgosalvez/github-actions-report-lcov@5989987f8058a03137e90bc16f9c0baaac5e069a # v4.1.22
7578
with:
7679
working-directory: ${{ env.bazel_testlogs }}

.pre-commit-config.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,12 @@ repos:
2424
rev: "v3.1.0"
2525
hooks:
2626
- id: prettier
27+
- repo: https://github.com/crate-ci/typos
28+
rev: v1.28.4
29+
hooks:
30+
- id: typos
31+
exclude: |
32+
(?x)^(
33+
examples/django/mysite/settings.py|
34+
gazelle_python.yaml
35+
)

.typos.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[default.extend-identifiers]
2+
MODULEs = "MODULEs" # Else it becomes MODULEEs
3+
alocation = "alocation" # Used as 'a location'

docs/py_binary.md

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/py_test.md

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/venv.md

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

e2e/system-interpreter/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Test system interperter
1+
# Test system interpreter
22

33
This is a minimal test that rules_py can use a toolchain that relies on the system interpreter.
44
Note that this is setup to run on Aspect's CI, and locally on a MacOS, paths may vary on your system if running this.

py/private/providers.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ PyWheelInfo = provider(
1111
PyVirtualInfo = provider(
1212
doc = "FIXME",
1313
fields = {
14-
"dependencies": "Depset of required virtual dependencies, independant of their resolution status",
14+
"dependencies": "Depset of required virtual dependencies, independent of their resolution status",
1515
"resolutions": "FIXME",
1616
},
1717
)

py/private/py_binary.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ _attrs = dict({
147147
),
148148
"package_collisions": attr.string(
149149
doc = """The action that should be taken when a symlink collision is encountered when creating the venv.
150-
A collision can occour when multiple packages providing the same file are installed into the venv. The possible values are:
150+
A collision can occur when multiple packages providing the same file are installed into the venv. The possible values are:
151151
152152
* "error": When conflicting symlinks are found, an error is reported and venv creation halts.
153153
* "warning": When conflicting symlinks are found, an warning is reported, however venv creation continues.

py/private/py_venv.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ py_venv_rule = rule(
115115
),
116116
"package_collisions": attr.string(
117117
doc = """The action that should be taken when a symlink collision is encountered when creating the venv.
118-
A collision can occour when multiple packages providing the same file are installed into the venv. The possible values are:
118+
A collision can occur when multiple packages providing the same file are installed into the venv. The possible values are:
119119
120120
* "error": When conflicting symlinks are found, an error is reported and venv creation halts.
121121
* "warning": When conflicting symlinks are found, an warning is reported, however venv creation continues.

0 commit comments

Comments
 (0)