Skip to content

Commit 8053a1e

Browse files
feat(makefile): add fix target for in-place formatting
Add `make fix` that delegates to container `_fix` target to apply formatting fixes in-place. Update docs to include the new target. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 94befdc commit 8053a1e

3 files changed

Lines changed: 7 additions & 2 deletions

File tree

DEVELOPMENT.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ Every DevRail-managed repo exposes these public targets:
4848
| `make help` | List all targets with descriptions (default target) |
4949
| `make lint` | Run all linters for declared languages |
5050
| `make format` | Run all formatters for declared languages |
51+
| `make fix` | Auto-fix formatting issues in-place |
5152
| `make test` | Run all test suites for declared languages |
5253
| `make security` | Run security scanners (bandit, tfsec, checkov, etc.) |
5354
| `make scan` | Run universal scanners (trivy, gitleaks) |

Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ HAS_JAVASCRIPT := $(filter javascript,$(LANGUAGES))
4444
# ---------------------------------------------------------------------------
4545
# .PHONY declarations
4646
# ---------------------------------------------------------------------------
47-
.PHONY: help lint format test security scan docs changelog check install-hooks init
48-
.PHONY: _lint _format _test _security _scan _docs _changelog _check _check-config _init
47+
.PHONY: help lint format fix test security scan docs changelog check install-hooks init
48+
.PHONY: _lint _format _fix _test _security _scan _docs _changelog _check _check-config _init
4949

5050
# ===========================================================================
5151
# Public targets (run on host, delegate to Docker container)
@@ -66,6 +66,9 @@ check: ## Run all checks (lint, format, test, security, scan, docs)
6666
docs: ## Generate documentation
6767
$(DOCKER_RUN) make _docs
6868

69+
fix: ## Auto-fix formatting issues in-place
70+
$(DOCKER_RUN) make _fix
71+
6972
format: ## Run all formatters
7073
$(DOCKER_RUN) make _format
7174

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ The Makefile is the universal execution interface. Every target produces consist
2727
| `make help` | Show available targets (default) |
2828
| `make lint` | Run all linters for declared languages |
2929
| `make format` | Run all formatters for declared languages |
30+
| `make fix` | Auto-fix formatting issues in-place |
3031
| `make test` | Run project test suite |
3132
| `make security` | Run language-specific security scanners |
3233
| `make scan` | Run universal scanning (trivy, gitleaks) |

0 commit comments

Comments
 (0)