| # Copyright 2024 The Fuchsia Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| load("checks/clang-format/clang_format.star", "clang_format") |
| |
| def register_clang_format(**kwargs): |
| # Available arguments: |
| # |
| # tool: Path to buildifier host-tool |
| # Must exist in and be rlative to the local workspace. |
| # |
| # extra_args: Additional arguments passed directly to buildifier. |
| # list of strings |
| # |
| # emit_level: Level for emitting messages. |
| # "notice" | "warning" | "error" |
| # |
| # emit_message: Message to print in case of a found issue. |
| # String. E.g. "Please run <> to format your code." |
| |
| shac.register_check(clang_format.with_args(**kwargs)) |