From 4d5b7f53247bd63cd6487ec0ffb136b0b47e4e44 Mon Sep 17 00:00:00 2001 From: Daniel Chege Date: Sat, 28 Feb 2026 12:14:20 +0300 Subject: [PATCH] fix: replace new Array() and string concat in error messages --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: passed - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .../math/strided/special/ahavercos-by/test/test.ndarray.js | 6 ++++-- .../@stdlib/utils/async/for-each-right/examples/index.js | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/node_modules/@stdlib/math/strided/special/ahavercos-by/test/test.ndarray.js b/lib/node_modules/@stdlib/math/strided/special/ahavercos-by/test/test.ndarray.js index 5fe25d5d4bcf..948c9a34e63e 100644 --- a/lib/node_modules/@stdlib/math/strided/special/ahavercos-by/test/test.ndarray.js +++ b/lib/node_modules/@stdlib/math/strided/special/ahavercos-by/test/test.ndarray.js @@ -73,7 +73,8 @@ tape( 'the function computes the inverse half-value versed cosine via a callback ahavercosBy( x.length, x, 1, 0, y, 1, 0, accessor ); t.deepEqual( y, expected, 'deep equal' ); - x = new Array( 5 ); // sparse array + x = [];// sparse array + x.length = 5; y = [ 0.0, 0.0, 0.0, 0.0, 0.0 ]; expected = [ 0.0, 0.0, 0.0, 0.0, 0.0 ]; @@ -81,7 +82,8 @@ tape( 'the function computes the inverse half-value versed cosine via a callback ahavercosBy( x.length, x, 1, 0, y, 1, 0, accessor ); t.deepEqual( y, expected, 'deep equal' ); - x = new Array( 5 ); // sparse array + x = []; // sparse array + x.length = 5; x[ 2 ] = rand(); y = [ 0.0, 0.0, 0.0, 0.0, 0.0 ]; diff --git a/lib/node_modules/@stdlib/utils/async/for-each-right/examples/index.js b/lib/node_modules/@stdlib/utils/async/for-each-right/examples/index.js index f7c6af918f09..f2c8b3c8ae14 100644 --- a/lib/node_modules/@stdlib/utils/async/for-each-right/examples/index.js +++ b/lib/node_modules/@stdlib/utils/async/for-each-right/examples/index.js @@ -42,7 +42,7 @@ function read( file, next ) { function onFile( error ) { if ( error ) { - error = new Error( 'unable to read file: '+file ); + error = new Error( 'unable to read file:%s ', file ); return next( error ); } console.log( 'Successfully read file: %s', file );