Skip to content

Commit a30092a

Browse files
chevdorggwpez
andauthored
Markdown linter (#1309)
* Add markdown linting - add linter default rules - adapt rules to current code - fix the code for linting to pass - add CI check fix #1243 * Fix markdown for Substrate * Fix tooling install * Fix workflow * Add documentation * Remove trailing spaces * Update .github/.markdownlint.yaml Co-authored-by: Oliver Tale-Yazdi <[email protected]> * Fix mangled markdown/lists * Fix captalization issues on known words
1 parent 830fde2 commit a30092a

File tree

271 files changed

+6425
-4586
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

271 files changed

+6425
-4586
lines changed

.github/.markdownlint.yaml

Lines changed: 210 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,210 @@
1+
# Default state for all rules
2+
default: true
3+
4+
# Path to configuration file to extend
5+
extends: null
6+
7+
# MD001/heading-increment/header-increment - Heading levels should only increment by one level at a time
8+
MD001: true
9+
10+
# MD002/first-heading-h1/first-header-h1 - First heading should be a top-level heading
11+
MD002:
12+
# Heading level
13+
level: 1
14+
15+
# MD003/heading-style/header-style - Heading style
16+
MD003:
17+
# Heading style
18+
style: "consistent"
19+
20+
# MD004/ul-style - Unordered list style
21+
MD004:
22+
# List style
23+
style: "consistent"
24+
25+
# MD005/list-indent - Inconsistent indentation for list items at the same level
26+
MD005: false
27+
28+
# MD006/ul-start-left - Consider starting bulleted lists at the beginning of the line
29+
MD006: false
30+
31+
# MD007/ul-indent - Unordered list indentation
32+
MD007: false
33+
34+
# MD009/no-trailing-spaces - Trailing spaces
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
44+
MD010: false
45+
46+
# MD011/no-reversed-links - Reversed link syntax
47+
MD011: true
48+
49+
# MD012/no-multiple-blanks - Multiple consecutive blank lines
50+
MD012:
51+
# Consecutive blank lines
52+
maximum: 2
53+
54+
# MD013/line-length - Line length
55+
MD013:
56+
# Number of characters
57+
line_length: 120
58+
# Number of characters for headings
59+
heading_line_length: 120
60+
# Number of characters for code blocks
61+
code_block_line_length: 150
62+
# Include code blocks
63+
code_blocks: true
64+
# Include tables
65+
tables: true
66+
# Include headings
67+
headings: true
68+
# Include headings
69+
headers: true
70+
# Strict length checking
71+
strict: false
72+
# Stern length checking
73+
stern: false
74+
75+
# MD014/commands-show-output - Dollar signs used before commands without showing output
76+
MD014: true
77+
78+
# MD018/no-missing-space-atx - No space after hash on atx style heading
79+
MD018: true
80+
81+
# MD019/no-multiple-space-atx - Multiple spaces after hash on atx style heading
82+
MD019: true
83+
84+
# MD020/no-missing-space-closed-atx - No space inside hashes on closed atx style heading
85+
MD020: true
86+
87+
# MD021/no-multiple-space-closed-atx - Multiple spaces inside hashes on closed atx style heading
88+
MD021: true
89+
90+
# MD022/blanks-around-headings/blanks-around-headers - Headings should be surrounded by blank lines
91+
MD022: false
92+
93+
# MD023/heading-start-left/header-start-left - Headings must start at the beginning of the line
94+
MD023: true
95+
96+
# MD024/no-duplicate-heading/no-duplicate-header - Multiple headings with the same content
97+
MD024: false
98+
99+
# MD025/single-title/single-h1 - Multiple top-level headings in the same document
100+
MD025: false
101+
102+
# MD026/no-trailing-punctuation - Trailing punctuation in heading
103+
MD026:
104+
# Punctuation characters
105+
punctuation: ".,;:!。,;:!"
106+
107+
# MD027/no-multiple-space-blockquote - Multiple spaces after blockquote symbol
108+
MD027: true
109+
110+
# MD028/no-blanks-blockquote - Blank line inside blockquote
111+
MD028: true
112+
113+
# MD029/ol-prefix - Ordered list item prefix
114+
MD029:
115+
# List style
116+
style: "one_or_ordered"
117+
118+
# MD030/list-marker-space - Spaces after list markers
119+
MD030:
120+
# Spaces for single-line unordered list items
121+
ul_single: 1
122+
# Spaces for single-line ordered list items
123+
ol_single: 1
124+
# Spaces for multi-line unordered list items
125+
ul_multi: 1
126+
# Spaces for multi-line ordered list items
127+
ol_multi: 1
128+
129+
# MD031/blanks-around-fences - Fenced code blocks should be surrounded by blank lines
130+
MD031: false
131+
132+
# MD032/blanks-around-lists - Lists should be surrounded by blank lines
133+
MD032: false
134+
135+
# MD033/no-inline-html - Inline HTML
136+
MD033: false
137+
138+
# MD034/no-bare-urls - Bare URL used
139+
MD034: false
140+
141+
# MD035/hr-style - Horizontal rule style
142+
MD035:
143+
# Horizontal rule style
144+
style: "consistent"
145+
146+
# MD036/no-emphasis-as-heading/no-emphasis-as-header - Emphasis used instead of a heading
147+
MD036: false
148+
149+
# MD037/no-space-in-emphasis - Spaces inside emphasis markers
150+
MD037: true
151+
152+
# MD038/no-space-in-code - Spaces inside code span elements
153+
MD038: true
154+
155+
# MD039/no-space-in-links - Spaces inside link text
156+
MD039: true
157+
158+
# MD040/fenced-code-language - Fenced code blocks should have a language specified
159+
MD040: false
160+
161+
# MD041/first-line-heading/first-line-h1 - First line in a file should be a top-level heading
162+
MD041: false
163+
164+
# MD042/no-empty-links - No empty links
165+
MD042: true
166+
167+
# MD043/required-headings/required-headers - Required heading structure
168+
MD043: false
169+
170+
# MD044/proper-names - Proper names should have the correct capitalization
171+
MD044:
172+
# List of proper names
173+
names: ["Polkadot", "Substrate", "Cumulus", "Parity"]
174+
# Include code blocks
175+
code_blocks: false
176+
# Include HTML elements
177+
html_elements: false
178+
179+
# MD045/no-alt-text - Images should have alternate text (alt text)
180+
MD045: false
181+
182+
# MD046/code-block-style - Code block style
183+
MD046:
184+
# Block style
185+
style: "consistent"
186+
187+
# MD047/single-trailing-newline - Files should end with a single newline character
188+
MD047: true
189+
190+
# MD048/code-fence-style - Code fence style
191+
MD048:
192+
# Code fence style
193+
style: "consistent"
194+
195+
# MD049/emphasis-style - Emphasis style should be consistent
196+
MD049: false
197+
198+
# MD050/strong-style - Strong style should be consistent
199+
MD050:
200+
# Strong style
201+
style: "consistent"
202+
203+
# MD051/link-fragments - Link fragments should be valid
204+
MD051: false
205+
206+
# MD052/reference-links-images - Reference links and images should use a label that is defined
207+
MD052: false
208+
209+
# MD053/link-image-reference-definitions - Link and image reference definitions should be needed
210+
MD053: false
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Check Markdown
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened, ready_for_review]
6+
7+
permissions:
8+
packages: read
9+
10+
jobs:
11+
lint-markdown:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout sources
16+
uses: actions/checkout@v3
17+
18+
- uses: actions/[email protected]
19+
with:
20+
node-version: "18.x"
21+
registry-url: "https://npm.pkg.github.com"
22+
scope: "@paritytech"
23+
24+
- name: Install tooling
25+
run: |
26+
npm install -g markdownlint-cli
27+
markdownlint --version
28+
29+
- name: Check Markdown
30+
env:
31+
CONFIG: .github/.markdownlint.yaml
32+
run: |
33+
markdownlint --config "$CONFIG" --ignore target .

