|
|
@ -7,6 +7,7 @@ if (danger.github) { |
|
|
|
warnClosureStronglyCapturesSelf() |
|
|
|
warnClosureStronglyCapturesSelf() |
|
|
|
failUsingNSLocalizedStringWithoutR() |
|
|
|
failUsingNSLocalizedStringWithoutR() |
|
|
|
failIfRemoveAnyRealmSchemaMigrationBlock() |
|
|
|
failIfRemoveAnyRealmSchemaMigrationBlock() |
|
|
|
|
|
|
|
failIfUseDecimalExactlyInit() |
|
|
|
checkForSpacesInOtherwiseEmptyLines() |
|
|
|
checkForSpacesInOtherwiseEmptyLines() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -54,6 +55,17 @@ function failIfRemoveAnyRealmSchemaMigrationBlock() { |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//Can't use Decimal(exactly: aBigUint). It compiles but crashes at runtime
|
|
|
|
|
|
|
|
function failIfUseDecimalExactlyInit() { |
|
|
|
|
|
|
|
modifiedSwiftFiles().forEach(each => { |
|
|
|
|
|
|
|
danger.git.diffForFile(each).then(diff => { |
|
|
|
|
|
|
|
if (diff.added.includes("Decimal(exactly:")) { |
|
|
|
|
|
|
|
fail(each + ": Must not use Decimal(exactly:), especially on BigUInt. Use Decimal(string: aBigUint.description) instead") |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function checkForSpacesInOtherwiseEmptyLines() { |
|
|
|
function checkForSpacesInOtherwiseEmptyLines() { |
|
|
|
modifiedSwiftFiles().forEach(each => { |
|
|
|
modifiedSwiftFiles().forEach(each => { |
|
|
|
danger.git.diffForFile(each).then(diff => { |
|
|
|
danger.git.diffForFile(each).then(diff => { |
|
|
|