Skip to content

Commit 35df0e7

Browse files
authored
Update danger (#413)
1 parent 3fc7447 commit 35df0e7

File tree

1 file changed

+2
-50
lines changed

1 file changed

+2
-50
lines changed

Dangerfile

+2-50
Original file line numberDiff line numberDiff line change
@@ -9,54 +9,6 @@ warn("PR is classed as Work in Progress") if github.pr_title.include? "WIP"
99
# Warn when there is a big PR
1010
warn("Big PR, try to keep changes smaller if you can") if git.lines_of_code > 500
1111

12-
# Added (or removed) library files need to be added (or removed) from the
13-
# Carthage Xcode project to avoid breaking things for our Carthage users.
14-
added_swift_library_files = !(git.added_files.grep(/Sources.*\.swift/).empty?)
15-
deleted_swift_library_files = !(git.deleted_files.grep(/Sources.*\.swift/).empty?)
16-
modified_carthage_xcode_project = !(git.modified_files.grep(/SwiftQueue\.xcodeproj/).empty?)
17-
if (added_swift_library_files || deleted_swift_library_files) && !modified_carthage_xcode_project
18-
fail("Added or removed library files require the Carthage Xcode project to be updated.")
19-
end
20-
21-
# Check for dependencies update
22-
podspec_updated = !git.modified_files.grep(/SwiftQueue.podspec/).empty?
23-
24-
cartfile_updated = !git.modified_files.grep(/Cartfile/).empty?
25-
cartfile_resolved_updated = !git.modified_files.grep(/Cartfile.resolved/).empty?
26-
27-
spm_updated = !git.modified_files.grep(/Package.swift/).empty?
28-
spm_resolved_updated = !git.modified_files.grep(/Package.resolved/).empty?
29-
30-
# Warn if Cartfile is updated but not Cartfile.resolved
31-
if cartfile_updated && !cartfile_resolved_updated
32-
warn("The `Cartfile` has been updated but not the `Cartfile.resolved`. Did you forgot to run `carthage update` ?")
33-
end
34-
35-
# Warn if Package.swift is updated but not Package.resolved
36-
if spm_updated && !spm_resolved_updated
37-
warn("The `Package.swift` has been updated but not the `Package.resolved`. Did you forgot to run `swift package update` ?")
38-
end
39-
40-
# Warn if Package.resolved and cartfile.resolved are not updated at the same time
41-
if (cartfile_resolved_updated && !spm_resolved_updated) || (spm_resolved_updated && !cartfile_resolved_updated)
42-
warn("The `Package.resolved` or `cartfile.resolved` was updated, but not both. Did you forgot to run `carthage update` or `swift package update`?")
43-
end
44-
45-
# Warn if podpec has been update but not Cartfile or Package.swift
46-
if podspec_updated && (!cartfile_updated || !spm_updated)
47-
warn("The `podspec` was updated, but there were no changes in either the `Cartfile` nor `Package.swift`. Did you forget updating `Cartfile` or `Package.swift`?")
48-
end
49-
50-
# Warn if cartfile has been update but not podspec or Package.swift
51-
if cartfile_updated && (!podspec_updated || !spm_updated)
52-
warn("The `Cartfile` was updated, but there were no changes in either the `podspec` nor `Package.swift`. Did you forget updating `podspec` or `Package.swift`?")
53-
end
54-
55-
# Warn if Package.swift has been update but not podspec or Cartfile
56-
if spm_updated && (!podspec_updated || !cartfile_updated)
57-
warn("The `Package.swift` was updated, but there were no changes in either the `podspec` nor `Cartfile`. Did you forget updating `podspec` or `Cartfile`?")
58-
end
59-
6012
# Warn when library files has been updated but not tests.
6113
tests_updated = !git.modified_files.grep(/Tests/).empty?
6214
if has_app_changes && !tests_updated
@@ -68,5 +20,5 @@ swiftlint.lint_files
6820

6921
# Run prose
7022
prose.ignored_words = ["SPM", "CFBundleVersion", "JobInfo", "compactMap", "lastError", "args", "enum", "SwiftQueue", "JobBuilder", "SwiftQueueManager", "onError", "carthage", "Rechability", "Cleanup", "TimeInterval", "SingleInstance", "Swiftlint", "travis", "params", "JobCompletion", "inSecond", "onRetry", "onRemove", "UniqueUUID", "OperationQueue", "SwiftQueueJob", "uuid", "DEPS", "serializer", "deserialization", "Deserialize"]
71-
# prose.ignore_numbers = true
72-
# prose.check_spelling
23+
prose.ignore_numbers = true
24+
prose.check_spelling

0 commit comments

Comments
 (0)