34b93045c6
This doesn't usually come up because third_party/ is mostly only C code and clang-tidy only runs on C++ code, but it's starting to matter as we roll in Dawn. Change-Id: I52c64cd55281989dad837d6573c38e8b380861a3 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/280329 Commit-Queue: Mike Klein <mtklein@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com> Auto-Submit: Mike Klein <mtklein@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
31 lines
510 B
Bash
Executable File
31 lines
510 B
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# Copyright 2018 Google Inc. All rights reserved.
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
|
|
set -e
|
|
|
|
args=""
|
|
src=""
|
|
|
|
while [ "$1" ]; do
|
|
arg=$1
|
|
|
|
args="$args $1"
|
|
shift
|
|
|
|
if [ "$arg" == "-c" ]; then
|
|
src=$1
|
|
|
|
args="$args $1"
|
|
shift
|
|
fi
|
|
done
|
|
|
|
if [ "$src" ] && [[ "$src" != *"third_party"* ]]; then
|
|
clang-tidy -quiet -header-filter='.*' -warnings-as-errors='*' $src -- $args
|
|
fi
|
|
exec clang++ $args
|
|
|