Skip to content

Commit

Permalink
chore: swiftlint tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
drmohundro committed Aug 13, 2024
1 parent 570f963 commit f3b58ca
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
run: |
set -o pipefail
xcodebuild $ACTION $WORKSPACE -scheme "SWXMLHash OSX" | xcpretty
xcodebuild $ACTION $WORKSPACE -scheme "SWXMLHash iOS" -sdk iphonesimulator -destination "OS=16.2,name=iPhone 13" | xcpretty
xcodebuild $ACTION $WORKSPACE -scheme "SWXMLHash iOS" -sdk iphonesimulator -destination "OS=17.2,name=iPhone 15" | xcpretty
xcodebuild $ACTION $WORKSPACE -scheme "SWXMLHash tvOS" -sdk appletvsimulator -destination "name=Apple TV" | xcpretty
xcodebuild build $WORKSPACE -scheme "SWXMLHash watchOS" -sdk watchsimulator | xcpretty
bash <(curl -s https://codecov.io/bash) -t ${{secrets.CODECOV_TOKEN}}
Expand Down
7 changes: 3 additions & 4 deletions Source/FullXMLParser.swift
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,10 @@ class FullXMLParser: NSObject, SimpleXmlParser, XMLParserDelegate {
}

func parser(_ parser: XMLParser, foundCDATA CDATABlock: Data) {
if let cdataText = String(data: CDATABlock, encoding: String.Encoding.utf8) {
let current = parentStack.top()
let cdataText = String(decoding: CDATABlock, as: UTF8.self)
let current = parentStack.top()

current.addText(cdataText)
}
current.addText(cdataText)
}

func parser(_ parser: XMLParser, parseErrorOccurred parseError: Error) {
Expand Down
7 changes: 3 additions & 4 deletions Source/LazyXMLParser.swift
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,10 @@ class LazyXMLParser: NSObject, SimpleXmlParser, XMLParserDelegate {
return
}

if let cdataText = String(data: CDATABlock, encoding: String.Encoding.utf8) {
let current = parentStack.top()
let cdataText = String(decoding: CDATABlock, as: UTF8.self)
let current = parentStack.top()

current.addText(cdataText)
}
current.addText(cdataText)
}

func parser(_ parser: XMLParser,
Expand Down
5 changes: 0 additions & 5 deletions Source/XMLAttribute.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@ import Foundation
public struct XMLAttribute {
public let name: String
public let text: String

init(name: String, text: String) {
self.name = name
self.text = text
}
}

extension XMLAttribute: CustomStringConvertible {
Expand Down

0 comments on commit f3b58ca

Please sign in to comment.