#!/bin/sh

# Copyright © 2018-2022 Jakub Wilk <jwilk@jwilk.net>
#
# This file is part of pdf2djvu.
#
# pdf2djvu is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# pdf2djvu is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.

here=${0%/*}
here=${here#./}
root="$here/../"
root=${root#private/../}

if [ $# -eq 0 ]
then
    set -- "${root:-.}/"*.cc
fi

exec cppcheck \
    --enable=warning \
    --error-exitcode=1 \
    --suppress='uninitvar:sys-encoding.cc:143' \
    --suppress='syntaxError:string-format.cc:211' \
    "$@"

# vim:ts=4 sts=4 sw=4 et
