Skip to content

Commit

Permalink
Add typos hook and fix typos (#921)
Browse files Browse the repository at this point in the history
  • Loading branch information
hofbi authored Jan 18, 2025
1 parent e8cc369 commit 0482d31
Show file tree
Hide file tree
Showing 12 changed files with 23 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .bazelci/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ win_tests: &win_tests
- "-//pkg/legacy/tests/rpm/..."

#
# Commmon features and tests by platform
# Common features and tests by platform
#
ubuntu2204: &ubuntu
platform: ubuntu2204
Expand Down
9 changes: 9 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,12 @@ repos:
hooks:
- id: buildifier
- id: buildifier-lint
- repo: https://github.com/crate-ci/typos
rev: v1.29.4
hooks:
- id: typos
exclude: |
(?x)^(
CHANGELOG.md|
tests/testdata/|
)
3 changes: 3 additions & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[default.extend-words]
FO = "FO"
fo = "fo"
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Thanks to: Alex Bozhenko, Chuck Grindel, Diego Ortin, and Tomasz Wojno
- Align pkg_rpm returned files with other rules (#692)
- fix(pkg_tar): properly normalize paths for empty files (#760)
- Document that package_dir also uses package_variables (#747)
- Fix handling paths with whitepsaces (#733)
- Fix handling paths with whitespaces (#733)
- Fix python 3.6, doesn't support compresslevel
- Use Gzip compress level 6 (#720)
- write debian Date field in UTC rather than local time (#712)
Expand Down Expand Up @@ -414,7 +414,7 @@ and Ulf Adams

- Author: aiuto <[email protected]>
Date: Fri May 22 14:50:42 2020 -0400
Add a minimal WORKSPACE file to the distributon. (#182)
Add a minimal WORKSPACE file to the distribution. (#182)
We extract this from the top level workspace so it is easier to keep in sync.
- commit 808c192a0c48f292e6dfaaeb3bfa3d4378f6996d

Expand Down
2 changes: 1 addition & 1 deletion docs/_includes/head.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<!-- _inclues/head.html -->
<!-- _includes/head.html -->
<meta charset="utf-8">
<meta name="robots" content="noindex,nofollow">
2 changes: 1 addition & 1 deletion examples/naming_package_files/package_upload.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def _debian_upload_impl(ctx):

debian_upload = rule(
implementation = _debian_upload_impl,
doc = """A demonstraion of consuming OutputGroupInfo to get a file name.""",
doc = """A demonstration of consuming OutputGroupInfo to get a file name.""",
attrs = {
"package": attr.label(
doc = "Package to upload",
Expand Down
2 changes: 1 addition & 1 deletion examples/naming_package_files/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ pkg_deb(
name = "a_deb_package",
package = "foo-tools",
...
# Note: target_cpu comes from the --cpu on the command line, and dows not
# Note: target_cpu comes from the --cpu on the command line, and does not
# have to be stated in the BUILD file.
package_file_name = "foo-tools_{version}-{revision}_{target_cpu}.deb",
package_variables = ":my_naming_vars",
Expand Down
2 changes: 1 addition & 1 deletion pkg/private/pkg_files.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ def add_single_file(mapping_context, dest_path, src, origin, mode = None, user =
def add_symlink(mapping_context, dest_path, src, origin):
"""Add a symlink to the content map.
TODO(aiuto): This is a vestage left from the pkg_tar use. We could
TODO(aiuto): This is a vestige left from the pkg_tar use. We could
converge code by having pkg_tar be a macro that expands symlinks to
pkg_symlink targets and srcs them in.
Expand Down
2 changes: 1 addition & 1 deletion pkg/private/tar/build_tar.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def normalize_path(self, path: str) -> str:
# paths should not have a leading ./
if dest.startswith('./'):
dest = dest[2:]
# No path should ever come in with slashs on either end, but protect
# No path should ever come in with slashes on either end, but protect
# against that anyway.
dest = dest.strip('/')
# This prevents a potential problem for users with both a prefix_dir and
Expand Down
2 changes: 1 addition & 1 deletion pkg/private/tar/tar_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def __init__(self,
self.directories = set()
# Preseed the added directory list with things we should not add. If we
# some day need to allow '.' or '/' as an explicit member of the archive,
# we can adjust that here based on the setting of root_dirctory.
# we can adjust that here based on the setting of root_directory.
self.directories.add('/')
self.directories.add('./')
self.create_parents = create_parents
Expand Down
2 changes: 1 addition & 1 deletion tests/mappings/mappings_external_repo_test.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def mappings_external_repo_analysis_tests():
# file, but then have it consumed by some remote package.
"@mappings_test_external_repo//pkg:pf_local_file_in_extrepo",
# This test is more focused around the verify_archive_test repo but is still
# based on using someting from another repo. In particular, ensuring the
# based on using something from another repo. In particular, ensuring the
# verify_archive_test macro can be called properly from a workspace outside
# of the main one.
"@mappings_test_external_repo//pkg:external_archive_test",
Expand Down
2 changes: 1 addition & 1 deletion toolchains/rpm/BUILD.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ toolchain(
)

toolchain(
name = "zzz_rpmbuild_missing_toolchain", # keep name lexigraphically last
name = "zzz_rpmbuild_missing_toolchain", # keep name lexicographically last
toolchain = "@rules_pkg//toolchains/rpm:no_rpmbuild",
toolchain_type = "@rules_pkg//toolchains/rpm:rpmbuild_toolchain_type",
)

0 comments on commit 0482d31

Please sign in to comment.