README.md

Lines changed: 27 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
> NOTE: We have recently made significant changes to our repository structure. In order to
2-
streamline our development process and foster better contributions, we have merged three separate
3-
repositories Cumulus, Substrate and Polkadot into this repository. Read more about the changes [
1+
> NOTE: We have recently made significant changes to our repository structure. In order to streamline our development
2+
process and foster better contributions, we have merged three separate repositories Cumulus, Substrate and Polkadot into
3+
this repository. Read more about the changes [
44
here](https://polkadot-public.notion.site/Polkadot-SDK-FAQ-fbc4cecc2c46443fb37b9eeec2f0d85f).
55

66
# Polkadot SDK
@@ -9,48 +9,52 @@ here](https://polkadot-public.notion.site/Polkadot-SDK-FAQ-fbc4cecc2c46443fb37b9
99

1010
[![StackExchange](https://img.shields.io/badge/StackExchange-Community%20&%20Support-222222?logo=stackexchange)](https://substrate.stackexchange.com/)
1111

12-
The Polkadot SDK repository provides all the resources needed to start building on the Polkadot
13-
network, a multi-chain blockchain platform that enables different blockchains to interoperate and
14-
share information in a secure and scalable way. The Polkadot SDK comprises three main pieces of
15-
software:
12+
The Polkadot SDK repository provides all the resources needed to start building on the Polkadot network, a multi-chain
13+
blockchain platform that enables different blockchains to interoperate and share information in a secure and scalable
14+
way. The Polkadot SDK comprises three main pieces of software:
1615

1716
## [Polkadot](./polkadot/)
18-
[![PolkadotForum](https://img.shields.io/badge/Polkadot_Forum-e6007a?logo=polkadot)](https://forum.polkadot.network/) [![Polkadot-license](https://img.shields.io/badge/License-GPL3-blue)](./polkadot/LICENSE)
17+
[![PolkadotForum](https://img.shields.io/badge/Polkadot_Forum-e6007a?logo=polkadot)](https://forum.polkadot.network/)
18+
[![Polkadot-license](https://img.shields.io/badge/License-GPL3-blue)](./polkadot/LICENSE)
1919

20-
Implementation of a node for the https://polkadot.network in Rust, using the Substrate framework.
21-
This directory currently contains runtimes for the Polkadot, Kusama, Westend, and Rococo networks.
22-
In the future, these will be relocated to the [`runtimes`](https://github.com/polkadot-fellows/runtimes/) repository.
20+
Implementation of a node for the https://polkadot.network in Rust, using the Substrate framework. This directory
21+
currently contains runtimes for the Polkadot, Kusama, Westend, and Rococo networks. In the future, these will be
22+
relocated to the [`runtimes`](https://github.com/polkadot-fellows/runtimes/) repository.
2323

2424
## [Substrate](./substrate/)
25-
[![SubstrateRustDocs](https://img.shields.io/badge/Rust_Docs-Substrate-24CC85?logo=rust)](https://paritytech.github.io/substrate/master/substrate/index.html) [![Substrate-license](https://img.shields.io/badge/License-GPL3%2FApache2.0-blue)](./substrate/README.md#LICENSE)
25+
[![SubstrateRustDocs](https://img.shields.io/badge/Rust_Docs-Substrate-24CC85?logo=rust)](https://paritytech.github.io/substrate/master/substrate/index.html)
26+
[![Substrate-license](https://img.shields.io/badge/License-GPL3%2FApache2.0-blue)](./substrate/README.md#LICENSE)
2627

27-
Substrate is the primary blockchain SDK used by developers to create the parachains that make up
28-
the Polkadot network. Additionally, it allows for the development of self-sovereign blockchains
29-
that operate completely independently of Polkadot.
28+
Substrate is the primary blockchain SDK used by developers to create the parachains that make up the Polkadot network.
29+
Additionally, it allows for the development of self-sovereign blockchains that operate completely independently of
30+
Polkadot.
3031

3132
## [Cumulus](./cumulus/)
32-
[![CumulusRustDocs](https://img.shields.io/badge/Rust_Docs-Cumulus-222222?logo=rust)](https://paritytech.github.io/cumulus/cumulus_client_collator/index.html) [![Cumulus-license](https://img.shields.io/badge/License-GPL3-blue)](./cumulus/LICENSE)
33+
[![CumulusRustDocs](https://img.shields.io/badge/Rust_Docs-Cumulus-222222?logo=rust)](https://paritytech.github.io/cumulus/cumulus_client_collator/index.html)
34+
[![Cumulus-license](https://img.shields.io/badge/License-GPL3-blue)](./cumulus/LICENSE)
3335

3436
Cumulus is a set of tools for writing Substrate-based Polkadot parachains.
3537

3638
## Upstream Dependencies
3739

3840
Below are the primary upstream dependencies utilized in this project:
3941

40-
- [parity-scale-codec](https://crates.io/crates/parity-scale-codec)
41-
- [parity-db](https://crates.io/crates/parity-db)
42-
- [parity-common](https://github.com/paritytech/parity-common)
43-
- [trie](https://github.com/paritytech/trie)
42+
- [`parity-scale-codec`](https://crates.io/crates/parity-scale-codec)
43+
- [`parity-db`](https://crates.io/crates/parity-db)
44+
- [`parity-common`](https://github.com/paritytech/parity-common)
45+
- [`trie`](https://github.com/paritytech/trie)
4446

4547
## Security
4648

4749
The security policy and procedures can be found in [docs/SECURITY.md](./docs/SECURITY.md).
4850

4951
## Contributing & Code of Conduct
5052

51-
Ensure you follow our [contribution guidelines](./docs/CONTRIBUTING.md). In every interaction and contribution, this project adheres to the [Contributor Covenant Code of Conduct](./docs/CODE_OF_CONDUCT.md).
53+
Ensure you follow our [contribution guidelines](./docs/CONTRIBUTING.md). In every interaction and contribution, this
54+
project adheres to the [Contributor Covenant Code of Conduct](./docs/CODE_OF_CONDUCT.md).
5255

5356
## Additional Resources
5457

55-
- For monitoring upcoming changes and current proposals related to the technical implementation of the Polkadot network, visit the [`Requests for Comment (RFC)`](https://github.com/polkadot-fellows/RFCs) repository. While it's maintained by the Polkadot Fellowship, the RFC process welcomes contributions from everyone.
56-
58+
- For monitoring upcoming changes and current proposals related to the technical implementation of the Polkadot network,
59+
visit the [`Requests for Comment (RFC)`](https://github.com/polkadot-fellows/RFCs) repository. While it's maintained
60+
by the Polkadot Fellowship, the RFC process welcomes contributions from everyone.

0 commit comments

Comments
 (0)