@@ -49,40 +49,40 @@ extension SwiftLintDev.Rules {
4949 . appendingPathComponent ( " SwiftLintBuiltInRules " , isDirectory: true )
5050 . appendingPathComponent ( " Rules " , isDirectory: true )
5151 let ruleLocation = ruleDirectory. appendingPathComponent ( kind. rawValue. capitalized, isDirectory: true )
52- guard FileManager . default. fileExists ( atPath: ruleLocation. path ) else {
52+ guard FileManager . default. fileExists ( atPath: ruleLocation. filepath ) else {
5353 throw ValidationError ( " Command must be run from the root of the SwiftLint repository. " )
5454 }
5555 print ( " Creating template(s) for new rule \" \( ruleName) \" identified by ' \( ruleId) ' ... " )
5656 let rulePath = ruleLocation. appendingPathComponent ( " \( name) Rule.swift " , isDirectory: false )
57- guard overwrite || !FileManager. default. fileExists ( atPath: rulePath. path ) else {
57+ guard overwrite || !FileManager. default. fileExists ( atPath: rulePath. filepath ) else {
5858 throw ValidationError ( " Rule file already exists at \( rulePath. relativeToCurrentDirectory) . " )
5959 }
60- try ruleTemplate. write ( toFile: rulePath. path , atomically: true , encoding: . utf8)
60+ try ruleTemplate. write ( toFile: rulePath. filepath , atomically: true , encoding: . utf8)
6161 print ( " Rule file created at \( rulePath. relativeToCurrentDirectory) . " )
6262 if config {
6363 let configPath = ruleDirectory
6464 . appendingPathComponent ( " RuleConfigurations " , isDirectory: true )
6565 . appendingPathComponent ( " \( name) Configuration.swift " , isDirectory: false )
66- guard overwrite || !FileManager. default. fileExists ( atPath: configPath. path ) else {
66+ guard overwrite || !FileManager. default. fileExists ( atPath: configPath. filepath ) else {
6767 throw ValidationError (
6868 " Configuration file already exists at \( configPath. relativeToCurrentDirectory) . "
6969 )
7070 }
71- try configTemplate. write ( toFile: configPath. path , atomically: true , encoding: . utf8)
71+ try configTemplate. write ( toFile: configPath. filepath , atomically: true , encoding: . utf8)
7272 print ( " Configuration file created at \( configPath. relativeToCurrentDirectory) . " )
7373 }
7474 if test {
7575 let testDirectory = rootDirectory
7676 . appendingPathComponent ( " Tests " , isDirectory: true )
7777 . appendingPathComponent ( " BuiltInRulesTests " , isDirectory: true )
7878 let testPath = testDirectory. appendingPathComponent ( " \( name) RuleTests.swift " , isDirectory: false )
79- guard FileManager . default. fileExists ( atPath: testDirectory. path ) else {
79+ guard FileManager . default. fileExists ( atPath: testDirectory. filepath ) else {
8080 throw ValidationError ( " Command must be run from the root of the SwiftLint repository. " )
8181 }
82- guard overwrite || !FileManager. default. fileExists ( atPath: testPath. path ) else {
82+ guard overwrite || !FileManager. default. fileExists ( atPath: testPath. filepath ) else {
8383 throw ValidationError ( " Test file already exists at \( testPath. relativeToCurrentDirectory) . " )
8484 }
85- try testTemplate. write ( toFile: testPath. path , atomically: true , encoding: . utf8)
85+ try testTemplate. write ( toFile: testPath. filepath , atomically: true , encoding: . utf8)
8686 print ( " Test file created at \( testPath. relativeToCurrentDirectory) . " )
8787 }
8888 if !skipRegistration {
0 commit comments