Skip to content

Commit

Permalink
update: lint tools and format correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
mflknr committed Jun 17, 2024
1 parent 0c06b30 commit 8d36d25
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .mise.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[tools]
swiftlint = "0.54.0"
swiftformat = "0.53.8"
swiftlint = "0.55.1"
swiftformat = "0.54.0"
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
### Changed

- Documentation syntax to DocC
- `SwiftLint` to `0.55.1`
- `SwiftFormat` to `0.54.0`

### Removed

Expand Down
2 changes: 1 addition & 1 deletion Sources/Helper/VersionCompareResult.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//

/// The severity of an update between versions.
///
///
/// - Note: A difference between ``BuildMetaData`` of versions are as `SemVer` states explicitly ignored.
public enum VersionCompareResult {
/// A `MAJOR`update
Expand Down
6 changes: 3 additions & 3 deletions Sources/Version.swift
Original file line number Diff line number Diff line change
Expand Up @@ -168,12 +168,12 @@ public struct Version: Sendable, SemanticVersionComparable {
prerelease = String(prereleaseSubstring)
.split(separator: ".")
.map(String.init)
.compactMap {
if let asInt = Int($0) {
.compactMap { identifierString in
if let asInt = Int(identifierString) {
return PrereleaseIdentifier(integerLiteral: asInt)
}

return PrereleaseIdentifier($0)
return PrereleaseIdentifier(identifierString)
}
// if a pre-release identifier element is initialized as .unkown, we can savely assume that the given
// string is not a valid `SemVer` version string.
Expand Down

0 comments on commit 8d36d25

Please sign in to comment.