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

Making src/core/{image,obj,parser}.js adhere to the style guide #4452

Merged
merged 1 commit into from
Mar 20, 2014

Conversation

timvandermeij
Copy link
Contributor

No description provided.

@Snuffleupagus
Copy link
Collaborator

/botio test

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

Command cmd_test from @Snuffleupagus received. Current queue size: 0

Live output at: http://107.21.233.14:8877/59afe8c7a7221c5/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

Command cmd_test from @Snuffleupagus received. Current queue size: 0

Live output at: http://107.22.172.223:8877/00de0b05aa5e81c/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux)


Success

Full output at http://107.21.233.14:8877/59afe8c7a7221c5/output.txt

Total script time: 25.92 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Regression tests: Passed

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

Full output at http://107.22.172.223:8877/00de0b05aa5e81c/output.txt

Total script time: 36.78 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Regression tests: Passed

// resolved.
Promise.all([imageDataPromise, smaskPromise, maskPromise]).then(
function(results) {
function(results) {
Copy link
Collaborator

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.

Copy link
Contributor

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

Copy link
Contributor

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() {

@timvandermeij
Copy link
Contributor Author

/botio test

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

Command cmd_test from @timvandermeij received. Current queue size: 0

Live output at: http://107.21.233.14:8877/5932d8606b3c6c0/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

Command cmd_test from @timvandermeij received. Current queue size: 1

Live output at: http://107.22.172.223:8877/5b0208b195a0ece/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux)


Success

Full output at http://107.21.233.14:8877/5932d8606b3c6c0/output.txt

Total script time: 25.05 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Regression tests: Passed

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

Full output at http://107.22.172.223:8877/5b0208b195a0ece/output.txt

Total script time: 36.45 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Regression tests: Passed

Snuffleupagus added a commit that referenced this pull request Mar 20, 2014
Making src/core/{image,obj,parser}.js adhere to the style guide
@Snuffleupagus Snuffleupagus merged commit 5720500 into mozilla:master Mar 20, 2014
@timvandermeij timvandermeij deleted the core-syntax branch March 20, 2014 21:44
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

Successfully merging this pull request may close these issues.

5 participants