Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unit tests for swift-format CLI tool and for Plugins #611

Open
natikgadzhi opened this issue Sep 4, 2023 · 2 comments
Open

Unit tests for swift-format CLI tool and for Plugins #611

natikgadzhi opened this issue Sep 4, 2023 · 2 comments

Comments

@natikgadzhi
Copy link
Contributor

natikgadzhi commented Sep 4, 2023

Currently, swift-format test suite covers Rules and PrettyPrint. Several components are not covered:

  • generate-pipeline that builds RuleRegistry and friends
  • swift-format the CLI executable target, including Configuration, Frontend, and the whole argument-parser based thing.
  • Plugins.

Disclaimer: my understanding and knowledge are very high-level and basic still, I'm only diving in.

I think with some guidance, we could split these components up into smaller chunks, and each of those chunk-unit-test-issues could be a great good-first-issue for beginners.

UPD: Stumbled at this when I was looking to add tests for executable generate-pipeline target: https://forums.swift.org/t/argumentparser-and-xctest/34523

@BrianHenryIE
Copy link
Contributor

I introduced a test for the plugin in #608: PluginRunTests.swift. I expect there is some Gherkin style BDD library that could be used to write the test in a nicer way, but I've never used one in Swift and I don't know the policy on introducing third party libraries to the project (I notice all dependencies currently are Apple projects).

@ahoppen
Copy link
Contributor

ahoppen commented Apr 23, 2024

Tracked in Apple’s issue tracker as rdar://126948360

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

No branches or pull requests

3 participants