FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

test: replace string concatenation with path.join in test-graph.tls-write.js by jkzing · Pull Request #14272 · nodejs/node · GitHub

/ node Public

test: replace string concatenation with path.join in test-graph.tls-write.js - #14272

Closed
jkzing wants to merge 1 commit into
nodejs:masterfrom
jkzing:replace-concat
Closed

test: replace string concatenation with path.join in test-graph.tls-write.js#14272
jkzing wants to merge 1 commit into
nodejs:masterfrom
jkzing:replace-concat

Conversation

jkzing commented Jul 16, 2017
edited
Loading

Copy link
Copy Markdown
Contributor
Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

test

This is a PR from JSConf CN Code & Learn workshop. 👻

nodejs-github-bot added async_hooks Issues and PRs related to the async hooks subsystem. test Issues and PRs related to the tests. labels Jul 16, 2017
jkzing changed the title [Code & Learn] test: use template string literals in test-graph.tls-write.js test: use template string literals in test-graph.tls-write.js Jul 16, 2017
joyeecheung added the code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. label Jul 16, 2017

Trott left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM if CI is green

TimothyGu added code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. and removed code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. labels Jul 16, 2017

Copy link
Copy Markdown
Contributor

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Sorry to throw a wrench, and this should be path.join

tniessen Jul 16, 2017
edited
Loading

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

We have had the same discussion in other PRs before, and we would have to change this in quite many files. It does not make it worse than it is :)

But I agree that we should use path.join, so if you want to change this... @jkzing

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Sure, no problem on that.
So if I touch string concatenation that used as path next time, path.join is preferred rather than template string syntax, right?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

IMHO is these cases path.join is much better:

  1. it's more correct — Windows uses \ while other OSs use /, and path.join handles that
  2. it's more expressive — you explicitly say "this is a path I'm working with here"
  3. more readable — a little bit easier to see the parts that are being joined

refack left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

💯
Thanks you!

refack commented Jul 16, 2017

Copy link
Copy Markdown
Contributor

@jkzing thank you very much for you contribution. "Change requests" are a normal part of the process. Personally I'm very happy you did follow up and made the code even better 🥇 Hope to see you contributing more.

tniessen self-assigned this Jul 16, 2017

jkzing commented Jul 16, 2017
edited
Loading

Copy link
Copy Markdown
Contributor Author

@refack With pleasure. Code review makes our code better.😄

Trott commented Jul 16, 2017

Copy link
Copy Markdown
Member

Looks like something went wrong with a number of CI builds. We'll have to re-run this on CI, but unfortunately not right now, because it's got quite a large backlog of jobs at the moment.

Trott commented Jul 17, 2017

Copy link
Copy Markdown
Member

Trott commented Jul 18, 2017

Copy link
Copy Markdown
Member

Two test failures in CI are unrelated. CI can be considered green!

trevnorris left a comment
edited
Loading

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

git title is too long. Please limit it to 50 characters. You can remove the file name. That's easy enough to see by looking at the commit stat.

jkzing changed the title test: use template string literals in test-graph.tls-write.js test: replace string concatenation with path.join in test-graph.tls-write.js Jul 18, 2017

jkzing commented Jul 18, 2017

Copy link
Copy Markdown
Contributor Author

@trevnorris done.

trevnorris left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thanks much

refack pushed a commit to refack/node that referenced this pull request Jul 19, 2017
PR-URL: nodejs#14272
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>

refack commented Jul 19, 2017

Copy link
Copy Markdown
Contributor

Landed in 97008a7

refack closed this Jul 19, 2017
jkzing deleted the replace-concat branch July 20, 2017 03:01
addaleax pushed a commit that referenced this pull request Jul 22, 2017
PR-URL: #14272
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Fishrock123 pushed a commit that referenced this pull request Jul 24, 2017
PR-URL: #14272
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
addaleax mentioned this pull request Jul 24, 2017
addaleax mentioned this pull request Aug 2, 2017
This file contains hidden or 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

async_hooks Issues and PRs related to the async hooks subsystem. code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. test Issues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.


Back | FazBrowse Home | New Git URL