Skip to content

Commit 8ba0872

Browse files
authored
pre-commit autoupdate and autofixes (#3707)
- Update all pre-commit hooks using `pre-commit autoupdate` - Let pre-commit autofix all issues and reformat using `pre-commit run -a`
1 parent 28fd28e commit 8ba0872

File tree

9 files changed

+22
-22
lines changed

9 files changed

+22
-22
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ repos:
1212
- id: buildifier-lint
1313
args: [--version, "v8.2.0", --warnings=all]
1414
- repo: https://github.com/crate-ci/typos
15-
rev: v1.35.5
15+
rev: v1.38.1
1616
hooks:
1717
- id: typos
1818
exclude: |
@@ -22,17 +22,17 @@ repos:
2222
exclude_types:
2323
- diff
2424
- repo: https://github.com/psf/black
25-
rev: 24.10.0
25+
rev: 25.9.0
2626
hooks:
2727
- id: black
2828
- repo: https://github.com/PyCQA/isort
29-
rev: 5.13.2
29+
rev: 7.0.0
3030
hooks:
3131
- id: isort
3232
args: [--profile, black]
3333
- repo: https://github.com/pre-commit/mirrors-clang-format
3434
# See supported types: https://github.com/pre-commit/mirrors-clang-format/blob/v14.0.6/.pre-commit-hooks.yaml#L6
35-
rev: v14.0.6
35+
rev: v21.1.2
3636
hooks:
3737
- id: clang-format
3838
exclude_types:

crate_universe/defs.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ rust_test(
9999
100100
### Direct Packages
101101
102-
In cases where Rust targets have heavy interractions with other Bazel targets ([Cc][cc], [Proto][proto], etc.),
102+
In cases where Rust targets have heavy interactions with other Bazel targets ([Cc][cc], [Proto][proto], etc.),
103103
maintaining `Cargo.toml` files may have deminishing returns as things like [rust-analyzer][ra] begin to be confused
104104
about missing targets or environment variables defined only in Bazel. In workspaces like this, it may be desirable
105105
to have a "Cargo free" setup. `crates_repository` supports this through the `packages` attribute.

crate_universe/private/crates_vendor.bzl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ if [[ -n "${{CARGO_BAZEL_DEBUG:-}}" ]]; then
4040
fi
4141
4242
# Pass on CARGO_REGISTRIES_* and CARGO_REGISTRY*
43-
while IFS= read -r line; do _ENVIRON+=("${{line}}"); done < <(env | grep ^CARGO_REGISTR)
43+
while IFS= read -r line; do _ENVIRON+=("${{line}}"); done < <(env | grep ^CARGO_REGISTER)
4444
4545
# The path needs to be preserved to prevent bazel from starting with different
4646
# startup options (requiring a restart of bazel).
@@ -65,7 +65,7 @@ SETLOCAL ENABLEDELAYEDEXPANSION
6565
@REM call :rlocation <runfile_path> <abs_path>
6666
@REM The rlocation function maps the given <runfile_path> to its absolute
6767
@REM path and stores the result in a variable named <abs_path>.
68-
@REM This function fails if the <runfile_path> doesn't exist in mainifest
68+
@REM This function fails if the <runfile_path> doesn't exist in manifest
6969
@REM file.
7070
:: Start of rlocation
7171
goto :rlocation_end

crate_universe/private/generate_utils.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ def determine_repin(
362362
config,
363363
splicing_manifest,
364364
repin_instructions = None):
365-
"""Use the `cargo-bazel` binary to determine whether or not dpeendencies need to be re-pinned
365+
"""Use the `cargo-bazel` binary to determine whether or not dependencies need to be re-pinned
366366
367367
Args:
368368
repository_ctx (repository_ctx): The rule's context object.

examples/crate_universe/using_cxx/include/blobstore.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ struct BlobMetadata;
1212
class BlobstoreClient {
1313
public:
1414
BlobstoreClient();
15-
uint64_t put(MultiBuf &buf) const;
15+
uint64_t put(MultiBuf& buf) const;
1616
void tag(uint64_t blobid, rust::Str tag) const;
1717
BlobMetadata metadata(uint64_t blobid) const;
1818

examples/crate_universe/using_cxx/src/blobstore.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class BlobstoreClient::impl {
2727
BlobstoreClient::BlobstoreClient() : impl(new class BlobstoreClient::impl) {}
2828

2929
// Upload a new blob and return a blobid that serves as a handle to the blob.
30-
uint64_t BlobstoreClient::put(MultiBuf &buf) const {
30+
uint64_t BlobstoreClient::put(MultiBuf& buf) const {
3131
std::string contents;
3232

3333
// Traverse the caller's chunk iterator.
@@ -39,7 +39,7 @@ uint64_t BlobstoreClient::put(MultiBuf &buf) const {
3939
if (chunk.size() == 0) {
4040
break;
4141
}
42-
contents.append(reinterpret_cast<const char *>(chunk.data()),
42+
contents.append(reinterpret_cast<const char*>(chunk.data()),
4343
chunk.size());
4444
}
4545

@@ -61,7 +61,7 @@ BlobMetadata BlobstoreClient::metadata(uint64_t blobid) const {
6161
if (blob != impl->blobs.end()) {
6262
metadata.size = blob->second.data.size();
6363
std::for_each(blob->second.tags.cbegin(), blob->second.tags.cend(),
64-
[&](auto &t) { metadata.tags.emplace_back(t); });
64+
[&](auto& t) { metadata.tags.emplace_back(t); });
6565
}
6666
return metadata;
6767
}

ffi/cc/allocator_library/allocator_library.cc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,27 +30,27 @@ typedef __SIZE_TYPE__ uintptr_t;
3030
// New feature as of https://github.com/rust-lang/rust/pull/88098.
3131
__attribute__((weak)) uint8_t __rust_alloc_error_handler_should_panic = 0;
3232

33-
extern "C" uint8_t *__rdl_alloc(uintptr_t size, uintptr_t align);
34-
extern "C" __attribute__((weak)) uint8_t *__rust_alloc(uintptr_t size,
33+
extern "C" uint8_t* __rdl_alloc(uintptr_t size, uintptr_t align);
34+
extern "C" __attribute__((weak)) uint8_t* __rust_alloc(uintptr_t size,
3535
uintptr_t align) {
3636
return __rdl_alloc(size, align);
3737
}
38-
extern "C" void __rdl_dealloc(uint8_t *ptr, uintptr_t size, uintptr_t align);
39-
extern "C" __attribute__((weak)) void __rust_dealloc(uint8_t *ptr,
38+
extern "C" void __rdl_dealloc(uint8_t* ptr, uintptr_t size, uintptr_t align);
39+
extern "C" __attribute__((weak)) void __rust_dealloc(uint8_t* ptr,
4040
uintptr_t size,
4141
uintptr_t align) {
4242
__rdl_dealloc(ptr, size, align);
4343
}
44-
extern "C" uint8_t *__rdl_realloc(uint8_t *ptr, uintptr_t old_size,
44+
extern "C" uint8_t* __rdl_realloc(uint8_t* ptr, uintptr_t old_size,
4545
uintptr_t align, uintptr_t new_size);
46-
extern "C" __attribute__((weak)) uint8_t *__rust_realloc(uint8_t *ptr,
46+
extern "C" __attribute__((weak)) uint8_t* __rust_realloc(uint8_t* ptr,
4747
uintptr_t old_size,
4848
uintptr_t align,
4949
uintptr_t new_size) {
5050
return __rdl_realloc(ptr, old_size, align, new_size);
5151
}
52-
extern "C" uint8_t *__rdl_alloc_zeroed(uintptr_t size, uintptr_t align);
53-
extern "C" __attribute__((weak)) uint8_t *__rust_alloc_zeroed(uintptr_t size,
52+
extern "C" uint8_t* __rdl_alloc_zeroed(uintptr_t size, uintptr_t align);
53+
extern "C" __attribute__((weak)) uint8_t* __rust_alloc_zeroed(uintptr_t size,
5454
uintptr_t align) {
5555
return __rdl_alloc_zeroed(size, align);
5656
}

test/unit/build_script_deps/build_script_deps.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ build_script_deps_test = analysistest.make(
5151
)
5252

5353
def build_script_test_suite(name):
54-
"""Build script analyisis tests.
54+
"""Build script analysis tests.
5555
5656
Args:
5757
name: the test suite name
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
extern "C" void hello(void);
22

3-
int main(int argc, char **argv) {
3+
int main(int argc, char** argv) {
44
hello();
55
return 0;
66
}

0 commit comments

Comments
 (0)