SwiftLint icon indicating copy to clipboard operation
SwiftLint copied to clipboard

is it possible that swiftlint only check class name ?

Open fanthus opened this issue 3 years ago • 2 comments

I searched a lot, but I can't find way to make swiftlint only check class name.

the only related rule I found is 'type_name', but it checks more than class name.

for example below, I just want to check mycell class name, and left typealias as it be, so is this possible?

typealias  cell = UITableViewCell 
class mycell {
   var value:Int?
}

fanthus avatar Jun 29 '22 08:06 fanthus

There is no specific rule to check class names only. However, you can configure the type_name rule by adding a set of excluded types to the .swiftlint.yml properties file. That way, you can ignore types that you do not want to have checked. If there aren't so many, that might be a possible workaround.

SimplyDanny avatar Jun 29 '22 19:06 SimplyDanny

thanks. I will give it a try.

fanthus avatar Jul 04 '22 07:07 fanthus