changeset 73:7ed63a934571

Check for presents of :local: keyword.
author Oleksandr Gavenko <gavenkoa@gmail.com>
date Mon, 22 Feb 2016 13:31:27 +0200
parents 6cc2c19c8995
children 69323ee4fd3a
files Makefile
diffstat 1 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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