Commit Graph

17 Commits

Author SHA1 Message Date
Stephen Finucane 57d1e9afc9 Project Migration to PyCQA
This change rehomes the project to PyCQA [1] as reported to the
openstack-dev mailing list [2].

[1] https://mail.python.org/pipermail/code-quality/2019-July/001112.html
[2] http://lists.openstack.org/pipermail/openstack-discuss/2019-July/007878.html

Change-Id: I5472bea4994664495220ee4ab565f95666f21eee
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Depends-On: I740c66cd959db1efa8ca8c9f29d4da4b66fbd993
2019-07-18 14:30:50 +01:00
KATO Tomoyuki a96c31fb3e Skip long line check for rst definition list term
Change-Id: Ieb272e506034eac7129c24ee0e0fbc40b55d11b1
Closes-Bug: #1533238
2016-01-26 12:37:05 +09:00
Sam Stoelinga 64f22e443f Fix issue of checking max_len for directives
This patch changes the regex to also match directives
which start with whitespace.

Closes-Bug: #1487302

Change-Id: I4c3168228164d865cc31dfd24160c41267aeb016
2015-08-21 23:51:14 +08:00
Joshua Harlow 7ad4aaec88 Handle the linter returning anonyomous line numbers
When sphinx (and by association restructuredtext-lint)
finds an error with say a anonymous backref it does not
include the line number (it defaults to none); so in this
case covert that line number to ? and output that as the
line number in the output shown to the user.

Change-Id: I013857cdb6a24cf11d94265358b8294dfed0236d
2015-03-05 22:56:51 +00:00
Julien Danjou 4d82c269ab Fix Python 3 support
This fixes Python 3 support for doc8.

Change-Id: Id3f3a35f2d68c4cb6eefcf7a960d7991b8f4522f
2015-01-27 14:33:56 +01:00
Christian Berendt 5a4341727e Add check D005 - no newline at end of file
Change-Id: I160bb7e9b3c904655567caee999ac91366668109
2014-09-30 21:44:59 +02:00
Joshua Harlow 06e610bde7 Ignore long-lines with urls when in text searching mode
Change-Id: I57b736d441b9650b0f7bc9efe9692b78b6cbf508
2014-09-08 11:38:32 -07:00
Joshua Harlow 9392f55fb7 Use a documented constant for the docutils levels
Instead of having a implicitly defined constant that doesn't
explain why the value was set use a documented frozenset that
has the valid docutils messaging levels with links/comments to
describe why they are being used.

Change-Id: I372c1babfb02c33b5881e2e6a12d464f75d944f7
2014-09-05 17:26:50 -07:00
Joshua Harlow 15ee57b572 Allow checks to provide a extension matcher
When a check is for a rst file vs a plaintext
file and is not interoperable this change allows
that check to declare that it only knows how to
scan certain files.

It also fixes the max line checker to use a similar
routine to differentiate between rst files and non
rst files and uses a different routine based on this
decision.

Change-Id: I1e3e5f9f1631ed5babe2df17c987e8e872938a38
2014-09-03 15:19:21 -07:00
Joshua Harlow 8cf6a73aad Use regex instead of prefix matches
To allow for any future additions to be added that are not
just prefix matches lets switch the prefix match array for
sphinx false positives to using regex instead.

Change-Id: I7ec0188d1fee98dbafb5b99429f96982a2be261c
2014-08-16 12:02:36 -07:00
Joshua Harlow 478b87b106 Add a sphinx specific mode
When doc8 scans rst files with sphinx specific roles
and references it is unable to determine what those roles
are and then complains that these false positives are
actual errors.

To avoid these types of false positives add a option that
can be provided when running on files that may contain these
types of errors to allow them to be skipped/ignored.

Change-Id: Ia6896617534f68e517d5996d53cf2de274507f56
2014-08-15 15:05:41 -07:00
Christian Berendt c8e8a72623 Remove unneeded definitions of Python Source Code Encoding
I think PEP 0263 (http://legacy.python.org/dev/peps/pep-0263/) is
not used anywhere else and so it should be removed when it's not
needed.

Change-Id: I013bf7f1df485d79b4cf17b874bfb22a0b920f2b
2014-08-01 14:18:54 +00:00
Joshua Harlow 83e9c42215 Add error linting to ensure that rst format is not invalid 2014-05-24 19:43:05 -07:00
Joshua Harlow a21309f952 Add subtitle and section to title skipping 2014-05-18 21:49:30 -07:00
Joshua Harlow 51cbe4f914 Move over the rest of the checks
Get the rest of the checks working (the
max line length check now works).

Remove the old script now that it is not
needed anymore.
2014-05-18 18:20:47 -07:00
Joshua Harlow 50528d3741 Add config as constructor param 2014-05-18 17:49:24 -07:00
Joshua Harlow 2fdbd208ee Add a checks module
This module contains the various checks that we include
by default in doc8 and the base classes these checks
inherit from.
2014-05-18 17:31:26 -07:00