Skip to content

Commit fa4e4eb

Browse files
committed
docs: fix mdbook-lint issues and improve CLI reference formatting
- Fixed MD022, MD032, MD047 issues in introduction.md manually - Updated doc generation script to use proper code block syntax (text) - Fixed CLI reference documentation formatting issues - Created comprehensive bug report for mdbook-lint issues - Opened GitHub issue #175 on mdbook-lint repository for: - Configuration rules not being applied - --fix option not working - Improved CLI reference generation with better markdown formatting Most critical linting issues now resolved, remaining are due to mdbook-lint bugs.
1 parent 9b2a546 commit fa4e4eb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+1273
-159
lines changed

docs/.mdbook-lint.toml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,31 @@ disabled-rules = [
88
"MDBOOK002", # Internal link validation - false positives with existing files
99
]
1010

11-
# Don't fail the build on warnings or errors during initial setup
11+
# Don't fail the build on warnings, but show them for fixing
1212
fail-on-warnings = false
1313
fail-on-errors = false
1414

15+
# Enable rules that should be fixable
16+
[rules.MD022]
17+
# Require blank lines around headings
18+
enabled = true
19+
20+
[rules.MD032]
21+
# Require blank lines around lists
22+
enabled = true
23+
24+
[rules.MD031]
25+
# Require blank lines around fenced code blocks
26+
enabled = true
27+
28+
[rules.MD006]
29+
# Lists should start at beginning of line
30+
enabled = true
31+
32+
[rules.MD047]
33+
# Files should end with single newline
34+
enabled = true
35+
1536
# Configure specific rules
1637
[rules.MD013]
1738
# Allow longer lines for code examples and CLI output

docs/MDBOOK_LINT_BUG_REPORT.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# mdbook-lint Bug Report
2+
3+
Found multiple bugs in mdbook-lint v0.11.2 during redisctl documentation linting.
4+
5+
## Bug 1: Configuration Rules Not Applied
6+
7+
**Issue**: Rules defined in `.mdbook-lint.toml` configuration file are not being applied.
8+
9+
**Expected**: Rules configured in the config file should override defaults.
10+
11+
**Actual**: Default rule settings are used regardless of configuration.
12+
13+
**Reproduction**:
14+
1. Create `.mdbook-lint.toml` with:
15+
```toml
16+
[rules.MD013]
17+
line_length = 120
18+
```
19+
2. Run `mdbook-lint lint file.md`
20+
3. Observe that MD013 still enforces 80 character limit instead of 120
21+
22+
**Evidence**: Lines over 80 chars trigger MD013 warnings despite config setting line_length = 120.
23+
24+
## Bug 2: --fix Option Not Working
25+
26+
**Issue**: The `--fix` option doesn't actually fix any issues, even for rules that should be auto-fixable.
27+
28+
**Expected**: `mdbook-lint lint --fix file.md` should automatically fix issues like MD022, MD032, MD031, MD047.
29+
30+
**Actual**: Command shows the same warnings but doesn't modify the file.
31+
32+
**Reproduction**:
33+
1. Create test file with MD022 violations (missing blank lines after headings)
34+
2. Run `mdbook-lint lint --fix test.md`
35+
3. File remains unchanged despite warnings being shown
36+
37+
**Test case**:
38+
```markdown
39+
# Heading
40+
Text directly after heading without blank line
41+
```
42+
43+
Should be auto-fixed to:
44+
```markdown
45+
# Heading
46+
47+
Text directly after heading without blank line
48+
```
49+
50+
But file remains unmodified.
51+
52+
## Environment
53+
- mdbook-lint version: 0.11.2
54+
- OS: macOS (Darwin 24.6.0)
55+
- Configuration file present: `.mdbook-lint.toml`
56+
57+
## Workaround
58+
Currently fixing issues manually by editing markdown files directly.
59+
60+
## Impact
61+
These bugs prevent automated fixing and proper configuration of linting rules, requiring manual intervention for all markdown formatting issues.

docs/cli-reference/README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# redisctl Command Reference
22

3-
```
3+
```text
44
Unified Redis CLI for Cloud and Enterprise
55
66
Usage: redisctl [OPTIONS] <COMMAND>
@@ -25,5 +25,4 @@ Options:
2525
-v, --verbose... Verbose logging
2626
-h, --help Print help
2727
-V, --version Print version
28-
```
29-
28+
```text

docs/cli-reference/auth/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Authentication Management Commands
22

3-
```
3+
```text
44
Authentication testing and management
55
66
Usage: redisctl auth <COMMAND>
@@ -13,4 +13,3 @@ Commands:
1313
Options:
1414
-h, --help Print help
1515
```
16-

docs/cli-reference/auth/setup.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
# Auth Setup Command
22

3-
```
3+
```text
44
Interactive setup wizard for new profiles
55
66
Usage: redisctl auth setup
77
88
Options:
99
-h, --help Print help
10-
```
11-
10+
```text

docs/cli-reference/auth/test.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Auth Test Command
22

3-
```
3+
```text
44
Test authentication credentials
55
66
Usage: redisctl auth test [OPTIONS]
@@ -9,5 +9,4 @@ Options:
99
--profile <PROFILE> Profile to test (defaults to current profile)
1010
--deployment <DEPLOYMENT> Test a specific deployment type [possible values: cloud, enterprise]
1111
-h, --help Print help
12-
```
13-
12+
```text

docs/cli-reference/cloud/README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Redis Cloud Commands
22

3-
```
3+
```text
44
Redis Cloud commands
55
66
Usage: redisctl cloud <COMMAND>
@@ -31,5 +31,4 @@ Commands:
3131
3232
Options:
3333
-h, --help Print help
34-
```
35-
34+
```text

docs/cli-reference/cloud/account.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Cloud Account Commands
22

3-
```
3+
```text
44
Account management
55
66
Usage: redisctl cloud account <COMMAND>
@@ -16,5 +16,4 @@ Commands:
1616
1717
Options:
1818
-h, --help Print help
19-
```
20-
19+
```text

docs/cli-reference/cloud/acl.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Cloud ACL Commands
22

3-
```
3+
```text
44
ACL management
55
66
Usage: redisctl cloud acl <COMMAND>
@@ -15,5 +15,4 @@ Commands:
1515
1616
Options:
1717
-h, --help Print help
18-
```
19-
18+
```text

docs/cli-reference/cloud/api-key.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Cloud API Key Commands
22

3-
```
3+
```text
44
API Keys management
55
66
Usage: redisctl cloud api-key <COMMAND>
@@ -18,5 +18,4 @@ Commands:
1818
1919
Options:
2020
-h, --help Print help
21-
```
22-
21+
```text

0 commit comments

Comments
 (0)