~rvb/maas/component-bug-1307415-1.5

2009.1.1 by jtv at canonical
Add lint check for trailing spaces in documentation. Make JS and documentation lint checks part of “make lint”.
1
#! /bin/sh
2
#
3
# Rudimentary lint check for the documentation.
4
DOCS_WITH_TRAILING_SPACES="$(
5
    find docs -name '*.rst' -print0 |
6
    xargs -r0 grep -l '[[:space:]]$')"
7
if [ -n "$DOCS_WITH_TRAILING_SPACES" ]
8
then
9
    echo "Trailing spaces in documentation:\n$DOCS_WITH_TRAILING_SPACES" >&2
10
    exit 1
11
fi