Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(28)

Unified Diff: native_client_sdk/src/doc/PRESUBMIT.py

Issue 23531031: Minor cleanups for SDK devsite docs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: native_client_sdk/src/doc/PRESUBMIT.py
diff --git a/native_client_sdk/src/doc/PRESUBMIT.py b/native_client_sdk/src/doc/PRESUBMIT.py
new file mode 100644
index 0000000000000000000000000000000000000000..22dceb7528d3797841c9418ade2e794b407da937
--- /dev/null
+++ b/native_client_sdk/src/doc/PRESUBMIT.py
@@ -0,0 +1,33 @@
+# Copyright (c) 2012 The Chromium Authors. All rights reserved.
binji 2013/09/05 00:52:51 2013
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import subprocess
+
+def _CheckSphinxBuild(input_api, output_api):
binji 2013/09/05 00:52:51 I assume this is only run if a file in the docs di
+ """Check that the docs are buildable without any warnings.
+
+ This check runs sphinx-build with -W so that warning are errors.
+ """
+
+ try:
+ subprocess.check_output(['make', 'SPHINXOPTS=-Wa'])
+ except subprocess.CalledProcessError as e:
+ return [output_api.PresubmitPromptError('sphinx_build failed:\n' +
+ e.output)]
+
+ return []
+
+
+def CommonChecks(input_api, output_api):
+ output = []
+ output.extend(_CheckSphinxBuild(input_api, output_api))
+ return output
+
+
+def CheckChangeOnUpload(input_api, output_api):
+ return CommonChecks(input_api, output_api)
+
+
+def CheckChangeOnCommit(input_api, output_api):
+ return CommonChecks(input_api, output_api)

Powered by Google App Engine
This is Rietveld 408576698