Lint

Run SwiftLint and swift-format checks on MiaoYan. There is no auto-fix hook; run `swiftlint --fix` or `swift-format format --in-place` manually when fixes are needed.

tw93 d682846 1.0 KB Updated

File contents

Lint Skill

Use this skill to check or fix code style in MiaoYan.

SwiftLint

# Check (report only)
swiftlint lint

# Strict mode (treat warnings as errors)
swiftlint lint --strict

# Auto-fix safe violations
swiftlint --fix

# Check specific file
swiftlint lint --path Controllers/ViewController.swift

Config: .swiftlint.yml at project root.

swift-format

# Check formatting (no changes)
swift-format lint --recursive . --strict

# Apply formatting
swift-format format --recursive --in-place .

Config: .swift-format at project root (line length: 240).

Run Both

swiftlint lint --strict && swift-format lint --recursive . --strict

Safety Rules

  1. ALWAYS run lint check before proposing a commit
  2. NEVER auto-apply --fix or --in-place without user confirmation

tw93/miaoyan/tree/main/.agents/skills/lint commit d6828463ef

Frequently asked questions

npx skillmds@latest add tw93/lint