Check for presents of :local: keyword.
--- a/Makefile Mon Feb 22 13:12:06 2016 +0200
+++ b/Makefile Mon Feb 22 13:31:27 2016 +0200
@@ -197,15 +197,18 @@
.PHONY: check-format-policy
check-format-policy:
\
-for f in *.rst; do \
- if grep '.. -\*- coding: utf-8; -\*-' $$f >/dev/null; then :; else \
+for f in $(RST_FILES); do \
+ if grep '^.. -\*- coding: utf-8; -\*-' $$f >/dev/null; then :; else \
echo $$f:1:" Has no 'coding: utf-8' directive."; \
fi; \
- if grep '.. include:: HEADER.rst' $$f >/dev/null; then :; else \
+ if grep '^.. include:: HEADER.rst' $$f >/dev/null; then :; else \
echo $$f:2:" Has no 'include:: HEADER.rst' directive."; \
fi; \
- if grep '.. contents::' $$f >/dev/null; then :; else \
+ if grep '^.. contents::' $$f >/dev/null; then :; else \
echo $$f:7:" Has no 'contents::' directive."; \
fi; \
+ if grep '^ :local:' $$f >/dev/null; then :; else \
+ echo $$f:7:" Has no ':local:' directive."; \
+ fi; \
done