Skip to content

chore: add presubmit workflow and pre-commit quality checks#12

Merged
galz10 merged 13 commits intomainfrom
chore/presubmit-precommit-quality
Mar 27, 2026
Merged

chore: add presubmit workflow and pre-commit quality checks#12
galz10 merged 13 commits intomainfrom
chore/presubmit-precommit-quality

Conversation

@galz10
Copy link
Copy Markdown
Owner

@galz10 galz10 commented Mar 25, 2026

Summary

Introduce a unified presubmit and pre-commit quality flow for IDX0, including local scripts, repo-managed git hooks, deterministic lint/docs configs, and a new multi-job GitHub Actions presubmit workflow.

Details

  • Added scripts/presubmit.sh with lint|docs|test|fast subcommands.
  • Added scripts/install-hooks.sh plus repo hook path support via .githooks/pre-commit.
  • Added deterministic config files:
    • .swiftformat
    • .swiftlint.yml
    • .markdownlint.json
    • .lychee.toml
  • Added .github/workflows/presubmit.yml with:
    • lint-docs (SwiftFormat, SwiftLint, markdown lint, link checks)
    • tests (setup + full xcodebuild tests)
    • maintainability (phase-1 report-only via continue-on-error: true)
  • Updated contributor-facing docs and PR template to reflect the new quality flow.

Related Issues

N/A

How to Validate

  1. Verify script shape and workflow syntax:
    • bash -n scripts/presubmit.sh scripts/install-hooks.sh .githooks/pre-commit
    • ruby -e 'require "yaml"; YAML.load_file(".github/workflows/presubmit.yml")'
  2. Install hooks and verify hook path setup:
    • ./scripts/install-hooks.sh
    • Expected: prints core.hooksPath set to .githooks.
  3. Verify presubmit help:
    • ./scripts/presubmit.sh --help
  4. Run app tests:
    • xcodebuild -project idx0.xcodeproj -scheme idx0 -destination 'platform=macOS' test
    • Current result in this environment: fails on pre-existing SessionServiceTests assertions (testNiriColumnResizePersistsPreferredWidths, testNiriDefaultTileSizesApplyOnlyToNewTiles, testNiriItemResizePersistsPreferredHeights).
  5. Optional full local presubmit after installing tools:
    • brew install swiftformat swiftlint lychee
    • npm install -g markdownlint-cli
    • ./scripts/presubmit.sh fast
    • ./scripts/presubmit.sh lint
    • ./scripts/presubmit.sh docs

Pre-Merge Checklist

  • lint-docs check is green
  • tests check is green
  • maintainability result reviewed (phase 1 report-only)
  • Added/updated tests (if needed)
  • Updated relevant documentation and README (if needed)
  • Noted breaking changes (if any)
  • Tested on macOS

@galz10 galz10 force-pushed the chore/presubmit-precommit-quality branch from ee01a06 to 0baacad Compare March 27, 2026 03:58
@galz10 galz10 merged commit 98114a9 into main Mar 27, 2026
3 checks passed
@galz10 galz10 deleted the chore/presubmit-precommit-quality branch March 28, 2026 02:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant