Skip to content

Commit

Permalink
make it code from docc folder
Browse files Browse the repository at this point in the history
  • Loading branch information
mackoj committed May 14, 2024
1 parent 2eecbad commit b9ec120
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Sources/PackageGeneratorCLI/cli.swift
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ struct PackageGeneratorCLI: AsyncParsableCommand {
}

func getImportsFromFile(_ file: File) -> [String] {
if file.extension != "swift" { return [] }
guard file.extension == "swift" else { return [] }
guard !file.url.path.contains("docc") else { return [] }

do {
let source = try String(contentsOf: file.url, encoding: .utf8)
let sourceFile = Parser.parse(source: source)
Expand Down

0 comments on commit b9ec120

Please sign in to comment.