The open source OpenXR runtime
at v21.0.0 46 lines 1.4 kB view raw
1#!/bin/sh 2# Copyright 2019, Collabora, Ltd. 3# SPDX-License-Identifier: BSL-1.0 4# Author: Ryan Pavlik <ryan.pavlik@collabora.com> 5 6# Runs "codespell" all the source files in this project. 7# Pass: 8# -i 3 9# as arguments to interactively fix detected issues, 10# including ambiguous ones, 11# rather than just directly fixing the ones it can. 12 13# Success error code if no mistakes or only auto-fixable mistakes found. 14# Failure error code if one or more ambiguous fixes found (requiring interactive fixing). 15 16# See https://github.com/codespell-project/codespell 17# or just run pip3 install codespell 18 19set -e 20 21# Comma-delimited list of words for codespell to not try to correct. 22IGNORE_WORDS_LIST="ang,sinc,sie,inout" 23 24SCRIPTDIR=$(cd $(dirname $0) && pwd) 25 26( 27 cd $SCRIPTDIR/.. 28 find \ 29 *.md \ 30 doc \ 31 scripts/format-*.sh \ 32 src/xrt \ 33 \( -name "*.c" \ 34 -o -name "*.cpp" \ 35 -o -name "*.h" \ 36 -o -name "*.hpp" \ 37 -o -name "*.sh" \ 38 -o -name "*.md" \ 39 -o -name "CMakeLists.txt" \) \ 40 -exec codespell \ 41 --exclude-file=${SCRIPTDIR}/monado-codespell.exclude \ 42 --ignore-words-list="${IGNORE_WORDS_LIST}" \ 43 -w \ 44 "$@" \ 45 \{\} + 46)