fixing-format-check

Diagnoses and fixes just format-check failures from swift-format and SwiftLint in Swift source code.

1|Updated Apr 5, 2026
One-click install
npx skills add https://github.com/moolah-rocks/moolah-native --skill fixing-format-check-moolah-rocks
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: fixing-format-check
Source: https://github.com/moolah-rocks/moolah-native/tree/main/.claude/skills/fixing-format-check
Command: npx skills add https://github.com/moolah-rocks/moolah-native --skill fixing-format-check-moolah-rocks

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When just format-check fails — locally, in a pre-commit hook, or in CI — it is tempting to silence the failure with a SwiftLint baseline, a // swiftlint:disable comment, or a threshold bump. This Skill enforces the project's rule that every violation is fixed in source code, and guides you through fixing swift-format and SwiftLint violations correctly. ## Core Features & Use Cases - Two-gate diagnosis: Separates mechanical swift-format layout failures (fixed with just format) from semantic swiftlint lint --strict violations that require real code changes. - Fix-in-source guidance: Maps common rules (force_unwrapping, file_length, cyclomatic_complexity, identifier_name, and more) to design-level fixes aligned with guides/CODE_GUIDE.md and Apple's API Design Guidelines. - Anti-laundering guardrails: Explicitly forbids baselines, threshold bumps, and unjustified disable comments, with red-flag checks before and after fixing. - Use Case: A PR's CI format-check job fails with three SwiftLint violations. Use this Skill to reproduce locally, fix each violation in source, run the @code-review agent on the changed files, and verify a clean just format-check before committing. ## Quick Start Ask the AI to fix the failing just format-check output by applying this skill and repairing each SwiftLint violation in source code.

Frequently Asked Questions about fixing-format-check

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix just format-check failures in a Swift project?▼

Run `just format-check` locally and capture the output, then split it into swift-format layout errors and SwiftLint violations. Fix layout with `just format`, and fix each SwiftLint violation in source code rather than disabling rules.

How to fix SwiftLint violations without disabling rules?▼

Read the rule rationale via `swiftlint rules <rule_id>` or the project's code guide, then apply the design-level fix: replace force unwraps with guard let, split long files along semantic seams, and extract named steps for long functions.

Can I use a SwiftLint baseline to silence existing violations?▼

No. This project forbids baselines, `--baseline` flags, and `swiftlint --write-baseline` entirely. Every violation under `swiftlint lint --strict` must be fixed in source, or escalated to the user if genuinely out of scope.

Why does splitting a file cause new SwiftLint violations?▼

Moving code can surface pre-existing violations that the old structure did not trip, such as a force unwrap landing in a file you now touch. Under strict mode these fail loudly and must be fixed in source as part of your change.

When is a swiftlint:disable comment acceptable?▼

Only with a real, documented justification for a violation that genuinely cannot be fixed without disproportionate scope. Even then, stop and ask the user first rather than inferring permission from prior conversations.