Comments (3)
This tool shows what it's doing at the beginning of its output. You can see that in your bottom snippet as something that looks like this: Finding: --config=extern/make/.config/.markdownlint-cli2.yaml .gitlab/issue_templates/Default.md ...
That tells us the syntax for "--config" was wrong because "=" should not be used there. The pre-commit syntax you show above looks reasonable to me, but I do not use pre-commit. In my own smoke test for pre-commit integration, I use this syntax and it seems to behave as expected: args: [--config, configuration/.markdownlint-cli2.jsonc]
from markdownlint.
The pre-commit configuration above is using "args" to say the YAML configuration file should be linted (and nothing else). You probably want to use the --config option and pass a glob like "**/*.md". Once that problem is fixed, the "ignores" override you have should no longer be necessary and the other configuration should be applied as expected.
from markdownlint.
@DavidAnson I have try to add the below configuration. Which you have suggested but after that also It is not ignoring the file
pre-commit-hook.yaml
- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.12.1
hooks:
- id: markdownlint-cli2
args:
- --config
- extern/make/.config/.markdownlint-cli2.yaml
markdownlint-cli2.yaml
---
# MarkdownLint YAML configuration file
# https://github.com/DavidAnson/markdownlint-cli2?tab=readme-ov-file#markdownlint-cli2yaml
# https://github.com/DavidAnson/markdownlint-cli2/blob/main/test/markdownlint-cli2-yaml-example/.markdownlint-cli2.yaml
config:
# MD013/line-length: https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md013.md
line-length:
tables: false # Do not complain about wide tables generated by Terraform Docs
line_length: 255
# Fix any fixable errors
fix: true
# Define glob expressions to ignore
ignores:
# MarkdownLint detects this file as a '.markdown' file
- "**/.markdownlint-cli2.yaml"
- "**/*.md"
Could you provide me the pre-commit hook config which I need to use in markdownlint-cli2 to ignore the line-length issue in table.
Error:
markdownlint-cli2........................................................Failed
- hook id: markdownlint-cli2
- exit code: 1
markdownlint-cli2 v0.12.1 (markdownlint v0.33.0)
Finding: --config=extern/make/.config/.markdownlint-cli2.yaml .gitlab/issue_templates/Default.md development/ec2/README.md CHANGELOG.md development/vpc/README.md
Linting: 4 file(s)
Summary: 37 error(s)
CHANGELOG.md:1 MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "## v0.2.0 (2024-02-15)"]
development/ec2/README.md:23:81 MD013/line-length Line length [Expected: 80; Actual: 126]
development/ec2/README.md:24:81 MD013/line-length Line length [Expected: 80; Actual: 126]
development/ec2/README.md:25:81 MD013/line-length Line length [Expected: 80; Actual: 126]
development/ec2/README.md:26:81 MD013/line-length Line length [Expected: 80; Actual: 126]
development/ec2/README.md:27:81 MD013/line-length Line length [Expected: 80; Actual: 126]
development/ec2/README.md:31:81 MD013/line-length Line length [Expected: 80; Actual: 151]
development/ec2/README.md:32:81 MD013/line-length Line length [Expected: 80; Actual: 151]
development/ec2/README.md:39:81 MD013/line-length Line length [Expected: 80; Actual: 349]
development/ec2/README.md:40:81 MD013/line-length Line length [Expected: 80; Actual: 349]
development/ec2/README.md:41:81 MD013/line-length Line length [Expected: 80; Actual: 349]
development/ec2/README.md:42:81 MD013/line-length Line length [Expected: 80; Actual: 349]
development/ec2/README.md:43:81 MD013/line-length Line length [Expected: 80; Actual: 349]
development/ec2/README.md:44:81 MD013/line-length Line length [Expected: 80; Actual: 349]
development/ec2/README.md:45:81 MD013/line-length Line length [Expected: 80; Actual: 349]
development/ec2/README.md:46:81 MD013/line-length Line length [Expected: 80; Actual: 349]
development/ec2/README.md:47:81 MD013/line-length Line length [Expected: 80; Actual: 349]
development/ec2/README.md:48:81 MD013/line-length Line length [Expected: 80; Actual: 349]
development/ec2/README.md:49:81 MD013/line-length Line length [Expected: 80; Actual: 349]
development/ec2/README.md:50:81 MD013/line-length Line length [Expected: 80; Actual: 349]
development/ec2/README.md:51:81 MD013/line-length Line length [Expected: 80; Actual: 349]
development/ec2/README.md:52:81 MD013/line-length Line length [Expected: 80; Actual: 349]
development/ec2/README.md:53:81 MD013/line-length Line length [Expected: 80; Actual: 349]
development/ec2/README.md:54:81 MD013/line-length Line length [Expected: 80; Actual: 349]
development/ec2/README.md:55:81 MD013/line-length Line length [Expected: 80; Actual: 349]
development/ec2/README.md:56:81 MD013/line-length Line length [Expected: 80; Actual: 349]
development/ec2/README.md:57:81 MD013/line-length Line length [Expected: 80; Actual: 349]
development/vpc/README.md:28:81 MD013/line-length Line length [Expected: 80; Actual: 208]
development/vpc/README.md:29:81 MD013/line-length Line length [Expected: 80; Actual: 208]
development/vpc/README.md:30:81 MD013/line-length Line length [Expected: 80; Actual: 208]
development/vpc/README.md:31:81 MD013/line-length Line length [Expected: 80; Actual: 208]
development/vpc/README.md:32:81 MD013/line-length Line length [Expected: 80; Actual: 208]
development/vpc/README.md:33:81 MD013/line-length Line length [Expected: 80; Actual: 208]
development/vpc/README.md:34:81 MD013/line-length Line length [Expected: 80; Actual: 208]
development/vpc/README.md:35:81 MD013/line-length Line length [Expected: 80; Actual: 208]
development/vpc/README.md:36:81 MD013/line-length Line length [Expected: 80; Actual: 208]
development/vpc/README.md:37:81 MD013/line-length Line length [Expected: 80; Actual: 208]
markdownlint-cli2 v0.12.1 (markdownlint v0.33.0)
Finding: --config=extern/make/.config/.markdownlint-cli2.yaml .gitlab/merge_request_templates/Default.md .gitlab/issue_templates/Report_Bug.md common/vpc-skeleton/README.md development/vpc_peering/README.md
Linting: 4 file(s)
Summary: 138 error(s)
common/vpc-skeleton/README.md:20:81 MD013/line-length Line length [Expected: 80; Actual: 136]
common/vpc-skeleton/README.md:21:81 MD013/line-length Line length [Expected: 80; Actual: 136]
common/vpc-skeleton/README.md:22:81 MD013/line-length Line length [Expected: 80; Actual: 136]
common/vpc-skeleton/README.md:23:81 MD013/line-length Line length [Expected: 80; Actual: 136]
common/vpc-skeleton/README.md:24:81 MD013/line-length Line length [Expected: 80; Actual: 136]
common/vpc-skeleton/README.md:25:81 MD013/line-length Line length [Expected: 80; Actual: 136]
common/vpc-skeleton/README.md:26:81 MD013/line-length Line length [Expected: 80; Actual: 136]
common/vpc-skeleton/README.md:27:81 MD013/line-length Line length [Expected: 80; Actual: 136]
common/vpc-skeleton/README.md:28:81 MD013/line-length Line length [Expected: 80; Actual: 136]
common/vpc-skeleton/README.md:29:81 MD013/line-length Line length [Expected: 80; Actual: 136]
common/vpc-skeleton/README.md:30:81 MD013/line-length Line length [Expected: 80; Actual: 136]
common/vpc-skeleton/README.md:31:81 MD013/line-length Line length [Expected: 80; Actual: 136]
common/vpc-skeleton/README.md:32:81 MD013/line-length Line length [Expected: 80; Actual: 136]
common/vpc-skeleton/README.md:33:81 MD013/line-length Line length [Expected: 80; Actual: 136]
common/vpc-skeleton/README.md:34:81 MD013/line-length Line length [Expected: 80; Actual: 136]
common/vpc-skeleton/README.md:35:81 MD013/line-length Line length [Expected: 80; Actual: 136]
common/vpc-skeleton/README.md:36:81 MD013/line-length Line length [Expected: 80; Actual: 136]
common/vpc-skeleton/README.md:44:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:45:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:46:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:47:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:48:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:49:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:50:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:51:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:52:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:53:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:54:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:55:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:56:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:57:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:58:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:59:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:60:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:61:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:62:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:63:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:64:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:65:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:66:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:67:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:68:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:69:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:70:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:71:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:72:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:73:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:74:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:75:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:76:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:77:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:78:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:79:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:80:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:81:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:82:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:83:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:84:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:85:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:86:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:87:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:88:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:89:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:90:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:91:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:92:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:93:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:94:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:95:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:96:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:97:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:98:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:99:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:100:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:101:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:102:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:103:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:104:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:105:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:106:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:107:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:108:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:109:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:110:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:111:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:112:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:113:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:114:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:115:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:116:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:117:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:118:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:119:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:120:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:121:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:122:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:123:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:124:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:125:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:126:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:127:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:128:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:129:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:130:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:131:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:132:81 MD013/line-length Line length [Expected: 80; Actual: 252]
common/vpc-skeleton/README.md:133:81 MD013/line-length Line length [Expected: 80; Actual: 252]
development/vpc_peering/README.md:26:81 MD013/line-length Line length [Expected: 80; Actual: 178]
development/vpc_peering/README.md:27:81 MD013/line-length Line length [Expected: 80; Actual: 178]
development/vpc_peering/README.md:42:81 MD013/line-length Line length [Expected: 80; Actual: 268]
development/vpc_peering/README.md:43:81 MD013/line-length Line length [Expected: 80; Actual: 268]
development/vpc_peering/README.md:44:81 MD013/line-length Line length [Expected: 80; Actual: 268]
development/vpc_peering/README.md:45:81 MD013/line-length Line length [Expected: 80; Actual: 268]
development/vpc_peering/README.md:46:81 MD013/line-length Line length [Expected: 80; Actual: 268]
development/vpc_peering/README.md:47:81 MD013/line-length Line length [Expected: 80; Actual: 268]
development/vpc_peering/README.md:48:81 MD013/line-length Line length [Expected: 80; Actual: 268]
development/vpc_peering/README.md:49:81 MD013/line-length Line length [Expected: 80; Actual: 268]
development/vpc_peering/README.md:50:81 MD013/line-length Line length [Expected: 80; Actual: 268]
development/vpc_peering/README.md:51:81 MD013/line-length Line length [Expected: 80; Actual: 268]
development/vpc_peering/README.md:52:81 MD013/line-length Line length [Expected: 80; Actual: 268]
development/vpc_peering/README.md:53:81 MD013/line-length Line length [Expected: 80; Actual: 268]
development/vpc_peering/README.md:54:81 MD013/line-length Line length [Expected: 80; Actual: 268]
development/vpc_peering/README.md:55:81 MD013/line-length Line length [Expected: 80; Actual: 268]
development/vpc_peering/README.md:59:81 MD013/line-length Line length [Expected: 80; Actual: 105]
development/vpc_peering/README.md:60:81 MD013/line-length Line length [Expected: 80; Actual: 105]
development/vpc_peering/README.md:61:81 MD013/line-length Line length [Expected: 80; Actual: 105]
development/vpc_peering/README.md:62:81 MD013/line-length Line length [Expected: 80; Actual: 105]
development/vpc_peering/README.md:63:81 MD013/line-length Line length [Expected: 80; Actual: 105]
development/vpc_peering/README.md:64:81 MD013/line-length Line length [Expected: 80; Actual: 105]
development/vpc_peering/README.md:65:81 MD013/line-length Line length [Expected: 80; Actual: 105]
development/vpc_peering/README.md:66:81 MD013/line-length Line length [Expected: 80; Actual: 105]
development/vpc_peering/README.md:67:81 MD013/line-length Line length [Expected: 80; Actual: 105]
development/vpc_peering/README.md:68:81 MD013/line-length Line length [Expected: 80; Actual: 105]
development/vpc_peering/README.md:69:81 MD013/line-length Line length [Expected: 80; Actual: 105]
development/vpc_peering/README.md:70:81 MD013/line-length Line length [Expected: 80; Actual: 105]
development/vpc_peering/README.md:71:81 MD013/line-length Line length [Expected: 80; Actual: 105]
development/vpc_peering/README.md:72:81 MD013/line-length Line length [Expected: 80; Actual: 105]
development/vpc_peering/README.md:73:81 MD013/line-length Line length [Expected: 80; Actual: 105]
from markdownlint.
Related Issues (20)
- Can someone help if I'm lost. Thanks HOT 1
- Use markdownlint wirth quarto ".qmd" - files HOT 4
- Pi HOT 1
- fv HOT 1
- markdownlint HOT 1
- MD051 false positive `## $\LaTeX$ hooks` ⟼ `[latex hooks](#latex-hooks)` HOT 1
- MD013 false positive when url contains # HOT 8
- Formatter functionality: adjust table size to its content HOT 8
- MD051 support icon HOT 11
- Enhance rule MD033 to be more specific/targetted HOT 7
- #Mightywow HOT 1
- MD004 overwritten by prettier HOT 4
- MD009: Add option to remove trailing spaces in code blocks
- No bare-urls when using _redirects file HOT 1
- MD033 - Inline HTML Not ignoring custom HTML tags, but recognizing them as tags HOT 2
- MD033: Organizing information with collapsed sections HOT 7
- MD045: no-alt-text triggered even though html alt-text is specified HOT 2
- QUESTION: Is it possible to write custom linting rules, including Quick Fix information, for frontmatter? HOT 2
- Copyright HOT 1
- MD056/table-column-count counts pipes inside backticks as column separators HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from markdownlint.