diff options
author | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2018-11-02 10:31:12 +0000 |
---|---|---|
committer | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2019-01-09 05:18:43 +0000 |
commit | b9e8fee0e7b0d79ab2f20ea2852e4766c73e7dbc (patch) | |
tree | fb5062606f01dfa6fab69666fd26e89c4c23579b /tools | |
parent | 9565119d6e46251aef8ec06dde140b77a96b634b (diff) |
Add validate-clang-check script for Petri Dish
Launch clang-check -analyze for each file...
Change-Id: Ic4132d563ccaa5d375f27d08366ba6fc052f095c
Reviewed-on: https://code.wireshark.org/review/30482
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/validate-clang-check.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tools/validate-clang-check.py b/tools/validate-clang-check.py new file mode 100755 index 0000000000..61e1d9f8b4 --- /dev/null +++ b/tools/validate-clang-check.py @@ -0,0 +1,19 @@ +#!/bin/sh +# Copyright 2018, Alexis La Goutte (See AUTHORS file) +# +# Verifies last commit with clang-check (like scan-build) for Petri Dish +# +# Wireshark - Network traffic analyzer +# By Gerald Combs <gerald@wireshark.org> +# Copyright 1998 Gerald Combs +# +# SPDX-License-Identifier: GPL-2.0-or-later +# + +COMMIT_FILES=$( git diff-index --cached --name-status HEAD^ | grep -v "^D" | cut -f2 | grep "\\.c$\|cpp$" ) + +for FILE in $COMMIT_FILES; do + + clang-check -analyze ../$FILE + +done |