Skip to content

Commit

Permalink
ktlint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
frett committed Nov 30, 2023
1 parent 65babeb commit be89ea6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@ import org.cru.godtools.shared.tool.parser.xml.XmlPullParserFactory
@KustomExport
open class ManifestParser(private val parserFactory: XmlPullParserFactory, val defaultConfig: ParserConfig) {
suspend fun parseManifest(fileName: String) = parseManifest(fileName, defaultConfig)
suspend fun parseManifest(
fileName: String,
config: ParserConfig,
): ParserResult = withContext(config.parserDispatcher) {
suspend fun parseManifest(fileName: String, config: ParserConfig) = withContext(config.parserDispatcher) {
try {
val manifest =
Manifest.parse(fileName, config) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,7 @@ internal inline val Parent.contentTips get() = content.flatMap { it.tips }
* @param block Custom parsing logic, if the block processes the current tag,
* it should advance the parser to the END_TAG event.
*/
internal inline fun Parent.parseContent(
parser: XmlPullParser,
block: () -> Unit = { }
) = buildList {
internal inline fun Parent.parseContent(parser: XmlPullParser, block: () -> Unit = { }) = buildList {
parser.require(XmlPullParser.START_TAG, null, null)
parser.parseChildren {
// execute any custom parsing logic from the call-site
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@ import org.cru.godtools.shared.tool.parser.xml.XmlPullParserFactory
class IosManifestParser(parserFactory: XmlPullParserFactory, defaultConfig: ParserConfig) :
ManifestParser(parserFactory, defaultConfig) {
fun parseManifestBlocking(fileName: String) = parseManifestBlocking(fileName, defaultConfig)
fun parseManifestBlocking(fileName: String, config: ParserConfig) =
runBlocking { parseManifest(fileName, config) }
fun parseManifestBlocking(fileName: String, config: ParserConfig) = runBlocking { parseManifest(fileName, config) }
}

0 comments on commit be89ea6

Please sign in to comment.