-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
Making src/core/{image,obj,parser}.js adhere to the style guide #4452
Conversation
/botio test |
From: Bot.io (Linux)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://107.21.233.14:8877/59afe8c7a7221c5/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://107.22.172.223:8877/00de0b05aa5e81c/output.txt |
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/59afe8c7a7221c5/output.txt Total script time: 25.92 mins
|
From: Bot.io (Windows)SuccessFull output at http://107.22.172.223:8877/00de0b05aa5e81c/output.txt Total script time: 36.78 mins
|
// resolved. | ||
Promise.all([imageDataPromise, smaskPromise, maskPromise]).then( | ||
function(results) { | ||
function(results) { |
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.
This looks a bit weird, with function
vertically aligned with the following code. In cases like this (when part of a function definition doesn't fit on a line), I think you can just keep the current indentation. This pattern seems to be quite common in the code base, btw.
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.
If you decide so, you should probably update the StyleGuide
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.
This is something we've been inconsistent about. I wish we could have a lint for this as I'm opposed to humans linting code. My general thoughts: If you break to the next line, try to line it up with something meaningful e.g.
function(arg1,
arg2)
If there's nothing to line it up to that makes sense, move it to then next line and indent by four spaces so it is obvious that it is not part of that indention level. e.g.
PDFJS.long =
function superLong() {
/botio test |
From: Bot.io (Linux)ReceivedCommand cmd_test from @timvandermeij received. Current queue size: 0 Live output at: http://107.21.233.14:8877/5932d8606b3c6c0/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_test from @timvandermeij received. Current queue size: 1 Live output at: http://107.22.172.223:8877/5b0208b195a0ece/output.txt |
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/5932d8606b3c6c0/output.txt Total script time: 25.05 mins
|
From: Bot.io (Windows)SuccessFull output at http://107.22.172.223:8877/5b0208b195a0ece/output.txt Total script time: 36.45 mins
|
Making src/core/{image,obj,parser}.js adhere to the style guide
No description provided.