Skip to content

Commit 43bae43

Browse files
CHORE(makefile): add comprehensive file-specific linting support (#660)
* feat(makefile): add comprehensive file-specific linting support - Add support for linting specific files and directories via arguments - Implement smart file type detection (Python, YAML, JSON, Markdown, TOML) - Add convenience targets: lint-quick, lint-fix, lint-smart - Add git integration: lint-changed, lint-staged, pre-commit hooks - Fix TARGET variable parsing for multiple directories - Remove duplicate lint-changed target definitions - Add dummy targets to prevent 'No rule to make target' errors Usage: - make lint filename.py (single file) - make lint dirname/ (directory) - make lint-quick filename.py (fast linters only) - make lint-changed (git changed files) Resolves: 'mcpgateway tests is not a Python file or directory' error Fixes: Duplicate target override warnings Implements: All requirements from file-specific linting chore * Fix markdownlint Signed-off-by: Mihai Criveti <[email protected]> * Fix markdownlint Signed-off-by: Mihai Criveti <[email protected]> --------- Signed-off-by: Mihai Criveti <[email protected]> Co-authored-by: Mihai Criveti <[email protected]>
1 parent e6c099b commit 43bae43

File tree

3 files changed

+654
-39
lines changed

3 files changed

+654
-39
lines changed

.markdownlint-cli2.yaml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# .markdownlint-cli2.yaml
2+
# Configuration for markdownlint-cli2
3+
4+
# Ignore certain paths
5+
ignores:
6+
- "node_modules/**"
7+
- ".venv/**"
8+
- "venv/**"
9+
- "dist/**"
10+
- "build/**"
11+
- ".git/**"
12+
- "htmlcov/**"
13+
- "docs/coverage/**"
14+
- "site/**"
15+
- ".tox/**"
16+
- "*.min.md"
17+
18+
# markdownlint configuration
19+
config:
20+
# Enable all rules by default
21+
default: true
22+
23+
# MD003/heading-style - Heading style
24+
MD003:
25+
style: "atx" # Require ATX style (e.g., ## Heading)
26+
27+
# MD007/ul-indent - Unordered list indentation
28+
MD007:
29+
indent: 4 # Use 4 spaces for list indentation
30+
31+
# MD009/no-trailing-spaces - Trailing spaces
32+
MD009: true # Flag trailing spaces as errors (default behavior)
33+
34+
# MD010/no-hard-tabs - Hard tabs
35+
MD010: true # Flag hard tabs as errors (default behavior)
36+
37+
# MD013/line-length - Line length
38+
MD013: false # Disable line length rule completely
39+
40+
# Optional: Other commonly configured rules
41+
# MD024: false # Multiple headings with the same content
42+
# MD026: false # Trailing punctuation in heading
43+
# MD033: false # Inline HTML
44+
# MD041: false # First line in file should be a heading
45+
46+
# Show progress while linting
47+
showProgress: true
48+
49+
# Don't show banner (optional - set to true to suppress version info)
50+
# noBanner: false
51+
52+
# Fix errors automatically where possible (can be overridden with --fix CLI flag)
53+
# fix: false

.markdownlint.json

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)