Uh oh!
There was an error while loading. Please reload this page.
test: change equal to strictEqual in path tests - #8628
Conversation
MylesBorins
commented
Sep 17, 2016
| const controlCharFilename = 'Icon' + String.fromCharCode(13); | ||
| assert.equal(path.posix.basename('/a/b/' + controlCharFilename), | ||
| assert.strictEqual(path.posix.basename('/a/b/' + controlCharFilename), | ||
| controlCharFilename); |
There was a problem hiding this comment.
could you try and align the arguments here and in cases like this? :)
Fishrock123
left a comment
There was a problem hiding this comment.
Seems fine other than some alignment issues.
@lrlna can you try running make -j4 lint? I think it should catch these... maybe not though.
I don't think this should cause too many conflicts as I'm not aware of any major changes to path recently.
| assert.strictEqual(path.win32.dirname('\\\\unc\\share\\foo\\'), | ||
| '\\\\unc\\share\\'); | ||
| assert.strictEqual(path.win32.dirname('\\\\unc\\share\\foo\\bar'), | ||
| '\\\\unc\\share\\foo'); |
| '\\\\unc\\share\\foo'); | ||
| assert.equal(path.win32.dirname('\\\\unc\\share\\foo\\bar\\baz'), | ||
| assert.strictEqual(path.win32.dirname('\\\\unc\\share\\foo\\bar\\baz'), | ||
| '\\\\unc\\share\\foo\\bar'); |
addaleax
commented
Sep 17, 2016
@Fishrock123 The linter does not catch this, and I think we’ve talked about maybe enabling a rule like that, so… @Trott? |
Trott
commented
Sep 17, 2016
I implemented the |
Trott
commented
Sep 17, 2016
Quick implementation suggests enabling alignment for this situation will find around 66 alignment problems in the existing code base. That sounds like the upper edge of acceptable churn for something like this to me so I'll put together a PR. @Irina, if you could align the instances this PR, that would be great. Sorry we didn't have a lint rule in place to catch it before it got submitted as a PR. |
addaleax
commented
Sep 17, 2016
@Trott I think it’s worth it because usually someone will point out those misalignments… maybe wait a couple of days, though. 😄 |
Trott
commented
Sep 17, 2016
(There will still be lots of alignment issues that the rule doesn't catch but I'm OK with slowly ratcheting it up over time rather than all at once.) |
Trott
commented
Sep 18, 2016
@addaleax@Fishrock123 Here's a PR with the alignment linting: #8642 |
lrlna
commented
Sep 18, 2016
howdy, apologies for disappearing! Miss-alignments have been fixed and pushed 💯 |
A few nits in recent PR comments suggest that we can have slightly more strict linting for argument alignment in multiline function calls. This enables the existing linting requirements to apply when one or more of the arguments themselves are function calls. Previously, that situation had been excluded from linting. Refs: nodejs#8628 (comment) PR-URL: nodejs#8642 Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
PR-URL: #8628 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
jasnell
commented
Sep 20, 2016
Landed in daa0f90! thank you! |
lrlna
commented
Sep 20, 2016
omg YAY! 🎉 |
A few nits in recent PR comments suggest that we can have slightly more strict linting for argument alignment in multiline function calls. This enables the existing linting requirements to apply when one or more of the arguments themselves are function calls. Previously, that situation had been excluded from linting. Refs: #8628 (comment) PR-URL: #8642 Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
PR-URL: #8628 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Checklist
make -j4 test(UNIX), orvcbuild test nosign(Windows) passesAffected core subsystem(s)
tests
Description of change
Use strict equality in
test-pathset of unit tests.