Files
OpenCombine/Dangerfile.swift
T
Joe Spadafora d3888a3808 Implement Filter/TryFilter (#22)
* Adds filter and try filter implementations

* Implement Filter

* Remove @testable declaration

* Fix linting

* Updates tests and creates testing helper

* Fix allTests to include all tests

* Renames TestHelper to OperatorTestHelper and adds documentation

* Adds more test coverage

* Updates to use subclasses for filter / tryfilter

* Adds subscription test

* Fix subscriber demand to be lazy

* Fix CustomPublisherBase changes from master

* Fix iOS availability on test helper

* Updates availability for test functions

* Simplify Filter implementation, add more tests

* Ensure test suite consistency on Darwin and Linux

* Add missing tests to XCTestManifests.swift
2019-08-02 00:20:35 +03:00

40 lines
884 B
Swift

import Danger
let danger = Danger()
do {
let addedTestFiles = danger
.git
.createdFiles
.filter { $0.hasSuffix("Tests.swift") }
let modifiedXCTestManifests = danger
.git
.modifiedFiles
.contains { $0.hasSuffix("XCTestManifests.swift") }
if !addedTestFiles.isEmpty && !modifiedXCTestManifests {
let addedTestsClasses = addedTestFiles.map {
"- `\($0.split(separator: "/").last!.dropLast(6))`\n"
}.joined()
fail("""
You've added the following test classes:
\(addedTestsClasses)
but forgot to modify `XCTestManifests.swift`.
""")
}
}
SwiftLint.lint(inline: true,
configFile: ".swiftlint.yml",
strict: true,
lintAllFiles: true)
if danger.warnings.isEmpty, danger.fails.isEmpty {
markdown("LGTM")
}