Skip to content

Commit 4cd4e7c

Browse files
Trotttargos
authored andcommitted
benchmark,doc,lib,test: prepare for padding lint rule
Upcoming lint rule will require a blank line between consecutive functions. Add it in the places where we don't have it already. PR-URL: #30696 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Denys Otrishko <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent de3a1c3 commit 4cd4e7c

26 files changed

+42
-0
lines changed

‎benchmark/process/next-tick-breadth-args.js‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,19 @@ function main({n }){
1313
if(j===n)
1414
bench.end(n);
1515
}
16+
1617
functioncb2(arg1,arg2){
1718
j++;
1819
if(j===n)
1920
bench.end(n);
2021
}
22+
2123
functioncb3(arg1,arg2,arg3){
2224
j++;
2325
if(j===n)
2426
bench.end(n);
2527
}
28+
2629
functioncb4(arg1,arg2,arg3,arg4){
2730
j++;
2831
if(j===n)

‎benchmark/process/next-tick-depth-args.js‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ function main({n }){
2020
}else
2121
bench.end(n);
2222
}
23+
2324
functioncb3(arg1,arg2,arg3){
2425
if(--counter){
2526
if(counter%4===0)
@@ -33,6 +34,7 @@ function main({n }){
3334
}else
3435
bench.end(n);
3536
}
37+
3638
functioncb2(arg1,arg2){
3739
if(--counter){
3840
if(counter%4===0)
@@ -46,6 +48,7 @@ function main({n }){
4648
}else
4749
bench.end(n);
4850
}
51+
4952
functioncb1(arg1){
5053
if(--counter){
5154
if(counter%4===0)

‎benchmark/timers/set-immediate-breadth-args.js‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ function main({n }){
1212
});
1313

1414
functioncb1(arg1){}
15+
1516
functioncb2(arg1,arg2){}
17+
1618
functioncb3(arg1,arg2,arg3){}
1719

1820
bench.start();

‎benchmark/timers/set-immediate-depth-args.js‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ function main({n }){
2121
setImmediate(cb1,n);
2222
}
2323
}
24+
2425
functioncb2(n,arg2){
2526
if(--n){
2627
if(n%3===0)
@@ -31,6 +32,7 @@ function main({n }){
3132
setImmediate(cb1,n);
3233
}
3334
}
35+
3436
functioncb1(n){
3537
if(--n){
3638
if(n%3===0)

‎benchmark/timers/timers-breadth-args.js‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,19 @@ function main({n }){
1212
if(j===n)
1313
bench.end(n);
1414
}
15+
1516
functioncb2(arg1,arg2){
1617
j++;
1718
if(j===n)
1819
bench.end(n);
1920
}
21+
2022
functioncb3(arg1,arg2,arg3){
2123
j++;
2224
if(j===n)
2325
bench.end(n);
2426
}
27+
2528
functioncb4(arg1,arg2,arg3,arg4){
2629
j++;
2730
if(j===n)

‎benchmark/timers/timers-timeout-nexttick.js‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,11 @@ function main({n }){
1919
functioncb(){
2020
process.nextTick(counter);
2121
}
22+
2223
functioncb2(){
2324
process.nextTick(counter);
2425
}
26+
2527
functioncounter(){
2628
count++;
2729
if(count===n)

‎benchmark/timers/timers-timeout-pooled.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ function main({n }){
2020
if(count===n)
2121
bench.end(n);
2222
}
23+
2324
functioncb2(){
2425
count++;
2526
if(count===n)

‎benchmark/timers/timers-timeout-unpooled.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ function main({n }){
2020
if(count===n)
2121
bench.end(n);
2222
}
23+
2324
functioncb2(){
2425
count++;
2526
if(count===n)

‎doc/api/assert.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1266,9 +1266,11 @@ a string as the second argument gets considered:
12661266
functionthrowingFirst(){
12671267
thrownewError('First');
12681268
}
1269+
12691270
functionthrowingSecond(){
12701271
thrownewError('Second');
12711272
}
1273+
12721274
functionnotThrowing(){}
12731275

12741276
// The second argument is a string and the input function threw an Error.

‎lib/_stream_writable.js‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -646,6 +646,7 @@ function needFinish(state){
646646
!state.finished&&
647647
!state.writing);
648648
}
649+
649650
functioncallFinal(stream,state){
650651
stream._final((err)=>{
651652
state.pendingcb--;
@@ -658,6 +659,7 @@ function callFinal(stream, state){
658659
}
659660
});
660661
}
662+
661663
functionprefinish(stream,state){
662664
if(!state.prefinished&&!state.finalCalled){
663665
if(typeofstream._final==='function'&&!state.destroyed){

0 commit comments

Comments
(0)