diff --git a/devertexwahn/MODULE.bazel b/devertexwahn/MODULE.bazel index cdd8e5b1..f11f45d1 100644 --- a/devertexwahn/MODULE.bazel +++ b/devertexwahn/MODULE.bazel @@ -12,6 +12,7 @@ module( bazel_dep(name = "abseil-cpp", version = "20240722.0.bcr.2") bazel_dep(name = "apple_support", version = "1.17.1") +bazel_dep(name = "bazel_clang_tidy") bazel_dep(name = "bazel_skylib", version = "1.7.1") bazel_dep(name = "boost.algorithm", version = "1.83.0.bcr.1") bazel_dep(name = "boost.asio", version = "1.83.0.bcr.2") @@ -74,6 +75,11 @@ local_path_override( path = "../third_party/Catch2", ) +local_path_override( + module_name = "bazel_clang_tidy", + path = "../third_party/bazel_clang_tidy", +) + local_path_override( module_name = "cpuinfo", path = "../third_party/cpuinfo", diff --git a/third_party/bazel_clang_tidy/.bazelrc b/third_party/bazel_clang_tidy/.bazelrc new file mode 100644 index 00000000..2d2ed2b1 --- /dev/null +++ b/third_party/bazel_clang_tidy/.bazelrc @@ -0,0 +1,2 @@ +build:clang-tidy --aspects @bazel_clang_tidy//clang_tidy:clang_tidy.bzl%clang_tidy_aspect +build:clang-tidy --output_groups=report \ No newline at end of file diff --git a/third_party/bazel_clang_tidy/.clang-tidy b/third_party/bazel_clang_tidy/.clang-tidy new file mode 100644 index 00000000..6f89a5f3 --- /dev/null +++ b/third_party/bazel_clang_tidy/.clang-tidy @@ -0,0 +1,9 @@ +UseColor: true + +Checks: > + bugprone-*, + cppcoreguidelines-*, + google-*, + performance-*, + +WarningsAsErrors: "*" diff --git a/third_party/bazel_clang_tidy/.github/workflows/ci.yml b/third_party/bazel_clang_tidy/.github/workflows/ci.yml new file mode 100644 index 00000000..a2f96bae --- /dev/null +++ b/third_party/bazel_clang_tidy/.github/workflows/ci.yml @@ -0,0 +1,36 @@ +# This is a basic workflow to help you get started with Actions + +name: CI + +# Controls when the action will run. +on: + # Triggers the workflow on push or pull request events but only for the master branch + push: + branches: [master] + pull_request: + branches: [master] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 + + - name: Mount bazel cache + uses: actions/cache@v1 + with: + path: "/home/runner/.cache/bazel" + key: ${{ runner.os }}-bazel + + # Runs a single command using the runners shell + - name: Build + run: bazelisk build //... diff --git a/third_party/bazel_clang_tidy/.gitignore b/third_party/bazel_clang_tidy/.gitignore new file mode 100644 index 00000000..ac51a054 --- /dev/null +++ b/third_party/bazel_clang_tidy/.gitignore @@ -0,0 +1 @@ +bazel-* diff --git a/third_party/bazel_clang_tidy/BUILD b/third_party/bazel_clang_tidy/BUILD new file mode 100644 index 00000000..eaec5025 --- /dev/null +++ b/third_party/bazel_clang_tidy/BUILD @@ -0,0 +1,35 @@ +filegroup( + name = "clang_tidy_config_default", + srcs = [ + ".clang-tidy", + # '//example:clang_tidy_config', # add package specific configs if needed + ], +) + +label_flag( + name = "clang_tidy_config", + build_setting_default = ":clang_tidy_config_default", + visibility = ["//visibility:public"], +) + +filegroup( + name = "clang_tidy_executable_default", + srcs = [], # empty list: system clang-tidy +) + +label_flag( + name = "clang_tidy_executable", + build_setting_default = ":clang_tidy_executable_default", + visibility = ["//visibility:public"], +) + +filegroup( + name = "clang_tidy_additional_deps_default", + srcs = [], +) + +label_flag( + name = "clang_tidy_additional_deps", + build_setting_default = ":clang_tidy_additional_deps_default", + visibility = ["//visibility:public"], +) diff --git a/third_party/bazel_clang_tidy/LICENSE b/third_party/bazel_clang_tidy/LICENSE new file mode 100644 index 00000000..20c3b872 --- /dev/null +++ b/third_party/bazel_clang_tidy/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Benedek Thaler + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/third_party/bazel_clang_tidy/MODULE.bazel b/third_party/bazel_clang_tidy/MODULE.bazel new file mode 100644 index 00000000..ba6c1db7 --- /dev/null +++ b/third_party/bazel_clang_tidy/MODULE.bazel @@ -0,0 +1 @@ +module(name = "bazel_clang_tidy") diff --git a/third_party/bazel_clang_tidy/README.md b/third_party/bazel_clang_tidy/README.md new file mode 100644 index 00000000..a1afea00 --- /dev/null +++ b/third_party/bazel_clang_tidy/README.md @@ -0,0 +1,123 @@ +# bazel_clang_tidy + +Run clang-tidy on Bazel C/C++ targets directly, +without generating a compile commands database, +and take advantage of Bazels powerful cache mechanism. + +Usage: + +```py +# //:WORKSPACE +load( + "@bazel_tools//tools/build_defs/repo:git.bzl", + "git_repository", +) + +git_repository( + name = "bazel_clang_tidy", + commit = "bff5c59c843221b05ef0e37cef089ecc9d24e7da", + remote = "https://github.com/erenon/bazel_clang_tidy.git", +) +``` + +You can now compile using the default clang tidy configuration provided using +the following command; + +```text +bazel build //... \ + --aspects @bazel_clang_tidy//clang_tidy:clang_tidy.bzl%clang_tidy_aspect \ + --output_groups=report +``` + +If you would like to override the default clang tidy configuration then you can +reconfigure the default target from the command line. To do this you must first +make a filegroup target that has the .clang-tidy config file as a data +dependency. + +```py +# //:BUILD +filegroup( + name = "clang_tidy_config", + srcs = [".clang-tidy"], + visibility = ["//visibility:public"], +) +``` + +Now you can override the default config file in this repository using +a command line flag; + +```sh +bazel build //... \ + --aspects @bazel_clang_tidy//clang_tidy:clang_tidy.bzl%clang_tidy_aspect \ + --output_groups=report \ + --@bazel_clang_tidy//:clang_tidy_config=//:clang_tidy_config +``` + +:exclamation: the config-file will not be forced by adding it to the clang-tidy command line. Therefore it must be in one of the parents of all source files. It is recommended to put it in the root directly besides the WORKSPACE file. + +Now if you don't want to type this out every time, it is recommended that you +add a config in your .bazelrc that matches this command line; + +```text +# Required for bazel_clang_tidy to operate as expected +build:clang-tidy --aspects @bazel_clang_tidy//clang_tidy:clang_tidy.bzl%clang_tidy_aspect +build:clang-tidy --output_groups=report + +# Optionally override the .clang-tidy config file target +build:clang-tidy --@bazel_clang_tidy//:clang_tidy_config=//:clang_tidy_config +``` + +Now from the command line this is a lot nicer to use; + +```sh +bazel build //... --config clang-tidy +``` + +### use a non-system clang-tidy + +by default, bazel_clang_tidy uses the system provided clang-tidy. +If you have a hermetic build, you can use your own clang-tidy target like this: + +```text +build:clang-tidy --@bazel_clang_tidy//:clang_tidy_executable=@local_config_cc//:clangtidy_bin +``` + +This aspect is not executed on external targets. To exclude other targets, +users may tag a target with `no-clang-tidy` or `noclangtidy`. + +## Features + +- Run clang-tidy on any C/C++ target + - A file is treated as C if it has the `.c` extension or its target includes the `clang-tidy-is-c-tu` tag; otherwise, it is treated as C++. +- Run clang-tidy without also building the target +- Use Bazel to cache clang-tidy reports: recompute stale reports only + +## Install + +Copy `.clang-tidy`, `BUILD` and `clang_tidy` dir to your workspace. +Edit `.clang-tidy` as needed. + +## Example + +To see the tool in action: + +1. Clone the repository +1. Run clang-tidy: + + ```sh + bazel build //example --aspects clang_tidy/clang_tidy.bzl%clang_tidy_aspect --output_groups=report + ``` + +1. Check the error: + + ```text + lib.cpp:4:43: error: the parameter 'name' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param,-warnings-as-errors] std::string lib_get_greet_for(std::string name) + Aspect //clang_tidy:clang_tidy.bzl%clang_tidy_aspect of //example:app failed to build + ``` + +1. Fix the error by changing `lib.cpp` only. +1. Re-run clang-tidy with the same command. Observe that it does not run clang-tidy for `app.cpp`: the cached report is re-used. + +## Requirements + +- Bazel 4.0 or newer (might work with older versions) diff --git a/third_party/bazel_clang_tidy/WORKSPACE b/third_party/bazel_clang_tidy/WORKSPACE new file mode 100644 index 00000000..adfd4027 --- /dev/null +++ b/third_party/bazel_clang_tidy/WORKSPACE @@ -0,0 +1 @@ +workspace(name = "bazel_clang_tidy") diff --git a/third_party/bazel_clang_tidy/clang_tidy/BUILD b/third_party/bazel_clang_tidy/clang_tidy/BUILD new file mode 100644 index 00000000..d1c4987e --- /dev/null +++ b/third_party/bazel_clang_tidy/clang_tidy/BUILD @@ -0,0 +1,6 @@ +sh_binary( + name = "clang_tidy", + srcs = ["run_clang_tidy.sh"], + data = ["//:clang_tidy_config"], + visibility = ["//visibility:public"], +) diff --git a/third_party/bazel_clang_tidy/clang_tidy/clang_tidy.bzl b/third_party/bazel_clang_tidy/clang_tidy/clang_tidy.bzl new file mode 100644 index 00000000..85bfb272 --- /dev/null +++ b/third_party/bazel_clang_tidy/clang_tidy/clang_tidy.bzl @@ -0,0 +1,249 @@ +load("@bazel_tools//tools/build_defs/cc:action_names.bzl", "ACTION_NAMES") +load("@bazel_tools//tools/cpp:toolchain_utils.bzl", "find_cpp_toolchain") + +def _run_tidy( + ctx, + wrapper, + exe, + additional_deps, + config, + flags, + compilation_contexts, + infile, + discriminator): + cc_toolchain = find_cpp_toolchain(ctx) + inputs = depset( + direct = ( + [infile, config] + + additional_deps.files.to_list() + + ([exe.files_to_run.executable] if exe.files_to_run.executable else []) + ), + transitive = + [compilation_context.headers for compilation_context in compilation_contexts] + + [cc_toolchain.all_files], + ) + + args = ctx.actions.args() + + # specify the output file - twice + outfile = ctx.actions.declare_file( + "bazel_clang_tidy_" + infile.path + "." + discriminator + ".clang-tidy.yaml", + ) + + # this is consumed by the wrapper script + if len(exe.files.to_list()) == 0: + args.add("clang-tidy") + else: + args.add(exe.files_to_run.executable) + + args.add(outfile.path) # this is consumed by the wrapper script + + args.add(config.path) + + args.add("--export-fixes", outfile.path) + + # add source to check + args.add(infile.path) + + # start args passed to the compiler + args.add("--") + + # add args specified by the toolchain, on the command line and rule copts + args.add_all(flags) + + for compilation_context in compilation_contexts: + # add defines + for define in compilation_context.defines.to_list(): + args.add("-D" + define) + + for define in compilation_context.local_defines.to_list(): + args.add("-D" + define) + + # add includes + for i in compilation_context.framework_includes.to_list(): + args.add("-F" + i) + + for i in compilation_context.includes.to_list(): + args.add("-I" + i) + + args.add_all(compilation_context.quote_includes.to_list(), before_each = "-iquote") + + args.add_all(compilation_context.system_includes.to_list(), before_each = "-isystem") + + args.add_all(compilation_context.external_includes.to_list(), before_each = "-isystem") + + ctx.actions.run( + inputs = inputs, + outputs = [outfile], + executable = wrapper, + arguments = [args], + mnemonic = "ClangTidy", + use_default_shell_env = True, + progress_message = "Run clang-tidy on {}".format(infile.short_path), + ) + return outfile + +def _rule_sources(ctx, include_headers): + header_extensions = ( + ".h", + ".hh", + ".hpp", + ".hxx", + ".inc", + ".inl", + ".H", + ) + permitted_file_types = [ + ".c", + ".cc", + ".cpp", + ".cxx", + ".c++", + ".C", + ] + list(header_extensions) + + def check_valid_file_type(src): + """ + Returns True if the file type matches one of the permitted srcs file types for C and C++ header/source files. + """ + for file_type in permitted_file_types: + if src.basename.endswith(file_type): + return True + return False + + srcs = [] + if hasattr(ctx.rule.attr, "srcs"): + for src in ctx.rule.attr.srcs: + srcs += [src for src in src.files.to_list() if src.is_source and check_valid_file_type(src)] + if hasattr(ctx.rule.attr, "hdrs"): + for hdr in ctx.rule.attr.hdrs: + srcs += [hdr for hdr in hdr.files.to_list() if hdr.is_source and check_valid_file_type(hdr)] + if include_headers: + return srcs + else: + return [src for src in srcs if not src.basename.endswith(header_extensions)] + +def _toolchain_flags(ctx, action_name = ACTION_NAMES.cpp_compile): + cc_toolchain = find_cpp_toolchain(ctx) + feature_configuration = cc_common.configure_features( + ctx = ctx, + cc_toolchain = cc_toolchain, + ) + user_compile_flags = ctx.fragments.cpp.copts + if action_name == ACTION_NAMES.cpp_compile: + user_compile_flags.extend(ctx.fragments.cpp.cxxopts) + elif action_name == ACTION_NAMES.c_compile and hasattr(ctx.fragments.cpp, "conlyopts"): + user_compile_flags.extend(ctx.fragments.cpp.conlyopts) + compile_variables = cc_common.create_compile_variables( + feature_configuration = feature_configuration, + cc_toolchain = cc_toolchain, + user_compile_flags = user_compile_flags, + ) + flags = cc_common.get_memory_inefficient_command_line( + feature_configuration = feature_configuration, + action_name = action_name, + variables = compile_variables, + ) + return flags + +def _safe_flags(flags): + # Some flags might be used by GCC, but not understood by Clang. + # Remove them here, to allow users to run clang-tidy, without having + # a clang toolchain configured (that would produce a good command line with --compiler clang) + unsupported_flags = [ + "-fno-canonical-system-headers", + "-fstack-usage", + ] + + return [flag for flag in flags if flag not in unsupported_flags] + +def _is_c_translation_unit(src, tags): + """Judge if a source file is for C. + + Args: + src(File): Source file object. + tags(list[str]): Tags attached to the target. + + Returns: + bool: Whether the source is for C. + """ + if "clang-tidy-is-c-tu" in tags: + return True + + return src.extension == "c" + +def _clang_tidy_aspect_impl(target, ctx): + # if not a C/C++ target, we are not interested + if not CcInfo in target: + return [] + + # Ignore external targets + if target.label.workspace_root.startswith("external"): + return [] + + # Targets with specific tags will not be formatted + ignore_tags = [ + "noclangtidy", + "no-clang-tidy", + ] + + for tag in ignore_tags: + if tag in ctx.rule.attr.tags: + return [] + + wrapper = ctx.attr._clang_tidy_wrapper.files_to_run + exe = ctx.attr._clang_tidy_executable + additional_deps = ctx.attr._clang_tidy_additional_deps + config = ctx.attr._clang_tidy_config.files.to_list()[0] + + compilation_contexts = [target[CcInfo].compilation_context] + if hasattr(ctx.rule.attr, "implementation_deps"): + compilation_contexts.extend([implementation_dep[CcInfo].compilation_context for implementation_dep in ctx.rule.attr.implementation_deps]) + + copts = ctx.rule.attr.copts if hasattr(ctx.rule.attr, "copts") else [] + rule_flags = [] + for copt in copts: + rule_flags.append(ctx.expand_make_variables( + "copts", + copt, + {}, + )) + + c_flags = _safe_flags(_toolchain_flags(ctx, ACTION_NAMES.c_compile) + rule_flags) + ["-xc"] + cxx_flags = _safe_flags(_toolchain_flags(ctx, ACTION_NAMES.cpp_compile) + rule_flags) + ["-xc++"] + + include_headers = "no-clang-tidy-headers" not in ctx.rule.attr.tags + srcs = _rule_sources(ctx, include_headers) + + outputs = [ + _run_tidy( + ctx, + wrapper, + exe, + additional_deps, + config, + c_flags if _is_c_translation_unit(src, ctx.rule.attr.tags) else cxx_flags, + compilation_contexts, + src, + target.label.name, + ) + for src in srcs + ] + + return [ + OutputGroupInfo(report = depset(direct = outputs)), + ] + +clang_tidy_aspect = aspect( + implementation = _clang_tidy_aspect_impl, + fragments = ["cpp"], + attr_aspects = ["implementation_deps"], + attrs = { + "_cc_toolchain": attr.label(default = Label("@bazel_tools//tools/cpp:current_cc_toolchain")), + "_clang_tidy_wrapper": attr.label(default = Label("//clang_tidy:clang_tidy")), + "_clang_tidy_executable": attr.label(default = Label("//:clang_tidy_executable")), + "_clang_tidy_additional_deps": attr.label(default = Label("//:clang_tidy_additional_deps")), + "_clang_tidy_config": attr.label(default = Label("//:clang_tidy_config")), + }, + toolchains = ["@bazel_tools//tools/cpp:toolchain_type"], +) diff --git a/third_party/bazel_clang_tidy/clang_tidy/run_clang_tidy.sh b/third_party/bazel_clang_tidy/clang_tidy/run_clang_tidy.sh new file mode 100755 index 00000000..5cddb596 --- /dev/null +++ b/third_party/bazel_clang_tidy/clang_tidy/run_clang_tidy.sh @@ -0,0 +1,40 @@ +#!/usr/bin/env bash +# Usage: run_clang_tidy [ARGS...] +set -ue + +CLANG_TIDY_BIN=$1 +shift + +OUTPUT=$1 +shift + +CONFIG=$1 +shift + +# clang-tidy doesn't create a patchfile if there are no errors. +# make sure the output exists, and empty if there are no errors, +# so the build system will not be confused. +touch $OUTPUT +truncate -s 0 $OUTPUT + +# if $CONFIG is provided by some external workspace, we need to +# place it in the current directory +test -e .clang-tidy || ln -s -f $CONFIG .clang-tidy + +# Print output on failure only +logfile="$(mktemp)" +trap 'if (($?)); then cat "$logfile" 1>&2; fi; rm "$logfile"' EXIT + +# Prepend a flag-based disabling of a check that has a serious bug in +# clang-tidy 16 when used with C++20. Bazel always violates this check and the +# warning is typically disabled, but that warning disablement doesn't work +# correctly in this circumstance and so we need to disable it at the clang-tidy +# level both as a check and from `warnings-as-errors` to avoid it getting +# re-promoted to an error. See the clang-tidy bug here for details: +# https://github.com/llvm/llvm-project/issues/61969 +set -- \ + --checks=-clang-diagnostic-builtin-macro-redefined \ + --warnings-as-errors=-clang-diagnostic-builtin-macro-redefined \ + "$@" + +"${CLANG_TIDY_BIN}" "$@" >"$logfile" 2>&1 diff --git a/third_party/bazel_clang_tidy/example/BUILD b/third_party/bazel_clang_tidy/example/BUILD new file mode 100644 index 00000000..a3c0c060 --- /dev/null +++ b/third_party/bazel_clang_tidy/example/BUILD @@ -0,0 +1,27 @@ +cc_library( + name = "lib", + srcs = ["lib.cpp"], + hdrs = ["lib.hpp"], +) + +cc_library( + name = "lib2", + srcs = ["lib.c"], + hdrs = ["lib.h"], +) + +cc_library( + name = "lib_ignored", + srcs = ["lib_ignored.cpp"], + hdrs = ["lib_ignored.hpp"], + tags = ["no-clang-tidy"], +) + +cc_binary( + name = "example", + srcs = ["app.cpp"], + deps = [ + ":lib", + ":lib_ignored", + ], +) diff --git a/third_party/bazel_clang_tidy/example/app.cpp b/third_party/bazel_clang_tidy/example/app.cpp new file mode 100644 index 00000000..5451a019 --- /dev/null +++ b/third_party/bazel_clang_tidy/example/app.cpp @@ -0,0 +1,11 @@ +#include "lib.hpp" +#include "lib_ignored.hpp" + +#include + +int main() +{ + std::cout << lib_get_greet_for("World") << "\n"; + std::cout << lib_with_ignored_warnings("Again") << "\n"; + return 0; +} diff --git a/third_party/bazel_clang_tidy/example/lib.c b/third_party/bazel_clang_tidy/example/lib.c new file mode 100644 index 00000000..eb6f4d5b --- /dev/null +++ b/third_party/bazel_clang_tidy/example/lib.c @@ -0,0 +1,6 @@ +#include "lib.h" + +int foo(int a, int b) +{ + return a + b; +} diff --git a/third_party/bazel_clang_tidy/example/lib.cpp b/third_party/bazel_clang_tidy/example/lib.cpp new file mode 100644 index 00000000..26cca1b8 --- /dev/null +++ b/third_party/bazel_clang_tidy/example/lib.cpp @@ -0,0 +1,7 @@ +#include "lib.hpp" + +// Expect performance-unnecessary-value-param clang-tidy warning below: +std::string lib_get_greet_for(std::string name) +{ + return "Hello " + name + "!"; +} diff --git a/third_party/bazel_clang_tidy/example/lib.h b/third_party/bazel_clang_tidy/example/lib.h new file mode 100644 index 00000000..f3054f36 --- /dev/null +++ b/third_party/bazel_clang_tidy/example/lib.h @@ -0,0 +1,6 @@ +#ifndef EXAMPLE_LIB_H +#define EXAMPLE_LIB_H + +int foo(int a, int b); + +#endif /* EXAMPLE_LIB_H */ diff --git a/third_party/bazel_clang_tidy/example/lib.hpp b/third_party/bazel_clang_tidy/example/lib.hpp new file mode 100644 index 00000000..0e6bcf96 --- /dev/null +++ b/third_party/bazel_clang_tidy/example/lib.hpp @@ -0,0 +1,3 @@ +#include + +std::string lib_get_greet_for(std::string name); diff --git a/third_party/bazel_clang_tidy/example/lib_ignored.cpp b/third_party/bazel_clang_tidy/example/lib_ignored.cpp new file mode 100644 index 00000000..8f3f396c --- /dev/null +++ b/third_party/bazel_clang_tidy/example/lib_ignored.cpp @@ -0,0 +1,8 @@ +#include "lib_ignored.hpp" + +// Expect performance-unnecessary-value-param clang-tidy warning below. +// However, this lib is ignored in the BUILD-file and no warning should be generated. +std::string lib_with_ignored_warnings(std::string name) +{ + return "Hello " + name + "!"; +} diff --git a/third_party/bazel_clang_tidy/example/lib_ignored.hpp b/third_party/bazel_clang_tidy/example/lib_ignored.hpp new file mode 100644 index 00000000..c086806e --- /dev/null +++ b/third_party/bazel_clang_tidy/example/lib_ignored.hpp @@ -0,0 +1,3 @@ +#include + +std::string lib_with_ignored_warnings(std::string name); diff --git a/third_party/software-bill-of-materials.md b/third_party/software-bill-of-materials.md index 9415ba7d..34c27cc9 100644 --- a/third_party/software-bill-of-materials.md +++ b/third_party/software-bill-of-materials.md @@ -9,6 +9,7 @@ This file documents the commit hash of each library if it is not given in the fi ```text abseil-cpp-3735766b3bd68522c8f291675df3fddb4bc3c70d +bazel_clang_tidy-db677011c7363509a288a9fb3bf0a50830bbf791 bazel-skylib-505e1bc3aaae8375f857637f78bf6b3dd953862a bazel-toolchain-795d76fd03e0b17c0961f0981a8512a00cba4fa2 boringssl-7841caede5264d76d32cfd8de693f37554358001