Enable reSTLintBear and MarkdownBear 49/53849/3
authorThanh Ha <thanh.ha@linuxfoundation.org>
Sat, 25 Mar 2017 04:05:03 +0000 (00:05 -0400)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Sat, 25 Mar 2017 05:06:03 +0000 (01:06 -0400)
Lint reStructuredText files. Will be a large effort to fix linting in
all existing files so ignore most things for now. At least new additions
will be linted.

Lint Markdown files. However exclude the submodules directory as we
don't want to lint other project Markdown files.

Also fix linting in a few places where it was simple enough to do.

Change-Id: Ie3f36571402016978fd81f174da0e9d12c38b168
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
.coafile [new file with mode: 0644]
README.md
docs/gerrit.rst
docs/release-process/index.rst
docs/release-process/simultaneous-release.rst
tox.ini

diff --git a/.coafile b/.coafile
new file mode 100644 (file)
index 0000000..6aa5640
--- /dev/null
+++ b/.coafile
@@ -0,0 +1,29 @@
+[Markdown]
+bears = MarkdownBear
+files = **/*.md
+ignore = .*/**,
+    docs/submodules/**
+max_line_length = 120
+
+[reStructuredText]
+bears = RSTcheckBear
+files = **/*.rst
+ignore = .*/**,
+    docs/developer-guide/**,
+    docs/documentation.rst,
+    docs/getting-started-guide/**,
+    docs/opendaylight-with-openstack/**,
+    docs/submodules/aaa/**,
+    docs/submodules/coe/**,
+    docs/submodules/federation/**,
+    docs/submodules/genius/**,
+    docs/submodules/infrautils/**,
+    docs/submodules/integration/**,
+    docs/submodules/netconf/**,
+    docs/submodules/netvirt/**,
+    docs/submodules/odlparent/**,
+    docs/submodules/ovsdb/**,
+    docs/submodules/releng/**,
+    docs/submodules/spectrometer/**,
+    docs/templates/template-user-guide.rst,
+    docs/user-guide/**
index b62bcb247bed406f588c69b5c4d220a8575a1ad9..e411cb92989ce6bc8fe5df44595cb18227c079ab 100644 (file)
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
 This project is providing manuals and documentation for OpenDaylight
 
 For the documentation see:
-http://docs.opendaylight.org/
+<http://docs.opendaylight.org/>
 
 For information on how to contribute to and/or build the documentation see:
-http://docs.opendaylight.org/en/latest/documentation.html
+<http://docs.opendaylight.org/en/latest/documentation.html>
index d6d6a66f0cc99f13d58c37406a2dd2e085507b4d..27fdcc58a12b181e5634c11d25b03a6618ee64c8 100644 (file)
@@ -44,7 +44,7 @@ Signing Gerrit Commits
 
    .. code-block:: bash
 
-      brew install gpg2 # if you don't have homebrew, get that here: http://brew.sh/
+      brew install gpg2  # If you don't have homebrew, get that here: http://brew.sh/
       gpg2 --gen-key
       # pick 1 for "RSA and RSA"
       # enter 4096 to creat a 4096-bit key
@@ -62,19 +62,19 @@ Signing Gerrit Commits
       # uid       [ultimate] Colin Dixon <colin at colindixon.com>
       # sub   4096R/DC1497E1 2015-04-06 [expires: 2017-04-05]
       # you're looking for the part after 4096R, which is your key ID
-      gpg2 --send-keys <key-id>
-      # in the above example, the key-id would be F566C9B1
+      gpg2 --send-keys $KEY_ID
+      # in the above example, the $KEY_ID would be F566C9B1
       # you should see output like this:
       # gpg: sending key F566C9B1 to hkp server keys.gnupg.net
 
    If you're trying to participate in an OpenDaylight keysigning, then
-   send the output of ``gpg2 --fingerprint <key-id>`` to
+   send the output of ``gpg2 --fingerprint $KEY_ID`` to
    keysigning@opendaylight.org
 
    .. code-block:: bash
 
-      gpg2 --fingerprint <key-id>
-      # in the above example, the key-id would be F566C9B1
+      gpg2 --fingerprint $KEY_ID
+      # in the above example, the $KEY_ID would be F566C9B1
       # in my case, the output was:
       # pub   4096R/F566C9B1 2015-04-06 [expires: 2017-04-05]
       #       Key fingerprint = 7C37 02AC D651 1FA7 9209  48D3 5DD5 0C4B F566 C9B1
@@ -96,7 +96,7 @@ Signing Gerrit Commits
 
       .. code-block:: bash
 
-         gpg --export -a <fingerprint>
+         gpg --export -a $FINGER_PRINT
          # e.g., gpg --export -a F566C9B1
          # in my case the output looked like:
          # -----BEGIN PGP PUBLIC KEY BLOCK-----
@@ -114,13 +114,13 @@ Signing Gerrit Commits
    d. Copy the output from the above command, paste it into the box,
       and click Add
 
-3. Set up your git to sign commits and push signatures
+4. Set up your git to sign commits and push signatures
 
    .. code-block:: bash
 
       git config commit.gpgsign true
       git config push.gpgsign true
-      git config user.signingkey <fingerprint>
+      git config user.signingkey $FINGER_PRINT
       # e.g., git config user.signingkey F566C9B1
 
    .. note:: you can do this instead with ``git commit -S``
@@ -128,7 +128,7 @@ Signing Gerrit Commits
       on the CLI instead of configuring it in config if you
       want to control which commits use your signature.
 
-4. Commit and push a change
+5. Commit and push a change
 
    a. change a file
    b. ``git commit -asm "test commit"``
@@ -156,7 +156,7 @@ Signing Gerrit Commits
             ``ssh://ckd@git.opendaylight.org:29418/<repo>.git``
             where repo is something like docs or controller
 
-5. Verify that your commit is signed by going to the change in Gerrit
+6. Verify that your commit is signed by going to the change in Gerrit
    and checking for a green check (instead of a blue ?) next to your
    name.
 
index 53eaa27d2021f29d03cbf8d7f45822ef6f420a2d..2e6a5f4c9d69de046e0d6d13891053de5efca7c7 100644 (file)
@@ -22,5 +22,3 @@ Processes
    namespace
    branch-cutting
    simultaneous-release
-
-.. _OpenStack: https://www.openstack.org/
index 7a0e9b73a39118e4bf4f93a084e8fd1e8301b084..c91ade69f3d52ef6527b14798405ab8fa2f25a16 100644 (file)
@@ -14,7 +14,7 @@ After release candidate is built gpg sign artifacts using odlsign-bulk script in
     .. code-block:: bash
 
         cd scripts/
-        ./odlsign-bulk <staging-repo-id>  # eg. autorelease-1367
+        ./odlsign-bulk STAGING_REPO_ID  # eg. autorelease-1367
 
 Releasing OpenDaylight
 ======================
@@ -49,7 +49,7 @@ Releasing OpenDaylight
 
         git submodule foreach 'git review -s'
 
-- Download patches (*.bundle files and taglist.log.gz) from log server.
+- Download patches (\*.bundle files and taglist.log.gz) from log server.
 
     .. code-block:: bash
 
diff --git a/tox.ini b/tox.ini
index 90be6828eabbb8dbc49316526ea4c078cc69ff57..2ea2f448af26146887359bd3eaefe645bc98d29c 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -1,8 +1,19 @@
 [tox]
 minversion = 1.6
-envlist = docs,docs-linkcheck
+envlist = coala,docs,docs-linkcheck
 skipsdist = true
 
+[testenv:coala]
+basepython = python3
+deps =
+    coala
+    coala-bears
+    nodeenv
+commands =
+    nodeenv -p
+    npm install --global remark-cli remark-lint
+    coala --non-interactive
+
 [testenv:docs]
 deps = -rrequirements.txt
 commands =