| // Copyright (C) 2020 The Android Open Source Project |
| // |
| // Licensed under the Apache License, Version 2.0 (the "License"); |
| // you may not use this file except in compliance with the License. |
| // You may obtain a copy of the License at |
| // |
| // http://www.apache.org/licenses/LICENSE-2.0 |
| // |
| // Unless required by applicable law or agreed to in writing, software |
| // distributed under the License is distributed on an "AS IS" BASIS, |
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| // See the License for the specific language governing permissions and |
| // limitations under the License. |
| // List of clang-tidy checks that are reported as errors. |
| // Please keep this list ordered lexicographically. |
| |
| package { |
| // See: http://go/android-license-faq |
| // A large-scale-change added 'default_applicable_licenses' to import |
| // all of the 'license_kinds' from "system_security_license" |
| // to get the below license kinds: |
| // SPDX-license-identifier-Apache-2.0 |
| default_applicable_licenses: ["system_security_license"], |
| } |
| |
| tidy_errors = [ |
| "cert-err34-c", |
| "google-default-arguments", |
| "google-runtime-int", |
| "google-runtime-member-string-references", |
| "misc-move-const-arg", |
| "misc-move-forwarding-reference", |
| "misc-unused-parameters", |
| "misc-unused-using-decls", |
| "misc-use-after-move", |
| "modernize-pass-by-value", |
| "performance-faster-string-find", |
| "performance-for-range-copy", |
| "performance-implicit-conversion-in-loop", |
| "performance-inefficient-vector-operation", |
| "performance-move-const-arg", |
| "performance-move-constructor-init", |
| "performance-noexcept-move-constructor", |
| "performance-unnecessary-value-param", |
| ] |
| |
| cc_defaults { |
| cpp_std: "experimental", |
| name: "odsign_flags_defaults", |
| cflags: [ |
| "-Wall", |
| "-Wextra", |
| "-Werror", |
| "-Wno-unused-parameter", |
| |
| // Some extra flags. |
| "-fstrict-aliasing", |
| "-Wredundant-decls", |
| "-Wshadow", |
| "-Wstrict-aliasing", |
| "-Wthread-safety", |
| "-Wthread-safety-negative", |
| "-Wunreachable-code", |
| "-Wunreachable-code-break", |
| "-Wunreachable-code-return", |
| "-Wunused", |
| "-Wused-but-marked-unused", |
| ], |
| tidy: true, |
| tidy_checks: tidy_errors, |
| tidy_checks_as_errors: tidy_errors, |
| tidy_flags: [ |
| "-format-style=file", |
| ], |
| } |
| |
| cc_binary { |
| name: "odsign", |
| defaults: [ |
| "odsign_flags_defaults", |
| ], |
| cpp_std: "experimental", |
| init_rc: ["odsign.rc"], |
| srcs: [ |
| "odsign_main.cpp", |
| "CertUtils.cpp", |
| "KeystoreKey.cpp", |
| "KeystoreHmacKey.cpp", |
| "VerityUtils.cpp", |
| ], |
| |
| header_libs: ["odrefresh_headers"], |
| |
| static_libs: [ |
| "libc++fs", |
| "lib_odsign_proto", |
| ], |
| |
| shared_libs: [ |
| "android.system.keystore2-V1-cpp", |
| "android.hardware.security.keymint-V1-cpp", |
| "libbase", |
| "libbinder", |
| "libcrypto", |
| "libcrypto_utils", |
| "libfsverity", |
| "liblogwrap", |
| "libprotobuf-cpp-full", |
| "libutils", |
| ], |
| } |