[GH-ISSUE #383] Provide custom hard tab behavior for code blocks according to language (e.g., go / golang) #2171

Closed
opened 2026-03-07 20:05:14 +03:00 by kerem · 0 comments
Owner

Originally created by @TJM on GitHub (Mar 31, 2021).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/383

Related to: #282

golang uses "hard tabs" (much to my dismay), and that causes the linter to display a huge amount of violations. The no-hard-tabs rule can be turned off, either globally, or in code blocks, but I assert that it should default to off in a code block labeled as "golang" ... like:

```go

or

```golang

I am not sure what the level of effort required to get the "type" of a code block would be, then to set a different default for golang (and any other language that insists on using tabs), but I think it would make the tool much more user friendly.

Thanks,
Tommy

Originally created by @TJM on GitHub (Mar 31, 2021). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/383 Related to: #282 golang uses "hard tabs" (much to my dismay), and that causes the linter to display a huge amount of violations. The `no-hard-tabs` rule can be turned off, either globally, or in code blocks, but I assert that it should *default* to off in a code block labeled as "golang" ... like: ``` ```go ``` or ``` ```golang ``` I am not sure what the level of effort required to get the "type" of a code block would be, then to set a different default for golang (and any other language that insists on using tabs), but I think it would make the tool much more user friendly. Thanks, Tommy
kerem 2026-03-07 20:05:14 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/markdownlint#2171
No description provided.