Comments (3)
Diff at the time:
from checks.
Swiftlint output from Jenkins (correct line attribution): https://jenkins.awswift.ge.cx/job/awswift/job/swiftda/view/Pull%20Requests/job/PR-5/8/console
from checks.
JSON for comments: (from https://api.github.com/repos/awswift/swiftda/pulls/5/comments)
[
{
"_links": {
"html": {
"href": "https://github.com/awswift/swiftda/pull/5#discussion_r94203274"
},
"pull_request": {
"href": "https://api.github.com/repos/awswift/swiftda/pulls/5"
},
"self": {
"href": "https://api.github.com/repos/awswift/swiftda/pulls/comments/94203274"
}
},
"body": "Lines should not have trailing whitespace.",
"commit_id": "e2c4db15d7a066ba291a601284b640159e1828cd",
"created_at": "2016-12-30T05:11:59Z",
"diff_hunk": "@@ -27,36 +31,50 @@ struct ShellCommand {\n buildProcess.standardError = err\n err.fileHandleForReading.readabilityHandler = { handle in\n let str = String(data: handle.availableData, encoding: .utf8)!\n- errChunker.append(str)\n+ queue.async {\n+ errChunker.append(str)\n+ }\n }\n \n buildProcess.terminationHandler = { task in\n- if let line = outChunker.remainder() { stdout(line) }\n- if let line = errChunker.remainder() { stderr(line) }\n+ queue.async {\n+ if let line = outChunker.remainder() { stdout(line) }\n+ if let line = errChunker.remainder() { stderr(line) }\n \n- out.fileHandleForReading.readabilityHandler = nil\n- err.fileHandleForReading.readabilityHandler = nil\n+ out.fileHandleForReading.readabilityHandler = nil\n+ err.fileHandleForReading.readabilityHandler = nil\n+ sema.signal()\n+ }\n }\n \n buildProcess.launch()\n buildProcess.waitUntilExit()\n+ sema.wait()\n return Int(buildProcess.terminationStatus)\n }\n+ \n+ struct Redir: TextOutputStream {\n+ mutating func write(_ string: String) {\n+ FileHandle.standardError.write(string.data(using: .utf8)!)\n+ }\n+ }\n \n static func piped(command: String, label: String?) -> (Int, String, String) {",
"html_url": "https://github.com/awswift/swiftda/pull/5#discussion_r94203274",
"id": 94203274,
"original_commit_id": "e2c4db15d7a066ba291a601284b640159e1828cd",
"original_position": 55,
"path": "Sources/SwiftdaKit/ShellCommand.swift",
"position": 55,
"pull_request_review_id": 14734222,
"pull_request_url": "https://api.github.com/repos/awswift/swiftda/pulls/5",
"updated_at": "2016-12-30T05:11:59Z",
"url": "https://api.github.com/repos/awswift/swiftda/pulls/comments/94203274",
"user": {}
},
{
"_links": {
"html": {
"href": "https://github.com/awswift/swiftda/pull/5#discussion_r94203275"
},
"pull_request": {
"href": "https://api.github.com/repos/awswift/swiftda/pulls/5"
},
"self": {
"href": "https://api.github.com/repos/awswift/swiftda/pulls/comments/94203275"
}
},
"body": "Lines should not have trailing whitespace.",
"commit_id": "e2c4db15d7a066ba291a601284b640159e1828cd",
"created_at": "2016-12-30T05:12:01Z",
"diff_hunk": "@@ -27,36 +31,50 @@ struct ShellCommand {\n buildProcess.standardError = err\n err.fileHandleForReading.readabilityHandler = { handle in\n let str = String(data: handle.availableData, encoding: .utf8)!\n- errChunker.append(str)\n+ queue.async {\n+ errChunker.append(str)\n+ }\n }\n \n buildProcess.terminationHandler = { task in\n- if let line = outChunker.remainder() { stdout(line) }\n- if let line = errChunker.remainder() { stderr(line) }\n+ queue.async {\n+ if let line = outChunker.remainder() { stdout(line) }\n+ if let line = errChunker.remainder() { stderr(line) }\n \n- out.fileHandleForReading.readabilityHandler = nil\n- err.fileHandleForReading.readabilityHandler = nil\n+ out.fileHandleForReading.readabilityHandler = nil\n+ err.fileHandleForReading.readabilityHandler = nil\n+ sema.signal()\n+ }\n }\n \n buildProcess.launch()\n buildProcess.waitUntilExit()\n+ sema.wait()\n return Int(buildProcess.terminationStatus)\n }\n+ \n+ struct Redir: TextOutputStream {\n+ mutating func write(_ string: String) {\n+ FileHandle.standardError.write(string.data(using: .utf8)!)\n+ }\n+ }\n \n static func piped(command: String, label: String?) -> (Int, String, String) {\n let prefix = label ?? command\n var stdout = String()\n var stderr = String()\n-\n+ \n+ var redir = Redir()\n+ \n if label != nil {\n print(\"\\(label!): \".green + command.bold.green)\n }\n ",
"html_url": "https://github.com/awswift/swiftda/pull/5#discussion_r94203275",
"id": 94203275,
"original_commit_id": "e2c4db15d7a066ba291a601284b640159e1828cd",
"original_position": 66,
"path": "Sources/SwiftdaKit/ShellCommand.swift",
"position": 66,
"pull_request_review_id": 14734223,
"pull_request_url": "https://api.github.com/repos/awswift/swiftda/pulls/5",
"updated_at": "2016-12-30T05:12:01Z",
"url": "https://api.github.com/repos/awswift/swiftda/pulls/comments/94203275",
"user": {}
},
{
"_links": {
"html": {
"href": "https://github.com/awswift/swiftda/pull/5#discussion_r94203276"
},
"pull_request": {
"href": "https://api.github.com/repos/awswift/swiftda/pulls/5"
},
"self": {
"href": "https://api.github.com/repos/awswift/swiftda/pulls/comments/94203276"
}
},
"body": "Lines should not have trailing whitespace.",
"commit_id": "e2c4db15d7a066ba291a601284b640159e1828cd",
"created_at": "2016-12-30T05:12:03Z",
"diff_hunk": "@@ -27,36 +31,50 @@ struct ShellCommand {\n buildProcess.standardError = err\n err.fileHandleForReading.readabilityHandler = { handle in\n let str = String(data: handle.availableData, encoding: .utf8)!\n- errChunker.append(str)\n+ queue.async {\n+ errChunker.append(str)\n+ }\n }\n \n buildProcess.terminationHandler = { task in\n- if let line = outChunker.remainder() { stdout(line) }\n- if let line = errChunker.remainder() { stderr(line) }\n+ queue.async {\n+ if let line = outChunker.remainder() { stdout(line) }\n+ if let line = errChunker.remainder() { stderr(line) }\n \n- out.fileHandleForReading.readabilityHandler = nil\n- err.fileHandleForReading.readabilityHandler = nil\n+ out.fileHandleForReading.readabilityHandler = nil\n+ err.fileHandleForReading.readabilityHandler = nil\n+ sema.signal()\n+ }\n }\n \n buildProcess.launch()\n buildProcess.waitUntilExit()\n+ sema.wait()\n return Int(buildProcess.terminationStatus)\n }\n+ \n+ struct Redir: TextOutputStream {\n+ mutating func write(_ string: String) {\n+ FileHandle.standardError.write(string.data(using: .utf8)!)\n+ }\n+ }\n \n static func piped(command: String, label: String?) -> (Int, String, String) {\n let prefix = label ?? command\n var stdout = String()\n var stderr = String()\n-\n+ \n+ var redir = Redir()\n+ \n if label != nil {\n print(\"\\(label!): \".green + command.bold.green)\n }\n \n let exitCode = ShellCommand.command(command: command, stdout: { line in\n- print(\"\\(prefix): \".green + line)",
"html_url": "https://github.com/awswift/swiftda/pull/5#discussion_r94203276",
"id": 94203276,
"original_commit_id": "e2c4db15d7a066ba291a601284b640159e1828cd",
"original_position": 68,
"path": "Sources/SwiftdaKit/ShellCommand.swift",
"position": 68,
"pull_request_review_id": 14734224,
"pull_request_url": "https://api.github.com/repos/awswift/swiftda/pulls/5",
"updated_at": "2016-12-30T05:12:03Z",
"url": "https://api.github.com/repos/awswift/swiftda/pulls/comments/94203276",
"user": {}
}
]
from checks.
Related Issues (2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from checks.