Skip to content

Added option to remove indent from code samples#3081

Draft
mnocon wants to merge 2 commits into5.0from
remove-indent
Draft

Added option to remove indent from code samples#3081
mnocon wants to merge 2 commits into5.0from
remove-indent

Conversation

@mnocon
Copy link
Contributor

@mnocon mnocon commented Mar 11, 2026

Target: 4.6, 5.0

Improving readability of the code samples by reducing their indent where it's not meaningful.

It should not be enabled by default, because it can result in wrong indent when a code sample is composed of multiple include_file calls (the indentation would break then).

I've decided to keep the indent for YAML services - it might make things easier when copy/pasting (assuming someone is using 4-spaces indent)

Before:

Screenshot 2026-03-11 at 11 38 57

After:

Screenshot 2026-03-11 at 11 39 03

@github-actions
Copy link

Preview of modified files

Preview of modified Markdown:

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
D Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant