Skip to content

Commit

Permalink
Fix setting FilePath property from String
Browse files Browse the repository at this point in the history
  • Loading branch information
ileitch committed Aug 23, 2024
1 parent 8c020bb commit cffe42a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Sources/Shared/Configuration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,8 @@ protocol AbstractSetting {
private let filePathSetter: (Any) -> FilePath? = { value in
if let value = value as? FilePath {
return value
} else if let value = value as? String {
return FilePath(value)
}

return nil
Expand Down
2 changes: 1 addition & 1 deletion Sources/SyntaxAnalysis/ImportSyntaxVisitor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public final class ImportSyntaxVisitor: PeripherySyntaxVisitor {
let module = parts.first ?? ""
let attributes = node.attributes.compactMap {
if case let .attribute(attr) = $0 {
attr.attributeName.trimmedDescription
attr.attributeName.trimmedDescription
} else {
nil
}
Expand Down

0 comments on commit cffe42a

Please sign in to comment.