You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by wo...@apache.org on 2019/02/01 20:11:13 UTC

[couchdb-documentation] branch master updated: Fix linter sometimes ignoring errors (#387)

This is an automated email from the ASF dual-hosted git repository.

wohali pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb-documentation.git


The following commit(s) were added to refs/heads/master by this push:
     new 48182d8  Fix linter sometimes ignoring errors (#387)
48182d8 is described below

commit 48182d860591df2be38e879200145064100cf020
Author: Joan Touzet <wo...@users.noreply.github.com>
AuthorDate: Fri Feb 1 15:11:09 2019 -0500

    Fix linter sometimes ignoring errors (#387)
---
 ext/linter.py             | 5 ++++-
 src/config/couchdb.rst    | 2 --
 src/cve/2012-5641.rst     | 2 --
 src/cve/2014-2668.rst     | 2 --
 src/intro/curl.rst        | 2 --
 src/replication/intro.rst | 1 -
 6 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/ext/linter.py b/ext/linter.py
index 0a38c6d..74b4d9d 100644
--- a/ext/linter.py
+++ b/ext/linter.py
@@ -26,7 +26,6 @@ IGNORE_ERROR = False
 def error_report(file, line, msg, _state=[]):
     global HAS_ERRORS, IGNORE_ERROR
     if IGNORE_ERROR:
-        IGNORE_ERROR = False
         return
     if _state and _state[0] == file.name:
         pass
@@ -64,6 +63,8 @@ def iter_rst_files(path):
 
 
 def validate(file):
+    global IGNORE_ERROR
+    IGNORE_ERROR = False
     rules = [rule(file) for rule in RULES]
     for rule in rules:
         for _ in rule:
@@ -103,6 +104,8 @@ def silent_scream(file):
         if counter:
             IGNORE_ERROR = True
             counter -= 1
+        else:
+            IGNORE_ERROR = False
 
         match = re.match("\s*.. lint: ignore errors for the next (\d+) line?", line)
         if match:
diff --git a/src/config/couchdb.rst b/src/config/couchdb.rst
index 1795f4f..241eabe 100644
--- a/src/config/couchdb.rst
+++ b/src/config/couchdb.rst
@@ -24,8 +24,6 @@ Base CouchDB Options
 
 .. config:section:: couchdb :: Base CouchDB Options
 
-    .. lint: ignore errors for the next 1 line
-
     .. config:option:: attachment_stream_buffer_size :: Attachment streaming buffer
 
         Higher values may result in better read performance due to fewer read
diff --git a/src/cve/2012-5641.rst b/src/cve/2012-5641.rst
index db06b90..e387332 100644
--- a/src/cve/2012-5641.rst
+++ b/src/cve/2012-5641.rst
@@ -10,8 +10,6 @@
 .. License for the specific language governing permissions and limitations under
 .. the License.
 
-.. lint: ignore errors for the next 5 lines
-
 .. _cve/2012-5641:
 
 ==================================================================================
diff --git a/src/cve/2014-2668.rst b/src/cve/2014-2668.rst
index 1f4f733..7cdb725 100644
--- a/src/cve/2014-2668.rst
+++ b/src/cve/2014-2668.rst
@@ -10,8 +10,6 @@
 .. License for the specific language governing permissions and limitations under
 .. the License.
 
-.. lint: ignore errors for the next 5 lines
-
 .. _cve/2014-2668:
 
 ==================================================================================
diff --git a/src/intro/curl.rst b/src/intro/curl.rst
index c311830..1228186 100644
--- a/src/intro/curl.rst
+++ b/src/intro/curl.rst
@@ -51,8 +51,6 @@ clarity):
 
         shell> curl 'http://couchdb:5984/_uuids?count=5'
 
-.. lint: ignore errors for the next 15 lines
-
 .. note::
     On Microsoft Windows, use double-quotes anywhere you see single-quotes in
     the following examples. Use doubled double-quotes ("") anywhere you see
diff --git a/src/replication/intro.rst b/src/replication/intro.rst
index a2fd534..8bc4afa 100644
--- a/src/replication/intro.rst
+++ b/src/replication/intro.rst
@@ -26,7 +26,6 @@ the end of the process, all active documents on the source database are also in
 the destination database and all documents that were deleted in the source
 databases are also deleted on the destination database (if they even existed).
 
-
 Transient and Persistant Replication
 ====================================