diff options
Diffstat (limited to 'compiler_wrapper/testdata/cros_hardened_golden/clangtidy.json')
-rw-r--r-- | compiler_wrapper/testdata/cros_hardened_golden/clangtidy.json | 343 |
1 files changed, 343 insertions, 0 deletions
diff --git a/compiler_wrapper/testdata/cros_hardened_golden/clangtidy.json b/compiler_wrapper/testdata/cros_hardened_golden/clangtidy.json new file mode 100644 index 00000000..03d0c437 --- /dev/null +++ b/compiler_wrapper/testdata/cros_hardened_golden/clangtidy.json @@ -0,0 +1,343 @@ +[ + { + "wd": "/tmp/stable", + "env": [ + "WITH_TIDY=1" + ], + "wrapper": { + "cmd": { + "path": "./x86_64-cros-linux-gnu-clang", + "args": [ + "main.cc" + ] + } + }, + "cmds": [ + { + "cmd": { + "path": "../../usr/bin/clang", + "args": [ + "--print-resource-dir" + ] + }, + "stdout": "someResourceDir" + }, + { + "cmd": { + "path": "../../usr/bin/clang-tidy", + "args": [ + "-checks=*,google*,-bugprone-narrowing-conversions,-cppcoreguidelines-*,-fuchsia-*,-google-build-using-namespace,-google-default-arguments,-google-explicit-constructor,-google-readability*,-google-runtime-int,-google-runtime-references,-hicpp-avoid-c-arrays,-hicpp-braces-around-statements,-hicpp-no-array-decay,-hicpp-signed-bitwise,-hicpp-uppercase-literal-suffix,-hicpp-use-auto,-llvm-namespace-comment,-misc-non-private-member-variables-in-classes,-misc-unused-parameters,-modernize-*,-readability-*", + "main.cc", + "--", + "-resource-dir=someResourceDir", + "--sysroot=/usr/x86_64-cros-linux-gnu", + "-Qunused-arguments", + "-grecord-gcc-switches", + "-fno-addrsig", + "-Wno-tautological-constant-compare", + "-Wno-tautological-unsigned-enum-zero-compare", + "-Wno-unknown-warning-option", + "-Wno-section", + "-static-libgcc", + "-fuse-ld=lld", + "-fstack-protector-strong", + "-fPIE", + "-pie", + "-D_FORTIFY_SOURCE=2", + "-fno-omit-frame-pointer", + "main.cc", + "-B../../bin", + "-target", + "x86_64-cros-linux-gnu" + ] + } + }, + { + "cmd": { + "path": "../../usr/bin/clang", + "args": [ + "--sysroot=/usr/x86_64-cros-linux-gnu", + "-Qunused-arguments", + "-grecord-gcc-switches", + "-fno-addrsig", + "-Wno-tautological-constant-compare", + "-Wno-tautological-unsigned-enum-zero-compare", + "-Wno-unknown-warning-option", + "-Wno-section", + "-static-libgcc", + "-fuse-ld=lld", + "-fstack-protector-strong", + "-fPIE", + "-pie", + "-D_FORTIFY_SOURCE=2", + "-fno-omit-frame-pointer", + "main.cc", + "-B../../bin", + "-target", + "x86_64-cros-linux-gnu" + ] + } + } + ] + }, + { + "wd": "/tmp/stable", + "env": [ + "WITH_TIDY=1", + "GOMACC_PATH=/tmp/stable/gomacc" + ], + "wrapper": { + "cmd": { + "path": "./x86_64-cros-linux-gnu-clang", + "args": [ + "main.cc" + ] + } + }, + "cmds": [ + { + "cmd": { + "path": "../../usr/bin/clang", + "args": [ + "--print-resource-dir" + ] + }, + "stdout": "someResourceDir" + }, + { + "cmd": { + "path": "../../usr/bin/clang-tidy", + "args": [ + "-checks=*,google*,-bugprone-narrowing-conversions,-cppcoreguidelines-*,-fuchsia-*,-google-build-using-namespace,-google-default-arguments,-google-explicit-constructor,-google-readability*,-google-runtime-int,-google-runtime-references,-hicpp-avoid-c-arrays,-hicpp-braces-around-statements,-hicpp-no-array-decay,-hicpp-signed-bitwise,-hicpp-uppercase-literal-suffix,-hicpp-use-auto,-llvm-namespace-comment,-misc-non-private-member-variables-in-classes,-misc-unused-parameters,-modernize-*,-readability-*", + "main.cc", + "--", + "-resource-dir=someResourceDir", + "--sysroot=/usr/x86_64-cros-linux-gnu", + "-Qunused-arguments", + "-grecord-gcc-switches", + "-fno-addrsig", + "-Wno-tautological-constant-compare", + "-Wno-tautological-unsigned-enum-zero-compare", + "-Wno-unknown-warning-option", + "-Wno-section", + "-static-libgcc", + "-fuse-ld=lld", + "-fstack-protector-strong", + "-fPIE", + "-pie", + "-D_FORTIFY_SOURCE=2", + "-fno-omit-frame-pointer", + "main.cc", + "-B../../bin", + "-target", + "x86_64-cros-linux-gnu" + ] + } + }, + { + "cmd": { + "path": "/tmp/stable/gomacc", + "args": [ + "../../usr/bin/clang", + "--sysroot=/usr/x86_64-cros-linux-gnu", + "-Qunused-arguments", + "-grecord-gcc-switches", + "-fno-addrsig", + "-Wno-tautological-constant-compare", + "-Wno-tautological-unsigned-enum-zero-compare", + "-Wno-unknown-warning-option", + "-Wno-section", + "-static-libgcc", + "-fuse-ld=lld", + "-fstack-protector-strong", + "-fPIE", + "-pie", + "-D_FORTIFY_SOURCE=2", + "-fno-omit-frame-pointer", + "main.cc", + "-B../../bin", + "-target", + "x86_64-cros-linux-gnu" + ] + } + } + ] + }, + { + "wd": "/tmp/stable", + "env": [ + "WITH_TIDY=1", + "GOMACC_PATH=/tmp/stable/gomacc" + ], + "wrapper": { + "cmd": { + "path": "./x86_64-cros-linux-gnu-clang", + "args": [ + "main.cc" + ] + }, + "stdout": "somemessage", + "stderr": "someerrorclang-tidy failed" + }, + "cmds": [ + { + "cmd": { + "path": "../../usr/bin/clang", + "args": [ + "--print-resource-dir" + ] + }, + "stdout": "someResourceDir" + }, + { + "cmd": { + "path": "../../usr/bin/clang-tidy", + "args": [ + "-checks=*,google*,-bugprone-narrowing-conversions,-cppcoreguidelines-*,-fuchsia-*,-google-build-using-namespace,-google-default-arguments,-google-explicit-constructor,-google-readability*,-google-runtime-int,-google-runtime-references,-hicpp-avoid-c-arrays,-hicpp-braces-around-statements,-hicpp-no-array-decay,-hicpp-signed-bitwise,-hicpp-uppercase-literal-suffix,-hicpp-use-auto,-llvm-namespace-comment,-misc-non-private-member-variables-in-classes,-misc-unused-parameters,-modernize-*,-readability-*", + "main.cc", + "--", + "-resource-dir=someResourceDir", + "--sysroot=/usr/x86_64-cros-linux-gnu", + "-Qunused-arguments", + "-grecord-gcc-switches", + "-fno-addrsig", + "-Wno-tautological-constant-compare", + "-Wno-tautological-unsigned-enum-zero-compare", + "-Wno-unknown-warning-option", + "-Wno-section", + "-static-libgcc", + "-fuse-ld=lld", + "-fstack-protector-strong", + "-fPIE", + "-pie", + "-D_FORTIFY_SOURCE=2", + "-fno-omit-frame-pointer", + "main.cc", + "-B../../bin", + "-target", + "x86_64-cros-linux-gnu" + ] + }, + "stdout": "somemessage", + "stderr": "someerror", + "exitcode": 1 + }, + { + "cmd": { + "path": "/tmp/stable/gomacc", + "args": [ + "../../usr/bin/clang", + "--sysroot=/usr/x86_64-cros-linux-gnu", + "-Qunused-arguments", + "-grecord-gcc-switches", + "-fno-addrsig", + "-Wno-tautological-constant-compare", + "-Wno-tautological-unsigned-enum-zero-compare", + "-Wno-unknown-warning-option", + "-Wno-section", + "-static-libgcc", + "-fuse-ld=lld", + "-fstack-protector-strong", + "-fPIE", + "-pie", + "-D_FORTIFY_SOURCE=2", + "-fno-omit-frame-pointer", + "main.cc", + "-B../../bin", + "-target", + "x86_64-cros-linux-gnu" + ] + } + } + ] + }, + { + "wd": "/tmp/stable", + "env": [ + "WITH_TIDY=1", + "GOMACC_PATH=/tmp/stable/gomacc" + ], + "wrapper": { + "cmd": { + "path": "./x86_64-cros-linux-gnu-clang", + "args": [ + "main.cc" + ] + }, + "stdout": "somemessage", + "stderr": "someerror", + "exitcode": 1 + }, + "cmds": [ + { + "cmd": { + "path": "../../usr/bin/clang", + "args": [ + "--print-resource-dir" + ] + }, + "stdout": "someResourceDir" + }, + { + "cmd": { + "path": "../../usr/bin/clang-tidy", + "args": [ + "-checks=*,google*,-bugprone-narrowing-conversions,-cppcoreguidelines-*,-fuchsia-*,-google-build-using-namespace,-google-default-arguments,-google-explicit-constructor,-google-readability*,-google-runtime-int,-google-runtime-references,-hicpp-avoid-c-arrays,-hicpp-braces-around-statements,-hicpp-no-array-decay,-hicpp-signed-bitwise,-hicpp-uppercase-literal-suffix,-hicpp-use-auto,-llvm-namespace-comment,-misc-non-private-member-variables-in-classes,-misc-unused-parameters,-modernize-*,-readability-*", + "main.cc", + "--", + "-resource-dir=someResourceDir", + "--sysroot=/usr/x86_64-cros-linux-gnu", + "-Qunused-arguments", + "-grecord-gcc-switches", + "-fno-addrsig", + "-Wno-tautological-constant-compare", + "-Wno-tautological-unsigned-enum-zero-compare", + "-Wno-unknown-warning-option", + "-Wno-section", + "-static-libgcc", + "-fuse-ld=lld", + "-fstack-protector-strong", + "-fPIE", + "-pie", + "-D_FORTIFY_SOURCE=2", + "-fno-omit-frame-pointer", + "main.cc", + "-B../../bin", + "-target", + "x86_64-cros-linux-gnu" + ] + } + }, + { + "cmd": { + "path": "/tmp/stable/gomacc", + "args": [ + "../../usr/bin/clang", + "--sysroot=/usr/x86_64-cros-linux-gnu", + "-Qunused-arguments", + "-grecord-gcc-switches", + "-fno-addrsig", + "-Wno-tautological-constant-compare", + "-Wno-tautological-unsigned-enum-zero-compare", + "-Wno-unknown-warning-option", + "-Wno-section", + "-static-libgcc", + "-fuse-ld=lld", + "-fstack-protector-strong", + "-fPIE", + "-pie", + "-D_FORTIFY_SOURCE=2", + "-fno-omit-frame-pointer", + "main.cc", + "-B../../bin", + "-target", + "x86_64-cros-linux-gnu" + ] + }, + "stdout": "somemessage", + "stderr": "someerror", + "exitcode": 1 + } + ] + } +] |