From 803e69f30d69046210a9767ea23ed21c52b009e8 Mon Sep 17 00:00:00 2001
From: liyingjun <yingjun.li@kylin-cloud.com>
Date: Fri, 9 Dec 2016 12:00:06 +0800
Subject: [PATCH] Check that all JSON files don't have \r\n in line

The windows edited file may contain \r\n in line, add a check for
json files for the docs job.

Change-Id: I1ca30be139651ed49eb1f7867616dda6bd080884
---
 tox.ini | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tox.ini b/tox.ini
index 57c41ed1f..279c25890 100644
--- a/tox.ini
+++ b/tox.ini
@@ -91,6 +91,8 @@ commands = {posargs}
 commands =
   rm -rf doc/source/api doc/build api-guide/build api-ref/build
   python setup.py build_sphinx
+  # Check that all JSON files don't have \r\n in line.
+  bash -c "! find doc/ -type f -name *.json | xargs grep -U -n $'\r'"
   # Check that all included JSON files are valid JSON
   bash -c '! find doc/ -type f -name *.json | xargs -t -n1 python -m json.tool 2>&1 > /dev/null | grep -B1 -v ^python'
   oslo-config-generator --config-file=etc/nova/nova-config-generator.conf