danger / swift

⚠️ Stop saying "you forgot to …" in code review
https://danger.systems/swift/
MIT License
1.04k stars 136 forks source link

Split Dangerfile.swift into multiple files #499

Closed coonsama closed 2 years ago

coonsama commented 2 years ago

is it possible to create multiple dangerfiles (or import scripts from another source files into dangerfile) without using plugins? I have too many tests in my dangerfile and looking for a way to split them. How can this be done without a project/workspace? Or is there any way to use project/workspace instead of single dangerfile?

417-72KI commented 2 years ago

You can use // fileImport: filepath to import Swift files and extract variables or functions. e.g. https://github.com/danger/swift/blob/master/Dangerfile.swift#L6

coonsama commented 2 years ago

This is exactly what I was looking for, thank you!