periphery
periphery copied to clipboard
Scan raises an error in line 55 but file has only 38 lines
Hello!
I'm facing this issue with periphery, basically, in the analysis I see:
{
"modifiers": [],
"attributes": [],
"accessibility": "internal",
"ids": [
"s:1118NavigationColorBarV"
],
"name": "NavigationColorBar",
"hints": [
"unused"
],
"location": "*****/utils/ViewModifiers.swift:55:8",
"modules": [
"******"
],
"kind": "struct"
}
But... this is the file:
//
// ViewModifiers.swift
//
//
// Created by **** on 27/10/22.
//
import SwiftUI
#if canImport(UIKit)
extension View {
func hideKeyboard() {
UIApplication.shared.sendAction(#selector(UIResponder.resignFirstResponder), to: nil, from: nil, for: nil)
}
}
#endif
extension View {
func cornerRadius(_ radius: CGFloat, corners: UIRectCorner) -> some View {
clipShape( RoundedCorner(radius: radius, corners: corners) )
}
}
struct RoundedCorner: Shape {
var radius: CGFloat = .infinity
var corners: UIRectCorner = .allCorners
func path(in rect: CGRect) -> Path {
let path = UIBezierPath(
roundedRect: rect,
byRoundingCorners: corners,
cornerRadii: CGSize(width: radius, height: radius)
)
return Path(path.cgPath)
}
}