Skip to content

Commit d3028c3

Browse files
committed
Setup custom mdl (Markdown linter) rules
1 parent bf8ff58 commit d3028c3

File tree

3 files changed

+50
-0
lines changed

3 files changed

+50
-0
lines changed

.mdl_style.rb

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# SPDX-FileCopyrightText: 2021 - 2024 Robin Vobruba <[email protected]>
2+
#
3+
# SPDX-License-Identifier: Unlicense
4+
5+
# Enforce the style guide at https://cirosantilli.com/markdown-style-guide
6+
all
7+
8+
rule 'MD003', :style => :atx
9+
#rule 'MD004', :style => :dash
10+
#rule 'MD004', :style => :asterisk
11+
#rule 'MD004', :style => :consistent
12+
#rule 'MD007', :indent => 4
13+
rule 'MD013', :tables => false
14+
rule 'MD029', :style => 'ordered'
15+
#rule 'MD030', :ul_multi => 3, :ol_multi => 2
16+
rule 'MD035', :style => '---'
17+
18+
# First header should be a top level header
19+
# - We have the title in the YAML meta-data,
20+
# so we can use headers however we want
21+
exclude_rule 'MD002'
22+
# No hard tabs
23+
# - We use tabs in the sources,
24+
# and thus also in the excerpts from the sources
25+
exclude_rule 'MD010'
26+
# Multiple top level headers in the same document
27+
# - We have the title in the YAML meta-data,
28+
# so we can legitimately use level 1 headers for sections
29+
exclude_rule 'MD025'
30+
# Trailing punctuation in header
31+
exclude_rule 'MD026'
32+
# First line in file should be a top level header
33+
# - The README has the title as a big ASCII-art
34+
exclude_rule 'MD041'

.mdlrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# SPDX-FileCopyrightText: 2018 Robin Vobruba <[email protected]>
2+
#
3+
# SPDX-License-Identifier: Unlicense
4+
5+
style "#{File.dirname(__FILE__)}/.mdl_style.rb"
6+
git_recurse true

LICENSES/Unlicense.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
This is free and unencumbered software released into the public domain.
2+
3+
Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.
4+
5+
In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and
6+
successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law.
7+
8+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
9+
10+
For more information, please refer to <http://unlicense.org/>

0 commit comments

Comments
 (0)