lint: wrap lines which include RegEx exceeding 80 chars#14607
lint: wrap lines which include RegEx exceeding 80 chars#14607thelostone-mc wants to merge 1 commit intonodejs:masterfrom
Conversation
test/parallel/test-repl.js
Outdated
There was a problem hiding this comment.
-
There are some RegExps with the same pattern which are left unchanged (lines 193, 198, 203 etc).
-
It seems the
\bsymbol after the^is unneeded.
There was a problem hiding this comment.
- Well I tried that. On introducing a
^in L193 which uses strict mode, I get theOctal literals are not allowed in strict modeerror as below: (Same case as in other lines you had mentioned )
Unix data: "(function() { \"use strict\"; return 0755; })()\n
^^^^\n\nSyntaxError: Octal literals are not allowed in strict mode.\n\nnode via Unix socket> node via Unix socket> ", expecting /^SyntaxError: Octal literals are not allowed in strict mode/
assert.js:42
- Yeah makes sense. Will do that! Can I go ahead and remove the
\beven where I can't introduce a^cause of strict mode ?
There was a problem hiding this comment.
-
Oh, sorry, I did not think this broke matching.
-
I think that removing the
\bis safe only if we place^before)
There was a problem hiding this comment.
Ack and taken care of ^_^
test/parallel/test-v8-serdes.js
Outdated
There was a problem hiding this comment.
Nit: Now the whole thing would fit in a single line.
There was a problem hiding this comment.
@thefourtheye True! But doesn't it look cleaner this way ?
There was a problem hiding this comment.
I'm with @thefourtheye, also could drop the () => { } to get:
assert.throws(v8.Serializer, serializerTypeError);Now that's clean ✨
There was a problem hiding this comment.
Well two against one !! Ack and taken care
5279834 to
91b76ad
Compare
test/parallel/test-repl.js
Outdated
There was a problem hiding this comment.
It seems this somehow breaks matching: #14607 (comment)
There was a problem hiding this comment.
Some error messages quote erroneous code before the error message itself, so for these messages, we can't use ^ anchor (or we should add the /m flag beside).
|
One aix fail in CI seems unrelated ( |
Format commit wrapping lines containing RegEx and exceeding 80 chars. Fixes: nodejs#14586
91b76ad to
59d037f
Compare
|
CI failures seem unrelated. |
Format commit wrapping lines containing RegEx and exceeding 80 chars. PR-URL: nodejs#14607 Fixes: nodejs#14586 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
|
Landed in ad664ea |
Format commit wrapping lines containing RegEx and exceeding 80 chars. PR-URL: #14607 Fixes: #14586 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
|
This does not land cleanly in LTS. Please feel free to manually backport by following the guide. Please also feel free to replace do-not-land if it is being backported |
Format commit wrapping lines containing RegEx and exceeding 80
chars.
Fixes: #14586
Files Changed:
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
test