Once in Xcode, select the OneRoster
scheme and use Cmd-U
to run the tests.
Don't forget to add tests for your new features and fixes.
Please try to follow existing style for consistency.
Avoid using "Xcode style" indentation where possible. This can be difficult to recreate in other editors.
❌
func foo(bar: String,
baz: Int) {
...
}
Use normal indentation instead.
✅
func foo(
bar: String,
baz: Int
) {
...
}
When accessing member properties and methods, use explicit self
.
struct Foo {
var bar: Int
func baz() {
// ❌
print(bar)
// ✅
print(self.bar)
}
}
This makes it easier to tell whether a local variable is being used or not, especially when reading code without syntax highlighting.
This package follows SemVer. This means that any changes to the source code that can cause existing code to stop compiling must wait until the next major version to be included.
Code that is only additive and will not break any existing code can be included in the next minor release.
Add the following code to your bash profile to make cleaning SPM temporary files easy.
# Cleans out all temporary SPM files
_spm_clean() {
rm Package.resolved
rm -rf .build
rm -rf *.xcodeproj
rm -rf .swiftpm
rm -rf Packages
}
alias spm-clean='_spm_clean'
Once added, you can run spm-clean
.
spm-clean