Skip to content

Commit 8f649e2

Browse files
authored
1 parent 7a25a9a commit 8f649e2

10 files changed

+708
-58
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

+61-29
Original file line numberDiff line numberDiff line change
@@ -7,32 +7,64 @@ assignees: ''
77

88
---
99

10-
**Describe the bug**
11-
A clear and concise description of what the bug is.
12-
13-
**To Reproduce**
14-
Steps to reproduce the behavior:
15-
1. Go to '...'
16-
2. Click on '....'
17-
3. Scroll down to '....'
18-
4. See error
19-
20-
**Expected behavior**
21-
A clear and concise description of what you expected to happen.
22-
23-
**Screenshots**
24-
If applicable, add screenshots to help explain your problem.
25-
26-
**Desktop (please complete the following information):**
27-
- OS: [e.g. iOS]
28-
- Browser [e.g. chrome, safari]
29-
- Version [e.g. 22]
30-
31-
**Smartphone (please complete the following information):**
32-
- Device: [e.g. iPhone6]
33-
- OS: [e.g. iOS8.1]
34-
- Browser [e.g. stock browser, safari]
35-
- Version [e.g. 22]
36-
37-
**Additional context**
38-
Add any other context about the problem here.
10+
## Prerequisites
11+
12+
* [ ] Are you running the latest version of this application?
13+
* [ ] Have you checked the [Frequently Asked Questions](https://github.com/jackdewinter/pymarkdown/blob/main/docs/faq.md) document?
14+
* [ ] Have you simplified the bug report to the essential details?
15+
* [ ] Do you have a distinct command line to report?
16+
* [ ] Can you clearly state the configuration for this bug report?
17+
* [ ] Do you have a minimal document that highlights this bug?
18+
* [ ] Are any required files (configuration or Markdown document) attached to the issue?
19+
* [ ] Did you perform a cursory search of other issues to look for related issues?
20+
21+
## Bug Report
22+
23+
Please replace any of `[these areas]` in the paragraphs below with the requested information.
24+
25+
### Bug Type
26+
27+
* [ ] Assertion Failure
28+
* [ ] Documentation
29+
* [ ] Scan/Rule not working as expected
30+
* [ ] Fix/Rule not working as expected
31+
* [ ] Other
32+
[Other reason]
33+
34+
### Description
35+
36+
[Provide a concise description of what the issue is.]
37+
38+
### Specifics
39+
40+
What operating system and version are you running into this behavior on?
41+
42+
[Provide Operating System and Version Number]
43+
44+
What version are you seeing this behavior in? (Run `pip list` or `pipenv run pip list` and look for the entry beside `pymarkdownlnt`.)
45+
46+
[PyMarkdownLnt Version Number]
47+
48+
Are there any extra steps that need to be taken before executing the application?
49+
50+
[Any non-standard requirements?]
51+
52+
What is the command line you invoke to get this behavior?
53+
54+
[Assume that anything up to the first `pymarkdown` or `pymarkdownlnt` is already provided.]
55+
56+
Are you using a configuration file? Either on the command line or one of the implicit configuration files? If so, attach that file to this issue.
57+
58+
[Attach any configuration files that would alter processing behavior.]
59+
60+
What Markdown document causes this behavior to manifest? Attach that file to this issue.
61+
62+
[Attach a minimal Markdown document that makes this behavior occur.]
63+
64+
### Actual Behavior
65+
66+
[Describe what behavior was seen when the specifics for executing the application were applied.]
67+
68+
### Expected Behavior
69+
70+
[Describe the behavior that you believe should occur instead of the Actual Behavior. Include any specifics on why that behavior is more correct.]

.github/ISSUE_TEMPLATE/feature_request.md

+18-8
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,24 @@ assignees: ''
77

88
---
99

10-
**Is your feature request related to a problem? Please describe.**
11-
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
10+
## Prerequisites
1211

13-
**Describe the solution you'd like**
14-
A clear and concise description of what you want to happen.
12+
* [ ] Are you running the latest version of this application?
13+
* [ ] Have you checked the [Frequently Asked Questions](https://github.com/jackdewinter/pymarkdown/blob/main/docs/faq.md) document?
14+
* [ ] Did you perform a cursory search of other issues to look for related issues?
1515

16-
**Describe alternatives you've considered**
17-
A clear and concise description of any alternative solutions or features you've considered.
16+
## Feature Request
1817

19-
**Additional context**
20-
Add any other context or screenshots about the feature request here.
18+
Please replace any of `[these areas]` in the paragraphs below with the requested information.
19+
20+
### Description
21+
22+
[Provide a concise description of what the requested feature is.]
23+
24+
### Desired Behavior of Feature
25+
26+
[Provide a clear picture of the feature you would like to see added, including specific scenarios or contexts where this feature would be particularly useful. Markdown document samples, use cases, and other references will help you convey the necessity and impact your feature.]
27+
28+
### What Are the Benefits of This Feature?
29+
30+
[How many users do you believe will benefit from this feature? How will it impact them?]

.pre-commit-config.yaml

+11-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ repos:
77
entry: pipenv run python utils/correct_pdoc_issues.py
88
pass_filenames: false
99
- repo: https://github.com/jackdewinter/pymarkdown
10-
rev: v0.9.11
10+
rev: v0.9.18
1111
hooks:
1212
- id: pymarkdown
1313
pass_filenames: false
@@ -17,6 +17,16 @@ repos:
1717
- scan
1818
- .
1919
- ./docs
20+
- repo: https://github.com/jackdewinter/pymarkdown
21+
rev: v0.9.18
22+
hooks:
23+
- id: pymarkdown
24+
pass_filenames: false
25+
args:
26+
- --config
27+
- newdocs/clean.json
28+
- scan
29+
- ./newdocs/src
2030
- repo: local
2131
hooks:
2232
- id: verify-install-requirements

changelog.md

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
- [Issue 801](https://github.com/jackdewinter/pymarkdown/issues/801)
88
- Started movement of docs from README.md and docs directory to
99
the newdocs directory with a shorter README.md.
10+
- [Issue 1059](https://github.com/jackdewinter/pymarkdown/issues/1059)
11+
- Added updated pre-commit documentation.
1012

1113
### Fixed
1214

newdocs/clean.json

+1-10
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,9 @@
11
{
22
"plugins": {
3-
"no-space-in-code": {
4-
"enabled": false
5-
},
6-
"no-space-in-emphasis": {
7-
"enabled": false
8-
},
93
"line-length": {
10-
"enabled": false,
4+
"enabled": true,
115
"code_block_line_length" : 160
126
},
13-
"no-duplicate-heading": {
14-
"enabled": false
15-
},
167
"list-marker-space" : {
178
"enabled": false
189
},

newdocs/mkdocs.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ nav:
1212
- 'getting-started.md'
1313
- "User Guide":
1414
- 'user-guide.md'
15+
- 'advanced_configuration.md'
1516
- 'advanced_extensions.md'
1617
- 'advanced_plugins.md'
1718
- 'advanced_pre-commit.md'
18-
- 'advanced_configuration.md'
1919
- "Devloper Guide":
2020
- 'api.md'
2121
- 'development.md'

newdocs/src/advanced_configuration.md

+64
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
This document will be the new home of the content currently located
44
[here](https://github.com/jackdewinter/pymarkdown/blob/main/docs/advanced_configuration.md).
55

6+
## Configuration Files
7+
8+
## Default Configuration Files
9+
10+
## Different Types
11+
612
Other things that will be added:
713

814
- config files
@@ -14,3 +20,61 @@ Other things that will be added:
1420
- [Command Line Settings](https://github.com/jackdewinter/pymarkdown/blob/main/docs/advanced_configuration.md#general-command-line-settings)
1521
- [Configuration File Settings](https://github.com/jackdewinter/pymarkdown/blob/main/docs/advanced_configuration.md#command-line-configuration-file)
1622
- [Available Configuration Values](https://github.com/jackdewinter/pymarkdown/blob/main/docs/advanced_configuration.md#available-configuration-values)
23+
24+
### Command Line Configuration
25+
26+
### Command Line Arguments Vs Configuration File
27+
28+
The one question that comes up again and again, for PyMarkdown or for other projects,
29+
is whether to use a configuration file or command line arguments. And that answer
30+
largely relies on your context.
31+
32+
From our experience, there are typically five reasons for not using command line
33+
arguments for setting up your PyMarkdown hook in Pre-Commit:
34+
35+
- conciseness: you prefer to keep any configuration values in a single file for
36+
that application
37+
- reusability: you want to reuse those values in other locations, such as scripts
38+
- simplicity: you want to do more complicated configuration without specifying "extra"
39+
command line options
40+
- single responsibility: you only want pre-commit hook configuration in the file,
41+
everything else goes elsewhere
42+
- catch-all: because... personal taste
43+
44+
If you are only leveraging the Pre-Commit hook for PyMarkdown and are not executing
45+
PyMarkdown from anywhere else in your project, many of the above reasons either may
46+
not apply or may not be as impactful to your decison. There may also be other reasons
47+
not listed here, such as team guidelines, that sway the decision one way or the other.
48+
49+
It really does come down to a team choice.
50+
51+
### Enabling or Disabling Rules
52+
53+
As rules can be enabled or disabled on the command line, rules can also be enabled
54+
or disabled in the `.pre-commit-config.yaml` file.
55+
56+
```yaml
57+
repos:
58+
- repo: https://github.com/jackdewinter/pymarkdown
59+
rev: main
60+
hooks:
61+
- id: pymarkdown
62+
args:
63+
- -d
64+
- MD041,md013
65+
- scan
66+
```
67+
68+
Note that if presenting the arguments on a single line and there are multiple rules
69+
that are being enabled or disabled, the commma separated list must be enclosed in
70+
quotes. The quote characters allow Pre-Commit to understand that the comma inside
71+
of the quotes is part of the data, not a character separating the data.
72+
73+
```yaml
74+
repos:
75+
- repo: https://github.com/jackdewinter/pymarkdown
76+
rev: main
77+
hooks:
78+
- id: pymarkdown
79+
args: [-d, "MD041,MD013", scan ]
80+
```

0 commit comments

Comments
 (0)