Closed Takashiidobe closed 3 years ago
Makes sense to me, let me figure out how to exclude code blocks from markdown lint.
I added MD010 to the .markdownlint.json (which excludes this rule). Apparently some of the code inside the code blocks uses hard tabs (actual tabs) whereas some parts use soft tabs (spaces). MD010 normally bans the use of hard tabs. MD004 (prefer asterisks instead of dashes for uls was also ignored) and MD013 (line length of only 80) was also ignored.
I added MD010 to the .markdownlint.json (which excludes this rule). Apparently some of the code inside the code blocks uses hard tabs (actual tabs) whereas some parts use soft tabs (spaces). MD010 normally bans the use of hard tabs. MD004 (prefer asterisks instead of dashes for uls was also ignored) and MD013 (line length of only 80) was also ignored.
Nice!
Code we should at one point be able to easily format with a cargo-fmt.toml
if something like mdbook fmt
works. (let's cross fingers)
For MD013, do you prefer that? Did it look bad or why did you ignore it?
For MD013, do you prefer that? Did it look bad or why did you ignore it?
MD013 requires that lines are less than 80 columns in width. A lot of sentences and paragraphs were longer than this, so I decided against this rule.
Here's a list of lines that violated this rule:
I also don't agree with this since there's no custom that forces column length to be < 80 (like in PEP8, the python code formatter), so I ignored it.
anti_patterns/index.md:3:81 MD013/line-length Line length [Expected: 80; Actual: 170]
anti_patterns/index.md:4:81 MD013/line-length Line length [Expected: 80; Actual: 85]
anti_patterns/index.md:6:81 MD013/line-length Line length [Expected: 80; Actual: 91]
functional/index.md:3:81 MD013/line-length Line length [Expected: 80; Actual: 374]
functional/index.md:15:81 MD013/line-length Line length [Expected: 80; Actual: 256]
functional/index.md:30:81 MD013/line-length Line length [Expected: 80; Actual: 88]
functional/index.md:38:81 MD013/line-length Line length [Expected: 80; Actual: 296]
functional/index.md:40:81 MD013/line-length Line length [Expected: 80; Actual: 390]
idioms/coercion-arguments.md:5:81 MD013/line-length Line length [Expected: 80; Actual: 150]
idioms/coercion-arguments.md:8:81 MD013/line-length Line length [Expected: 80; Actual: 227]
idioms/coercion-arguments.md:10:81 MD013/line-length Line length [Expected: 80; Actual: 242]
idioms/coercion-arguments.md:11:81 MD013/line-length Line length [Expected: 80; Actual: 117]
idioms/coercion-arguments.md:15:81 MD013/line-length Line length [Expected: 80; Actual: 224]
idioms/coercion-arguments.md:17:81 MD013/line-length Line length [Expected: 80; Actual: 91]
idioms/coercion-arguments.md:53:81 MD013/line-length Line length [Expected: 80; Actual: 113]
idioms/coercion-arguments.md:70:81 MD013/line-length Line length [Expected: 80; Actual: 157]
idioms/coercion-arguments.md:71:81 MD013/line-length Line length [Expected: 80; Actual: 127]
idioms/coercion-arguments.md:73:81 MD013/line-length Line length [Expected: 80; Actual: 172]
idioms/coercion-arguments.md:74:81 MD013/line-length Line length [Expected: 80; Actual: 115]
idioms/coercion-arguments.md:106:81 MD013/line-length Line length [Expected: 80; Actual: 88]
idioms/coercion-arguments.md:112:81 MD013/line-length Line length [Expected: 80; Actual: 97]
idioms/coercion-arguments.md:113:81 MD013/line-length Line length [Expected: 80; Actual: 214]
idioms/coercion-arguments.md:118:81 MD013/line-length Line length [Expected: 80; Actual: 230]
idioms/ctor.md:35:81 MD013/line-length Line length [Expected: 80; Actual: 95]
idioms/index.md:3:81 MD013/line-length Line length [Expected: 80; Actual: 284]
idioms/index.md:5:81 MD013/line-length Line length [Expected: 80; Actual: 227]
idioms/index.md:7:81 MD013/line-length Line length [Expected: 80; Actual: 296]
idioms/option-iter.md:5:81 MD013/line-length Line length [Expected: 80; Actual: 201]
idioms/option-iter.md:23:81 MD013/line-length Line length [Expected: 80; Actual: 169]
idioms/option-iter.md:34:81 MD013/line-length Line length [Expected: 80; Actual: 169]
idioms/option-iter.md:36:81 MD013/line-length Line length [Expected: 80; Actual: 206]
idioms/option-iter.md:40:81 MD013/line-length Line length [Expected: 80; Actual: 180]
idioms/option-iter.md:42:81 MD013/line-length Line length [Expected: 80; Actual: 268]
idioms/option-iter.md:44:81 MD013/line-length Line length [Expected: 80; Actual: 140]
idioms/pass-var-to-closure.md:6:81 MD013/line-length Line length [Expected: 80; Actual: 90]
idioms/pass-var-to-closure.md:49:81 MD013/line-length Line length [Expected: 80; Actual: 88]
idioms/priv-extend.md:30:81 MD013/line-length Line length [Expected: 80; Actual: 503]
idioms/priv-extend.md:32:81 MD013/line-length Line length [Expected: 80; Actual: 234]
idioms/priv-extend.md:34:81 MD013/line-length Line length [Expected: 80; Actual: 249]
idioms/rustdoc-init.md:5:81 MD013/line-length Line length [Expected: 80; Actual: 116]
idioms/rustdoc-init.md:46:81 MD013/line-length Line length [Expected: 80; Actual: 167]
idioms/rustdoc-init.md:70:81 MD013/line-length Line length [Expected: 80; Actual: 162]
idioms/rustdoc-init.md:78:81 MD013/line-length Line length [Expected: 80; Actual: 141]
idioms/rustdoc-init.md:79:81 MD013/line-length Line length [Expected: 80; Actual: 94]
idioms/rustdoc-init.md:85:81 MD013/line-length Line length [Expected: 80; Actual: 158]
idioms/rustdoc-init.md:86:81 MD013/line-length Line length [Expected: 80; Actual: 94]
idioms/temporary-mutability.md:5:81 MD013/line-length Line length [Expected: 80; Actual: 94]
idioms/temporary-mutability.md:6:81 MD013/line-length Line length [Expected: 80; Actual: 103]
patterns/builder.md:36:81 MD013/line-length Line length [Expected: 80; Actual: 94]
patterns/builder.md:38:81 MD013/line-length Line length [Expected: 80; Actual: 88]
patterns/builder.md:103:81 MD013/line-length Line length [Expected: 80; Actual: 142]
patterns/compose-structs.md:36:81 MD013/line-length Line length [Expected: 80; Actual: 89]
patterns/index.md:3:81 MD013/line-length Line length [Expected: 80; Actual: 180]
patterns/index.md:4:81 MD013/line-length Line length [Expected: 80; Actual: 116]
patterns/index.md:5:81 MD013/line-length Line length [Expected: 80; Actual: 186]
patterns/index.md:7:81 MD013/line-length Line length [Expected: 80; Actual: 183]
patterns/index.md:11:81 MD013/line-length Line length [Expected: 80; Actual: 169]
patterns/index.md:15:81 MD013/line-length Line length [Expected: 80; Actual: 170]
patterns/index.md:19:81 MD013/line-length Line length [Expected: 80; Actual: 299]
patterns/newtype.md:10:81 MD013/line-length Line length [Expected: 80; Actual: 99]
patterns/newtype.md:97:81 MD013/line-length Line length [Expected: 80; Actual: 262]
patterns/newtype.md:104:81 MD013/line-length Line length [Expected: 80; Actual: 108]
patterns/RAII.md:5:81 MD013/line-length Line length [Expected: 80; Actual: 89]
patterns/small-crates.md:7:81 MD013/line-length Line length [Expected: 80; Actual: 337]
patterns/small-crates.md:12:81 MD013/line-length Line length [Expected: 80; Actual: 180]
patterns/small-crates.md:13:81 MD013/line-length Line length [Expected: 80; Actual: 143]
patterns/small-crates.md:17:81 MD013/line-length Line length [Expected: 80; Actual: 368]
patterns/small-crates.md:18:81 MD013/line-length Line length [Expected: 80; Actual: 127]
patterns/small-crates.md:19:81 MD013/line-length Line length [Expected: 80; Actual: 137]
patterns/small-crates.md:23:81 MD013/line-length Line length [Expected: 80; Actual: 109]
patterns/small-crates.md:27:81 MD013/line-length Line length [Expected: 80; Actual: 119]
patterns/unsafe-mods.md:5:81 MD013/line-length Line length [Expected: 80; Actual: 403]
patterns/unsafe-mods.md:10:81 MD013/line-length Line length [Expected: 80; Actual: 100]
patterns/unsafe-mods.md:19:81 MD013/line-length Line length [Expected: 80; Actual: 134]
patterns/unsafe-mods.md:20:81 MD013/line-length Line length [Expected: 80; Actual: 322]
refactoring/index.md:3:81 MD013/line-length Line length [Expected: 80; Actual: 164]
refactoring/index.md:5:81 MD013/line-length Line length [Expected: 80; Actual: 246]
additional_resources.md:7:81 MD013/line-length Line length [Expected: 80; Actual: 109]
CONTRIBUTING.md:5:81 MD013/line-length Line length [Expected: 80; Actual: 117]
CONTRIBUTING.md:6:81 MD013/line-length Line length [Expected: 80; Actual: 158]
CONTRIBUTING.md:10:81 MD013/line-length Line length [Expected: 80; Actual: 110]
CONTRIBUTING.md:11:81 MD013/line-length Line length [Expected: 80; Actual: 110]
CONTRIBUTING.md:14:81 MD013/line-length Line length [Expected: 80; Actual: 188]
CONTRIBUTING.md:15:81 MD013/line-length Line length [Expected: 80; Actual: 111]
CONTRIBUTING.md:18:81 MD013/line-length Line length [Expected: 80; Actual: 152]
CONTRIBUTING.md:19:81 MD013/line-length Line length [Expected: 80; Actual: 141]
CONTRIBUTING.md:21:81 MD013/line-length Line length [Expected: 80; Actual: 141]
CONTRIBUTING.md:22:81 MD013/line-length Line length [Expected: 80; Actual: 104]
CONTRIBUTING.md:26:81 MD013/line-length Line length [Expected: 80; Actual: 133]
CONTRIBUTING.md:27:81 MD013/line-length Line length [Expected: 80; Actual: 103]
CONTRIBUTING.md:29:81 MD013/line-length Line length [Expected: 80; Actual: 91]
CONTRIBUTING.md:31:81 MD013/line-length Line length [Expected: 80; Actual: 127]
CONTRIBUTING.md:37:81 MD013/line-length Line length [Expected: 80; Actual: 133]
CONTRIBUTING.md:44:81 MD013/line-length Line length [Expected: 80; Actual: 129]
CONTRIBUTING.md:49:81 MD013/line-length Line length [Expected: 80; Actual: 119]
CONTRIBUTING.md:51:81 MD013/line-length Line length [Expected: 80; Actual: 151]
intro.md:5:81 MD013/line-length Line length [Expected: 80; Actual: 252]
intro.md:9:81 MD013/line-length Line length [Expected: 80; Actual: 298]
intro.md:11:81 MD013/line-length Line length [Expected: 80; Actual: 98]
intro.md:13:81 MD013/line-length Line length [Expected: 80; Actual: 90]
intro.md:17:81 MD013/line-length Line length [Expected: 80; Actual: 105]
intro.md:20:81 MD013/line-length Line length [Expected: 80; Actual: 90]
README.md:12:81 MD013/line-length Line length [Expected: 80; Actual: 226]
README.md:14:81 MD013/line-length Line length [Expected: 80; Actual: 168]
README.md:21:81 MD013/line-length Line length [Expected: 80; Actual: 254]
README.md:27:81 MD013/line-length Line length [Expected: 80; Actual: 92]
README.md:43:81 MD013/line-length Line length [Expected: 80; Actual: 106]
README.md:44:81 MD013/line-length Line length [Expected: 80; Actual: 121]
README.md:46:81 MD013/line-length Line length [Expected: 80; Actual: 103]
README.md:50:81 MD013/line-length Line length [Expected: 80; Actual: 124]
README.md:52:81 MD013/line-length Line length [Expected: 80; Actual: 110]
README.md:60:81 MD013/line-length Line length [Expected: 80; Actual: 100]
ok, yeah, should be fine without the limit, and we could set it at a later stage if we decide to
@Takashiidobe One thing, i converted the json to yaml as this is nearer to the toml format we're used to from rust and just less brackets :-D
This PR runs markdownlint on the project like so: