Skip to content

Add per-tool ignoreArchCheck field to Tool#37

Merged
albertodebortoli merged 1 commit intomainfrom
per-tool-ignore-arch-check
Mar 11, 2026
Merged

Add per-tool ignoreArchCheck field to Tool#37
albertodebortoli merged 1 commit intomainfrom
per-tool-ignore-arch-check

Conversation

@albertodebortoli
Copy link
Member

Pull Request Title

Add per-tool ignoreArchCheck field to Tool

Description

  • Adds an optional ignoreArchCheck: Bool? property to Tool, allowing each tool in the Lucafile to override the global --ignore-arch-check CLI flag.
  • Precedence: per-tool true always skips arch validation; per-tool false always runs it; nil (field absent from YAML) falls back to the CLI flag.
  • No breaking changes to the YAML format — the field is optional and existing Lucafiles continue to work unchanged.

Type of Change

  • Feature

How Has This Been Tested?

  • Added / updated unit tests
  • Manually tested locally (describe)
  • Tested on macOS (arch: arm64)

Four new installer tests cover all precedence scenarios:

  • test_install_perToolIgnoreArchCheck_true_overridesGlobalFalse — per-tool true beats global false
  • test_install_perToolIgnoreArchCheck_false_overridesGlobalTrue — per-tool false beats global true
  • test_install_perToolIgnoreArchCheck_nil_fallsBackToGlobal_skipsnil + global true → no throw
  • test_install_perToolIgnoreArchCheck_nil_fallsBackToGlobal_validatesnil + global false → throws
swift build   # ✅ clean
swift test    # ✅ 164 tests passed

Checklist

  • Swift code builds locally (swift build)
  • Tests pass locally (swift test)
  • Code style / formatting respected
  • Documentation updated (README / comments)

Breaking Changes?

  • No

Additional Notes

Three new fixture files were added under Tests/Fixtures/Lucafiles/ for the per-tool tests. No Package.swift changes needed — the Fixtures directory is already registered as a resource.

Allows each tool in the Lucafile to override the global
--ignore-arch-check CLI flag via an `ignoreArchCheck: Bool?` field.
Precedence: per-tool true/false beats the CLI flag; nil falls back to it.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@albertodebortoli albertodebortoli added the feature New feature label Mar 11, 2026
@albertodebortoli albertodebortoli added this to the 0.8.0 milestone Mar 11, 2026
@albertodebortoli albertodebortoli merged commit 67ed032 into main Mar 11, 2026
2 checks passed
@albertodebortoli albertodebortoli deleted the per-tool-ignore-arch-check branch March 11, 2026 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant