You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I struggled with the raw diffs at first, even writing my own parsers, before I discovered a better way. I thought I'd share a good library that works perfectly with danger-kotlin: https://github.com/thombergs/diffparser
Usage example:
@file:Repository("https://jcenter.bintray.com")
@file:DependsOn("io.reflectoring.diffparser:diffparser:1.4")
danger(args) {
val diff = UnifiedDiffParser().parse(git.diff!!.byteInputStream())
}
From that object, it's trivial to get changed files, lines added, removed, the different chunks etc. It's a small library, so autocompletion should be all the docs you need, really.
The text was updated successfully, but these errors were encountered:
I struggled with the raw diffs at first, even writing my own parsers, before I discovered a better way. I thought I'd share a good library that works perfectly with
danger-kotlin
: https://github.com/thombergs/diffparserUsage example:
From that object, it's trivial to get changed files, lines added, removed, the different chunks etc. It's a small library, so autocompletion should be all the docs you need, really.
The text was updated successfully, but these errors were encountered: