Skip to content

Commit b22c23a

Browse files
committed
content: Add Thoughts About Markdown File Management
This is from the works of [firecracker](https://github.com/firecracker-microvm/firecracker/), by analyzing how they manage markdown files. Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
1 parent 073fd80 commit b22c23a

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# How Firecracker Manager Their Markdown Files
2+
3+
[Firecracker](https://github.com/firecracker-microvm/firecracker/) use
4+
`mdformat` (a python written program) to lint their files end with `.md`.
5+
6+
This rule is applied by executing the `pre-commit` shell script, and enforced in
7+
their CI.
8+
9+
## pre-commit Script
10+
11+
This script lints every staged file, as of `.md`s, it simply do `mdformat
12+
<file-name>`. The command directly formats that file instead of produce
13+
differences before/after format.
14+
15+
It is a good idea to format these files, but I don't prefer doing it without
16+
`--check` flag. I think it would be better to tell developers that some `.md`
17+
files are not in a preferred form that `mdformat` thinks, instead of changing it
18+
directly and developers may well get confuse on what is going to be committed.

0 commit comments

Comments
 (0)