-
Notifications
You must be signed in to change notification settings - Fork 18
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
Feature/000001 swiftlint run script #20
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
ce92fd5
add swiftlint pods support and run script and lint.swift file
Harryyan 3081aa9
fix path issue
Harryyan 4773b42
remove space
Harryyan 15e371c
recover CI script location to avoid config error
Harryyan 91b4402
add workspace support
Harryyan 16152f5
modify xcode build command
Harryyan 5ff3496
add directory straucture check
Harryyan 5661a2a
remove podspec fot testing
Harryyan 1f72dcf
add spec back
Harryyan d43106a
change ymal file
Harryyan aa7e1ff
modify name
Harryyan 725bdea
adjust name
Harryyan 0e26bc3
change repo url
Harryyan bfdd49c
remove swiftlint
Harryyan 29dc0d7
add config params
Harryyan 280c599
Merge branch 'develop' into feature/000001_Swiftlint_RunScript
Harryyan 8a62d72
add unit test target and modify yml file for linting
Harryyan 261b85f
update lint version
Harryyan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
8 changes: 8 additions & 0 deletions
8
.swiftpm/xcode/package.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>IDEDidComputeMac32BitWarning</key> | ||
<true/> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/usr/bin/env xcrun --sdk macosx swift | ||
|
||
import Foundation | ||
|
||
func run(targetPath: String) { | ||
let relativePath = CommandLine.arguments[0] as NSString | ||
print(relativePath) | ||
let configFilePath = relativePath.deletingLastPathComponent + "/../configs/.swiftlint.yml" | ||
let configFileUrl = URL(fileURLWithPath: configFilePath) | ||
let configPath = configFileUrl.path | ||
let launchPath = relativePath.deletingLastPathComponent.components(separatedBy: "/..").first! + "/../Pods/SwiftLint/swiftlint" | ||
|
||
let process = Process() | ||
process.launchPath = launchPath | ||
process.arguments = ["lint", "--config", configPath, "--path", targetPath] | ||
process.launch() | ||
process.waitUntilExit() | ||
|
||
let status = process.terminationStatus | ||
exit(status) | ||
} | ||
|
||
run(targetPath: CommandLine.arguments[1]) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ClaretCacheDemo换为通配符:
${PROJECT_NAME}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
会在下一个pr中提交