Skip to content

Add safedi-init command plugin to scaffold configuration#200

Closed
dfed wants to merge 1 commit intomainfrom
dfed--safedi-init
Closed

Add safedi-init command plugin to scaffold configuration#200
dfed wants to merge 1 commit intomainfrom
dfed--safedi-init

Conversation

@dfed
Copy link
Copy Markdown
Owner

@dfed dfed commented Mar 29, 2026

Summary

  • Adds a SafeDIConfigurationInit command plugin with verb safedi-init that scaffolds a SafeDIConfiguration.swift file with default values in a target's source directory
  • Supports both SPM (CommandPlugin) and Xcode (XcodeCommandPlugin) projects
  • Errors with a clear message if the file already exists
  • Updates README with usage instructions

Usage

swift package --allow-writing-to-package-directory safedi-init --target YourRootTarget

Test plan

  • All 364 existing tests pass
  • Manual test: safedi-init creates correct file in Examples/Example Package Integration
  • Manual test: running again errors with "already exists" message
  • Lint passes

🤖 Generated with Claude Code

Adds a `SafeDIConfigurationInit` command plugin that creates a
`SafeDIConfiguration.swift` file with default values in the specified
target's source directory. Errors if the file already exists.

Usage: swift package --allow-writing-to-package-directory safedi-init --target YourTarget

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@dfed dfed closed this Mar 29, 2026
@dfed dfed deleted the dfed--safedi-init branch March 29, 2026 17:29
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.91%. Comparing base (f57c521) to head (ea63453).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #200   +/-   ##
=======================================
  Coverage   99.91%   99.91%           
=======================================
  Files          36       36           
  Lines        3470     3470           
=======================================
  Hits         3467     3467           
  Misses          3        3           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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