Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pre-commit hook failed (add --no-verify to skip) #57

Open
suddenly1990 opened this issue Jul 4, 2022 · 0 comments
Open

pre-commit hook failed (add --no-verify to skip) #57

suddenly1990 opened this issue Jul 4, 2022 · 0 comments

Comments

@suddenly1990
Copy link

suddenly1990 commented Jul 4, 2022

when I create a project,and I add package.swift for project.

here is package.swift code:

`

import PackageDescription
let package = Package(
name: "LearningGitHook",
dependencies: [
.package(url: "https://github.com/shibapm/Komondor.git", from: "1.0.0")
],
targets: [
.target(name: "LearningGitHook", dependencies: [], path: "LearningGitHook"),
]
)
#if canImport(PackageConfig)
import PackageConfig
let config = PackageConfiguration([
"komondor": [
"pre-commit": [
"swift test",
"swift run swiftFormat .",
"swift run swiftlint autocorrect --path LearningGitHook/",
"git add ."
],
"pre-push": [
"swift test",
"swift run danger-swift local",
"swift run swiftlint"
]
],
]).write()
#end

`

when I commite code I get this error:

[Komondor] > pre-commit swift test
error: fatalError
[1/1] Planning build
[1/3] Compiling LearningGitHook AppDelegate.swift
/Users/daibaisheng/Desktop/LearningGitHook/LearningGitHook/AppDelegate.swift:8:8: error: no such module 'UIKit'
import UIKit
^
[2/3] Compiling LearningGitHook SceneDelegate.swift
/Users/daibaisheng/Desktop/LearningGitHook/LearningGitHook/AppDelegate.swift:8:8: error: no such module 'UIKit'
import UIKit
^
[3/3] Compiling LearningGitHook ViewController.swift
/Users/daibaisheng/Desktop/LearningGitHook/LearningGitHook/AppDelegate.swift:8:8: error: no such module 'UIKit'
import UIKit
^
[Komondor] > pre-commit hook failed (add --no-verify to skip)

what reason for this error,and what should I do?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant