Skip to content

Commit 92c4af8

Browse files
authored
Add Linting to the Project (#466)
* Add markdown linting rules * Add linting badge * Updated Markdown to meet linter criteria Closes #156
1 parent 6d382e9 commit 92c4af8

File tree

4 files changed

+338
-34
lines changed

4 files changed

+338
-34
lines changed

.github/workflows/Linting.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
name: Linting
3+
4+
on: # yamllint disable-line rule:truthy
5+
push: null
6+
pull_request: null
7+
8+
permissions: {}
9+
10+
jobs:
11+
Super_Linter:
12+
name: Super Linter
13+
runs-on: ubuntu-latest
14+
15+
permissions:
16+
contents: read
17+
packages: read
18+
# To report GitHub Actions status checks
19+
statuses: write
20+
21+
steps:
22+
- name: Checkout code
23+
uses: actions/checkout@v4
24+
with:
25+
fetch-depth: 0
26+
- name: Super-linter
27+
uses: super-linter/[email protected] # x-release-please-version
28+
env:
29+
# Linters
30+
VALIDATE_MARKDOWN: true
31+
VALIDATE_YAML: true
32+
LINTER_RULES_PATH: ./
33+
MARKDOWN_CONFIG_FILE: .markdownlint.yml
34+
ENABLE_GITHUB_ACTIONS_STEP_SUMMARY: true
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.markdownlint.yml

+277
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,277 @@
1+
# Example markdownlint configuration with all properties set to their default value
2+
3+
# Default state for all rules
4+
default: true
5+
6+
# Path to configuration file to extend
7+
extends: null
8+
9+
# MD001/heading-increment : Heading levels should only increment by one level at a time : https://github.com/DavidAnson/markdownlint/blob/v0.36.1/doc/md001.md
10+
MD001: true
11+
12+
# MD003/heading-style : Heading style : https://github.com/DavidAnson/markdownlint/blob/v0.36.1/doc/md003.md
13+
MD003:
14+
# Heading style
15+
style: "consistent"
16+
17+
# MD004/ul-style : Unordered list style : https://github.com/DavidAnson/markdownlint/blob/v0.36.1/doc/md004.md
18+
MD004:
19+
# List style
20+
style: "consistent"
21+
22+
# MD005/list-indent : Inconsistent indentation for list items at the same level : https://github.com/DavidAnson/markdownlint/blob/v0.36.1/doc/md005.md
23+
MD005: true
24+
25+
# MD007/ul-indent : Unordered list indentation : https://github.com/DavidAnson/markdownlint/blob/v0.36.1/doc/md007.md
26+
MD007:
27+
# Spaces for indent
28+
indent: 2
29+
# Whether to indent the first level of the list
30+
start_indented: false
31+
# Spaces for first level indent (when start_indented is set)
32+
start_indent: 2
33+
34+
# MD009/no-trailing-spaces : Trailing spaces : https://github.com/DavidAnson/markdownlint/blob/v0.36.1/doc/md009.md
35+
MD009:
36+
# Spaces for line break
37+
br_spaces: 2
38+
# Allow spaces for empty lines in list items
39+
list_item_empty_lines: false
40+
# Include unnecessary breaks
41+
strict: false
42+
43+
# MD010/no-hard-tabs : Hard tabs : https://github.com/DavidAnson/markdownlint/blob/v0.36.1/doc/md010.md
44+
MD010:
45+
# Include code blocks
46+
code_blocks: true
47+
# Fenced code languages to ignore
48+
ignore_code_languages: []
49+
# Number of spaces for each hard tab
50+
spaces_per_tab: 1
51+
52+
# MD011/no-reversed-links : Reversed link syntax : https://github.com/DavidAnson/markdownlint/blob/v0.36.1/doc/md011.md
53+
MD011: true
54+
55+
# MD012/no-multiple-blanks : Multiple consecutive blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.36.1/doc/md012.md
56+
MD012:
57+
# Consecutive blank lines
58+
maximum: 1
59+
60+
# MD013/line-length : Line length : https://github.com/DavidAnson/markdownlint/blob/v0.36.1/doc/md013.md
61+
MD013: false
62+
# # Number of characters
63+
# line_length: 200
64+
# # Number of characters for headings
65+
# heading_line_length: 80
66+
# # Number of characters for code blocks
67+
# code_block_line_length: 200
68+
# # Include code blocks
69+
# code_blocks: true
70+
# # Include tables
71+
# tables: true
72+
# # Include headings
73+
# headings: true
74+
# # Strict length checking
75+
# strict: false
76+
# # Stern length checking
77+
# stern: false
78+
79+
# MD014/commands-show-output : Dollar signs used before commands without showing output : https://github.com/DavidAnson/markdownlint/blob/v0.36.1/doc/md014.md
80+
MD014: true
81+
82+
# MD018/no-missing-space-atx : No space after hash on atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.36.1/doc/md018.md
83+
MD018: true
84+
85+
# MD019/no-multiple-space-atx : Multiple spaces after hash on atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.36.1/doc/md019.md
86+
MD019: true
87+
88+
# MD020/no-missing-space-closed-atx : No space inside hashes on closed atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.36.1/doc/md020.md
89+
MD020: true
90+
91+
# MD021/no-multiple-space-closed-atx : Multiple spaces inside hashes on closed atx style heading : https://github.com/DavidAnson/markdownlint/blob/v0.36.1/doc/md021.md
92+
MD021: true
93+
94+
# MD022/blanks-around-headings : Headings should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.36.1/doc/md022.md
95+
MD022:
96+
# Blank lines above heading
97+
lines_above: 1
98+
# Blank lines below heading
99+
lines_below: 1
100+
101+
# MD023/heading-start-left : Headings must start at the beginning of the line : https://github.com/DavidAnson/markdownlint/blob/v0.36.1/doc/md023.md
102+
MD023: true
103+
104+
# MD024/no-duplicate-heading : Multiple headings with the same content : https://github.com/DavidAnson/markdownlint/blob/v0.36.1/doc/md024.md
105+
MD024:
106+
# Only check sibling headings
107+
siblings_only: true
108+
109+
# MD025/single-title/single-h1 : Multiple top-level headings in the same document : https://github.com/DavidAnson/markdownlint/blob/v0.36.1/doc/md025.md
110+
MD025:
111+
# Heading level
112+
level: 1
113+
# RegExp for matching title in front matter
114+
front_matter_title: "^\\s*title\\s*[:=]"
115+
116+
# MD026/no-trailing-punctuation : Trailing punctuation in heading : https://github.com/DavidAnson/markdownlint/blob/v0.36.1/doc/md026.md
117+
MD026:
118+
# Punctuation characters
119+
punctuation: ".,;:!。,;:!"
120+
121+
# MD027/no-multiple-space-blockquote : Multiple spaces after blockquote symbol : https://github.com/DavidAnson/markdownlint/blob/v0.36.1/doc/md027.md
122+
MD027: true
123+
124+
# MD028/no-blanks-blockquote : Blank line inside blockquote : https://github.com/DavidAnson/markdownlint/blob/v0.36.1/doc/md028.md
125+
MD028: true
126+
127+
# MD029/ol-prefix : Ordered list item prefix : https://github.com/DavidAnson/markdownlint/blob/v0.36.1/doc/md029.md
128+
MD029:
129+
# List style
130+
style: "one_or_ordered"
131+
132+
# MD030/list-marker-space : Spaces after list markers : https://github.com/DavidAnson/markdownlint/blob/v0.36.1/doc/md030.md
133+
MD030:
134+
# Spaces for single-line unordered list items
135+
ul_single: 1
136+
# Spaces for single-line ordered list items
137+
ol_single: 1
138+
# Spaces for multi-line unordered list items
139+
ul_multi: 1
140+
# Spaces for multi-line ordered list items
141+
ol_multi: 1
142+
143+
# MD031/blanks-around-fences : Fenced code blocks should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.36.1/doc/md031.md
144+
MD031:
145+
# Include list items
146+
list_items: true
147+
148+
# MD032/blanks-around-lists : Lists should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.36.1/doc/md032.md
149+
MD032: true
150+
151+
# MD033/no-inline-html : Inline HTML : https://github.com/DavidAnson/markdownlint/blob/v0.36.1/doc/md033.md
152+
MD033: false
153+
# # Allowed elements
154+
# allowed_elements: []
155+
156+
# MD034/no-bare-urls : Bare URL used : https://github.com/DavidAnson/markdownlint/blob/v0.36.1/doc/md034.md
157+
MD034: false
158+
159+
# MD035/hr-style : Horizontal rule style : https://github.com/DavidAnson/markdownlint/blob/v0.36.1/doc/md035.md
160+
MD035:
161+
# Horizontal rule style
162+
style: "consistent"
163+
164+
# MD036/no-emphasis-as-heading : Emphasis used instead of a heading : https://github.com/DavidAnson/markdownlint/blob/v0.36.1/doc/md036.md
165+
MD036:
166+
# Punctuation characters
167+
punctuation: ".,;:!?。,;:!?"
168+
169+
# MD037/no-space-in-emphasis : Spaces inside emphasis markers : https://github.com/DavidAnson/markdownlint/blob/v0.36.1/doc/md037.md
170+
MD037: true
171+
172+
# MD038/no-space-in-code : Spaces inside code span elements : https://github.com/DavidAnson/markdownlint/blob/v0.36.1/doc/md038.md
173+
MD038: true
174+
175+
# MD039/no-space-in-links : Spaces inside link text : https://github.com/DavidAnson/markdownlint/blob/v0.36.1/doc/md039.md
176+
MD039: true
177+
178+
# MD040/fenced-code-language : Fenced code blocks should have a language specified : https://github.com/DavidAnson/markdownlint/blob/v0.36.1/doc/md040.md
179+
MD040:
180+
# List of languages
181+
allowed_languages: []
182+
# Require language only
183+
language_only: false
184+
185+
# MD041/first-line-heading/first-line-h1 : First line in a file should be a top-level heading : https://github.com/DavidAnson/markdownlint/blob/v0.36.1/doc/md041.md
186+
MD041:
187+
# Heading level
188+
level: 1
189+
# RegExp for matching title in front matter
190+
front_matter_title: "^\\s*title\\s*[:=]"
191+
192+
# MD042/no-empty-links : No empty links : https://github.com/DavidAnson/markdownlint/blob/v0.36.1/doc/md042.md
193+
MD042: true
194+
195+
# MD043/required-headings : Required heading structure : https://github.com/DavidAnson/markdownlint/blob/v0.36.1/doc/md043.md
196+
MD043:
197+
# List of headings
198+
headings: [ "*" ]
199+
# Match case of headings
200+
match_case: false
201+
202+
# MD044/proper-names : Proper names should have the correct capitalization : https://github.com/DavidAnson/markdownlint/blob/v0.36.1/doc/md044.md
203+
MD044:
204+
# List of proper names
205+
names: []
206+
# Include code blocks
207+
code_blocks: true
208+
# Include HTML elements
209+
html_elements: true
210+
211+
# MD045/no-alt-text : Images should have alternate text (alt text) : https://github.com/DavidAnson/markdownlint/blob/v0.36.1/doc/md045.md
212+
MD045: true
213+
214+
# MD046/code-block-style : Code block style : https://github.com/DavidAnson/markdownlint/blob/v0.36.1/doc/md046.md
215+
MD046:
216+
# Block style
217+
style: "consistent"
218+
219+
# MD047/single-trailing-newline : Files should end with a single newline character : https://github.com/DavidAnson/markdownlint/blob/v0.36.1/doc/md047.md
220+
MD047: true
221+
222+
# MD048/code-fence-style : Code fence style : https://github.com/DavidAnson/markdownlint/blob/v0.36.1/doc/md048.md
223+
MD048:
224+
# Code fence style
225+
style: "consistent"
226+
227+
# MD049/emphasis-style : Emphasis style : https://github.com/DavidAnson/markdownlint/blob/v0.36.1/doc/md049.md
228+
MD049:
229+
# Emphasis style
230+
style: "consistent"
231+
232+
# MD050/strong-style : Strong style : https://github.com/DavidAnson/markdownlint/blob/v0.36.1/doc/md050.md
233+
MD050:
234+
# Strong style
235+
style: "consistent"
236+
237+
# MD051/link-fragments : Link fragments should be valid : https://github.com/DavidAnson/markdownlint/blob/v0.36.1/doc/md051.md
238+
MD051:
239+
# Ignore case of fragments
240+
ignore_case: false
241+
242+
# MD052/reference-links-images : Reference links and images should use a label that is defined : https://github.com/DavidAnson/markdownlint/blob/v0.36.1/doc/md052.md
243+
MD052:
244+
# Include shortcut syntax
245+
shortcut_syntax: false
246+
247+
# MD053/link-image-reference-definitions : Link and image reference definitions should be needed : https://github.com/DavidAnson/markdownlint/blob/v0.36.1/doc/md053.md
248+
MD053:
249+
# Ignored definitions
250+
ignored_definitions:
251+
- "//"
252+
253+
# MD054/link-image-style : Link and image style : https://github.com/DavidAnson/markdownlint/blob/v0.36.1/doc/md054.md
254+
MD054:
255+
# Allow autolinks
256+
autolink: true
257+
# Allow inline links and images
258+
inline: true
259+
# Allow full reference links and images
260+
full: true
261+
# Allow collapsed reference links and images
262+
collapsed: true
263+
# Allow shortcut reference links and images
264+
shortcut: true
265+
# Allow URLs as inline links
266+
url_inline: true
267+
268+
# MD055/table-pipe-style : Table pipe style : https://github.com/DavidAnson/markdownlint/blob/v0.36.1/doc/md055.md
269+
MD055:
270+
# Table pipe style
271+
style: "consistent"
272+
273+
# MD056/table-column-count : Table column count : https://github.com/DavidAnson/markdownlint/blob/v0.36.1/doc/md056.md
274+
MD056: true
275+
276+
# MD058/blanks-around-tables : Tables should be surrounded by blank lines : https://github.com/DavidAnson/markdownlint/blob/v0.36.1/doc/md058.md
277+
MD058: true

Code-of-Conduct.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Project maintainers have the right and responsibility to remove, edit, or reject
3030

3131
## Scope
3232

33-
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
33+
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
3434

3535
## Enforcement
3636

0 commit comments

Comments
 (0)