Variable name in auto-generated XCTestManifests.swift violates swiftlint

For unknown reason test manifest generator picks __allTests prefix for variable that collects all test cases to be executed. However names starting with underscore make swiftlint abort CI builds.

Any idea how can I fix this?

I moved this to the “Related Projects: SwiftLint” category. SwiftLint is distinct from the Swift project. That is why the two do not necessarily agree with one another about how things should be done. Low lines (_) are used by the Swift project to indicate things that should not be used directly (by anyone besides whoever created the symbol); the compiler needs to see it, but people shouldn’t. Tools often support this by hiding such symbols from autocomplete, etc.

SwiftLint’s configuration provides a way of excluding files, doesn’t it? That is probably a wise thing to do for any generated code.

2 Likes

Right after writing this post I realized I can configure swiftlint to skip manifests, problem solved. Anyway thanks for pointing out to this.

Terms of Service

Privacy Policy

Cookie Policy