mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-09 03:57:24 +00:00
This search/replace updates all copyright notices to drop the "All rights reserved", Use "ChromiumOS" instead of "Chromium OS" and drops the trailing dots. This fulfills the request from legal and unifies our notices. ./tools/health-check has been updated to only accept this style. BUG=b:246579983 TEST=./tools/health-check Change-Id: I87a80701dc651f1baf4820e5cc42469d7c5f5bf7 Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3894243 Reviewed-by: Daniel Verkamp <dverkamp@chromium.org> Commit-Queue: Dennis Kempin <denniskempin@google.com>
37 lines
816 B
Python
Executable file
37 lines
816 B
Python
Executable file
#!/usr/bin/env python3
|
|
# Copyright 2022 The ChromiumOS Authors
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
|
|
# Run `rustfmt` on all Rust code contained in the crosvm workspace, including
|
|
# all commmon/* crates as well.
|
|
#
|
|
# Usage:
|
|
#
|
|
# $ bin/fmt
|
|
#
|
|
# To print a diff and exit 1 if code is not formatted, but without changing any
|
|
# files, use:
|
|
#
|
|
# $ bin/fmt --check
|
|
#
|
|
|
|
from impl.common import (
|
|
CROSVM_ROOT,
|
|
run_main,
|
|
cmd,
|
|
chdir,
|
|
)
|
|
|
|
|
|
def main(check: bool = False, nightly: bool = False):
|
|
chdir(CROSVM_ROOT)
|
|
cmd(
|
|
"./tools/health-check --all rust_format python_format markdown_format",
|
|
"--fix" if not check else None,
|
|
"--nightly" if nightly else None,
|
|
).fg()
|
|
|
|
|
|
if __name__ == "__main__":
|
|
run_main(main)
|