@@ -48,13 +48,25 @@ ______________________________________________________________________
4848
4949## Features
5050
51- __ pratidoc__ is a … allowing you to:
52-
53- - __ Feature 1__ : Description of the feature
54- - __ Feature 2__ : Description of the feature
55- - __ Feature 3__ : Description of the feature
56- - __ Feature 4__ : Description of the feature
57- - __ Feature 5__ : Description of the feature
51+ __ pratidoc__ is a __ documentation checker__ which verifies if your project
52+ contains a set of essential documentation files:
53+
54+ - __ Well-defined files__ : Only the files common in large open source projects
55+ are searched for.
56+ - __ Comprehensive choice__ : Documents from a wide range of categories
57+ (like legal, governance, security, community, etc.) are included.
58+ - __ Link to source__ : Wherever applicable each rule points to the
59+ official/well-respected resource with more information regarding it.
60+
61+ ## Table of contents
62+
63+ - [ Quick start] ( #quick-start )
64+ - [ Installation] ( #installation )
65+ - [ Usage] ( #usage )
66+ - [ Advanced] ( #advanced )
67+ - [ Configuration] ( #configuration )
68+ - [ Run as a pre-commit hook] ( #run-as-a-pre-commit-hook )
69+ - [ Rules] ( #rules )
5870
5971## Quick start
6072
@@ -73,49 +85,111 @@ __pratidoc__ is a … allowing you to:
7385
7486### Usage
7587
76- ``` python
77- import pratidoc
88+ To check against the rules run the following from the command line:
7889
79- ...
90+ ``` sh
91+ > pratidoc check
8092```
8193
82- ### Examples
94+ > [ !NOTE]
95+ > The command should be ran from the directory which we want to verify
96+ > __ and no path(s) should be passed as arguments!__
8397
84- <details >
85- <summary ><b ><big >Short</big ></b > (click me)</summary >
86-   ;
98+ an example output could be:
8799
88- Description of the example
89-
90- ``` python
91- # Short example
100+ ``` sh
101+ > ALL:-:-: PRATIDOC1 Multiple README files exist.
92102```
93103
94- </details >
104+ > [ !NOTE]
105+ > This is a __ repo-wide linter__ , therefore it will not point to a specific
106+ > line, instead ` ALL:-:-: ` means that the rule was violated in
107+ > current working directory.
95108
96- <details >
97- <summary ><b ><big >Common</big ></b > (click me)</summary >
98-   ;
109+ ## Advanced
99110
100- Description of the example
111+ ### Configuration
101112
102- ``` python
103- # Common use case
113+ You can configure ` pratidoc ` in ` pyproject.toml ` (or ` .pratidoc.toml `
114+ in the root of your project, just remove the ` [tool.pratidoc] ` section),
115+ for example:
116+
117+ ``` toml
118+ [tool .pratidoc ]
119+ # include rules by their code
120+ include_codes = [1 , 2 , 5 ] # default: all rules included
121+ # exclude rules by their code (takes precedence over include)
122+ exclude_codes = [4 , 5 , 6 ] # default: no rules excluded
123+ # whether to exit after first error or all errors
124+ end_mode = " first" # default: "all"
104125```
105126
106- </details >
127+ > [ !WARNING]
128+ > You can only disable rules via include/exclude codes as shown above.
107129
108- <details >
109- <summary ><b ><big >Advanced</big ></b > (click me)</summary >
110-   ;
130+ ### Run as a pre-commit hook
111131
112- Description of the example
132+ ` pratidoc ` can be used as a pre-commit hook, to add as a plugin:
113133
114- ``` python
115- # Something advanced and cool
134+ ``` yaml
135+ repos :
136+ - repo : " https://github.com/open-nudge/pratidoc"
137+ rev : ... # select the tag or revision you want, or run `pre-commit autoupdate`
138+ hooks :
139+ - id : " pratidoc"
116140` ` `
117141
118- </details >
142+ ### Rules
143+
144+ > [!TIP]
145+ > Run ` pratidoc rules` to see the list of available rules.
146+
147+ `pratidoc` provides the following rules (links omitted for brevity) :
148+
149+ | Name | Enabled | Description |
150+ | ---------- | ------- | ------------------------------------------------ |
151+ | PRATIDOC0 | True | File README should be defined. |
152+ | PRATIDOC1 | True | Only one README file should be defined. |
153+ | PRATIDOC2 | True | File SECURITY should be defined. |
154+ | PRATIDOC3 | True | Only one SECURITY file should be defined. |
155+ | PRATIDOC4 | True | File LICENSE should be defined. |
156+ | PRATIDOC5 | True | Only one LICENSE file should be defined. |
157+ | PRATIDOC6 | True | File CHANGELOG should be defined. |
158+ | PRATIDOC7 | True | Only one CHANGELOG file should be defined. |
159+ | PRATIDOC8 | True | File CITATION should be defined. |
160+ | PRATIDOC9 | True | Only one CITATION file should be defined. |
161+ | PRATIDOC10 | True | File DCO should be defined. |
162+ | PRATIDOC11 | True | Only one DCO file should be defined. |
163+ | PRATIDOC12 | True | File ADOPTERS should be defined. |
164+ | PRATIDOC13 | True | Only one ADOPTERS file should be defined. |
165+ | PRATIDOC14 | True | File CODE_OF_CONDUCT should be defined. |
166+ | PRATIDOC15 | True | Only one CODE_OF_CONDUCT file should be defined. |
167+ | PRATIDOC16 | True | File ROADMAP should be defined. |
168+ | PRATIDOC17 | True | Only one ROADMAP file should be defined. |
169+ | PRATIDOC18 | True | File CODEOWNERS should be defined. |
170+ | PRATIDOC19 | True | Only one CODEOWNERS file should be defined. |
171+ | PRATIDOC20 | True | File GOVERNANCE should be defined. |
172+ | PRATIDOC21 | True | Only one GOVERNANCE file should be defined. |
173+ | PRATIDOC22 | True | File CONTRIBUTING should be defined. |
174+ | PRATIDOC23 | True | Only one CONTRIBUTING file should be defined. |
175+ | PRATIDOC24 | True | File SUPPORT should be defined. |
176+ | PRATIDOC25 | True | Only one SUPPORT file should be defined. |
177+
178+ <!-- pyml disable-num-lines 16 line-length-->
179+
180+ You can consult the following resources to learn more about a given document
181+ (click on the name to go to the resource) :
182+
183+ - [`README`](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-readmes)
184+ - [`SECURITY`](https://docs.github.com/en/code-security/getting-started/adding-a-security-policy-to-your-repository)
185+ - [`LICENSE`](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/licensing-a-repository)
186+ - [`CHANGELOG`](https://keepachangelog.com/en/1.1.0/)
187+ - [`CITATION`](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-citation-files)
188+ - [`DCO`](https://wiki.linuxfoundation.org/dco)
189+ - [`CODE_OF_CONDUCT`](https://docs.github.com/en/communities/setting-up-your-project-for-healthy-contributions/adding-a-code-of-conduct-to-your-project)
190+ - [`SUPPORT`](https://docs.github.com/en/communities/setting-up-your-project-for-healthy-contributions/adding-support-resources-to-your-project)
191+ - [`CONTRIBUTING`](https://docs.github.com/en/communities/setting-up-your-project-for-healthy-contributions/setting-guidelines-for-repository-contributors)
192+ - [`CODEOWNERS`](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners)
119193
120194<!-- md-dead-link-check : off -->
121195
0 commit comments