better format

motivation: adjust format to xcode format

changes:
* update .swiftformat no-indent setting and run formatter
* update test generation script to match correct format
This commit is contained in:
tomer doron 2019-12-17 11:02:01 -08:00 committed by Konrad `ktoso` Malawski
parent 49431459f9
commit 998de4b2cf
5 changed files with 13 additions and 12 deletions

2
.gitignore vendored
View File

@ -5,4 +5,4 @@
.xcode
.SourceKitten
*.orig
.swiftpm
.swiftpm

View File

@ -8,5 +8,6 @@
--patternlet inline
--stripunusedargs unnamed-only
--comments ignore
--ifdef no-indent
# rules

View File

@ -27,9 +27,9 @@
//===----------------------------------------------------------------------===//
#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS)
import Darwin
import Darwin
#else
import Glibc
import Glibc
#endif
/// A threading lock based on `libpthread` instead of `libdispatch`.

View File

@ -23,10 +23,10 @@ import XCTest
///
#if os(Linux) || os(FreeBSD)
@testable import MetricsTests
@testable import MetricsTests
XCTMain([
testCase(MetricsExtensionsTests.allTests),
testCase(MetricsTests.allTests),
])
XCTMain([
testCase(MetricsExtensionsTests.allTests),
testCase(MetricsTests.allTests),
])
#endif

View File

@ -96,10 +96,10 @@ def createLinuxMain(testsDirectory, allTestSubDirectories, files)
file.write "#if os(Linux) || os(FreeBSD)\n"
for testSubDirectory in allTestSubDirectories.sort { |x, y| x <=> y }
file.write ' @testable import ' + testSubDirectory + "\n"
file.write '@testable import ' + testSubDirectory + "\n"
end
file.write "\n"
file.write " XCTMain([\n"
file.write "XCTMain([\n"
testCases = []
for classes in files
@ -109,9 +109,9 @@ def createLinuxMain(testsDirectory, allTestSubDirectories, files)
end
for testCase in testCases.sort { |x, y| x <=> y }
file.write ' testCase(' + testCase + ".allTests),\n"
file.write ' testCase(' + testCase + ".allTests),\n"
end
file.write " ])\n"
file.write "])\n"
file.write "#endif\n"
end
end