Skip to content
This repository was archived by the owner on Nov 3, 2023. It is now read-only.

Commit a5b7d21

Browse files
committed
Added docs
1 parent 7862d77 commit a5b7d21

File tree

2 files changed

+39
-11
lines changed

2 files changed

+39
-11
lines changed

docs/release_notes.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ Release Notes
55
Current Development Version
66
---------------------------
77

8+
New Features
9+
10+
* Added support for more flexible error selections using ``--ignore``,
11+
``--select``, ``--convention``, ``--add-ignore`` and ``--add-select``.
12+
813
Bug Fixes
914

1015
* Property setter and deleter methods are now treated as private and do not

docs/snippets/cli.rst

Lines changed: 34 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,44 @@ Usage
66
Usage: pep257 [options] [<file|dir>...]
77
88
Options:
9-
--version show program's version number and exit
10-
-h, --help show this help message and exit
11-
-e, --explain show explanation of each error
12-
-s, --source show source for each error
13-
--ignore=<codes> ignore a list comma-separated error codes, for
14-
example: --ignore=D101,D202
15-
--match=<pattern> check only files that exactly match <pattern> regular
9+
--version show program's version number and exit
10+
-h, --help show this help message and exit
11+
-e, --explain show explanation of each error
12+
-s, --source show source for each error
13+
--select=<codes> choose the basic list of checked errors by specifying
14+
which errors to check for (with a list of comma-
15+
separated error codes). for example:
16+
--select=D101,D202
17+
--ignore=<codes> choose the basic list of checked errors by specifying
18+
which errors to ignore (with a list of comma-separated
19+
error codes). for example: --ignore=D101,D202
20+
--convention=<name> choose the basic list of checked errors by specifying
21+
an existing convention. for example:
22+
--convention=pep257
23+
--add-select=<codes> amend the list of errors to check for by specifying
24+
more error codes to check.
25+
--add-ignore=<codes> amend the list of errors to check for by specifying
26+
more error codes to ignore.
27+
--match=<pattern> check only files that exactly match <pattern> regular
1628
expression; default is --match='(?!test_).*\.py' which
1729
matches files that don't start with 'test_' but end
1830
with '.py'
19-
--match-dir=<pattern>
31+
--match-dir=<pattern>
2032
search only dirs that exactly match <pattern> regular
2133
expression; default is --match-dir='[^\.].*', which
2234
matches all dirs that don't start with a dot
23-
-d, --debug print debug information
24-
-v, --verbose print status information
25-
--count print total number of errors to stdout
35+
-d, --debug print debug information
36+
-v, --verbose print status information
37+
--count print total number of errors to stdout
38+
39+
Return Code
40+
^^^^^^^^^^^
41+
42+
+--------------+--------------------------------------------------------------+
43+
| 0 | Success - no violations |
44+
+--------------+--------------------------------------------------------------+
45+
| 1 | Some code violations were found |
46+
+--------------+--------------------------------------------------------------+
47+
| 2 | Illegal usage - see error message |
48+
+--------------+--------------------------------------------------------------+
2649

0 commit comments

Comments
 (0)