File: markdownlint.1

package info (click to toggle)
ruby-mdl 0.15.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 192 kB
  • sloc: ruby: 1,405; sh: 10; makefile: 4
file content (211 lines) | stat: -rw-r--r-- 5,706 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
.\"Created with GNOME Manpages Editor
.\"http://sourceforge.net/projects/gmanedit2

.\"Replace <program> with the program name, x with the Section Number
.TH MARKDOWNLINT 1 "December 12, 2025" "" "General Commands Manual"

.SH NAME
markdownlint \- Markdown lint tool

.SH SYNOPSIS
mdl [ options ] [FILE.md|DIR ...]
.br

.SH DESCRIPTION
markdownlint checks an individual markdown file, or a directory of markdown
files against a set of rules for syntax consistency.  In its report back
to the CLI, the Ruby based implementation reports the line(s) with an issue
identified and how to improve it.

.SH OPTIONS
.IP \-c,\ \--config\ FILE
The configuration file to use
.IP \-g,\ \--git-recurse
Only process files known to git when given a directory
.IP \-i,\ \--[no]-ignore-front-matter
Ignore YAML front matter
.IP \-j,\ \--json
JSON output
.IP \-l,\ \--list-rules
Don't process any files, just list enabled rules
.IP \-r,\ \--rules\ RULE1,RULE2
Only process these rules
.IP \-u,\ \--rulesets\ RULESET1,RULESET2
Specify additional ruleset files to load
.IP \-S,\ \--sarif
SARIF output
.IP \-a,\ \--[no]show-aliases
Show rule aliases instead of rule ID when viewing rules
.IP \-w,\ \--[no]warnings
Show kramdown warnings
.IP \-d,\ \--skip-default-ruleset
Don't load the default markdownlint ruleset
.IP \-s,\ \--style\ STYLE
Load the given style
.IP \-t,\ \--tags\ TAG1,TAG2
Only process rules with these tags
.IP \-v,\ \--[no-]verbose
Increase verbosity
.IP \-h,\ \--help
Show this message
.IP \-V,\ \--version
Show version

.SH EXAMPLES
Equally visit folders \f[I]docs\f[R] and \f[I]example\f[R] of the
GitHub repository.
.SS use rules by a flag
List the objectives of rules MD012, MD022, MD031 and MD032:
.IP
.EX
mdl -r MD012,MD022,MD031,MD032 -l
.EE
.PP
Scrutinize file example.md only by rules MD012, MD022, MD031 and MD032:
.IP
.EX
mdl -r MD012,MD022,MD031,MD032 example.md
.EE
.PP
Scrutinize file example.md by all rules available except MD033 and
MD034:
.IP
.EX
mdl -r \[ti]MD033,\[ti]MD034 example.md
.EE
.PP
List all rules associated to the tag \f[I]indentation\f[R]:
.IP
.EX
mdl -t indentation -l
.EE
.PP
Scrutinize file example.md by all rules without tag
\f[I]indentation\f[R]:
.IP
.EX
mdl -t \[ti]indentation example.md
.EE
.PP
By default, markdownlint reports sort the issues by their rule.
With GNU coreutils, your shell may resort the output by the
corresponding line number of the file:
.IP
.EX
mdl example.md | sort -t \[dq]:\[dq] -k 2 -n
.EE

.SS use rules by a local style file
.PP
Recurrent (personalized) check criteria can be saved as a style file,
for instance \f[I]mystyle.rb\f[R]. The snippet below illustrates the
syntax available.  Instead of pairs of single quotes, pairs of double
quotes may be used, too.
.IP
.EX
all  # initiate with all rules implemented

rule \[aq]MD013\[aq], :line_length => 100, :ignore_code_blocks => true
exclude_rule \[aq]MD014\[aq]

# tag :blockquote
exclude_tag :indentation
.EE
.PP
List the rules a local style file activates:
.IP
.EX
mdl -s mystyle.rb -l
.EE
.PP
A personalized local style then is used by
.IP
.EX
mdl -s mystyle.rb example.md
.EE
.PP
Local flags are of higher priority than a local style file.  Therefore,
the next command removes rule MD013 from consideration, regardless of
any definition about said rule in \f[I]mystyle.rb\f[R]:
.IP
.EX
mdl -s mystyle.rb -r \[ti]MD013 example.md
.EE

.SS use rules by a global style file
.PP
To deploy a markdownlint style all across your computer, set up a style
file (e.g., \f[I]mystyle.rb\f[R]).  Second, add a \f[I].mdlrc\f[R] file
to your home directory to indicate the location of said style file by
.IP
.EX
style "#{File.dirname(__FILE__)}/{your_markdown_rule_file_path}.rb"
.EE
.PP
Subsequently, a call by
.IP
.EX
mdl example.md
.EE
.PP
then applies the global style set.  In similar logic as above, a local
style file overrules definitions of a global style, i.e.
.IP
.EX
mdl example.md -s local_style.rb
.EE

.SS use rules for a project with continuous integration
.PP
The setup of a markdownlint style \f[I]per project\f[R] equally consists
of two files.  As an example, define \f[I].exclude_example.rb\f[R] with
.IP
.EX
# First, include all rules:
all
# Then, exclude MD013 (long lines), with:
exclude_rule 'MD013'
.EE
.PP
as a style file, and a \f[I].mdlrc\f[R] as indicator of its location with
.IP
.EX
#The custom style file is referenced by .mdlrc as below
style ".exclude_example.rb"
.EE
.PP
at the current root.  Again, a call like
.IP
.EX
mdl example.md
.EE
.PP
then applies the rules defined.

.SH AUTHOR
.nh
Mark Harrison, Ciro Santilli, Making GitHub Delicious., Brandon High,
Matt Jankowski, David Anson, Tobias Bengfort, Loic Nageleisen, Will
Fleming, Jean-Christophe GAY, sudodoki, David Rodríguez, Garth
Braithwaite, garthdb, Alexander Köplinger, Simon Symeonidis, psyomn,
Jakub Wilk, Eitan Adler, Phil Dibowitz, David Somers-Harris,
copperwalls, John Trammell, Waylan Limberg, Ash, Paul B, Andrew Janke,
Adam Strickland, Naomi Reeves, Olle Jonsson, Lauritz Hilsøe, Roman
Kolesnev, Alex Harvey, Tim Smith, tsuburin, Mikael Kjaer, Caleb Buxton,
Mark E. Schill, Waldir Pimenta, Jose Angel Pardillo Vela, androidseb,
jtcarnes, Gene Gotimer, Sami Ahmed Siddiqui, Karol Babioch, Eric
Knibbe, Alexander Jaust, orviz, Lennart Jern, Benjamin Quorning, Ting
Chen, Kai, adamroyjones, Bengt Lüers, JP Hastings-Spital, nbehrnd,
iafelix, ColemanTom, Levente Polyak, Gunes Bayir, Mathieu Rul, Markus
Lehtonen, Matthias Thym, Benjamin Bannier, AJRepo.
.SH LICENSE
MIT

.SH REPORTING BUGS
Report bugs to and suggest improvements on the project page,
.br
.UR https://github.com/markdownlint/markdownlint
.UE

.SH VERSION
This is about markdownlint version 0.15.0 (November 26, 2025).