Skip to content

Conversation

@munazzaghazali7-hash
Copy link
Contributor

Resolves #9267

Description

What is the purpose of this pull request?

This pull request:

  • type: pre_commit_static_analysis_report
    description: Fixed C benchmark function to remove variable length array (VLA) and use dynamic allocation with malloc/free.
    report:

task: lint_filenames status: na
task: lint_editorconfig status: na
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: na
task: lint_javascript_tests status: na
task: lint_javascript_benchmarks status: na
task: lint_python status: na
task: lint_r status: na
task: lint_c_src status: passed
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: na
task: lint_typescript_tests status: na
task: lint_license_headers status: passed

Resolves None.

Related Issues

Does this pull request have any related issues?

This pull request has the following related issues:

Questions

Any questions for reviewers of this pull request?

No.

Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

No.

Checklist

Please ensure the following tasks are completed before submitting this pull request.

AI Assistance

When authoring the changes proposed in this PR, did you use any kind of AI assistance?

  • Yes
  • No

@stdlib-js/reviewers

@stdlib-bot stdlib-bot added Statistics Issue or pull request related to statistical functionality. Needs Review A pull request which needs code review. labels Dec 20, 2025
@stdlib-bot
Copy link
Contributor

Coverage Report

Package Statements Branches Functions Lines
stats/strided/smean $\color{green}344/344$
$\color{green}+100.00%$
$\color{green}13/13$
$\color{green}+100.00%$
$\color{green}4/4$
$\color{green}+100.00%$
$\color{green}344/344$
$\color{green}+100.00%$

The above coverage report was generated for the changes in this PR.

Copy link
Member

@kgryte kgryte left a comment

Choose a reason for hiding this comment

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

Unfortunately, we cannot accept this PR, as is, due to all the formatting changes. Please make sure you are following stdlib conventions.

@kgryte kgryte added Needs Changes Pull request which needs changes before being merged. and removed Needs Review A pull request which needs code review. labels Dec 20, 2025
@munazzaghazali7-hash
Copy link
Contributor Author

@kgryte Thank you for the feedback, I've updated the PR to address the formatting concerns

  • Corrected indentation to match stdlib conventions
  • Ensured variable declarations are at the top of the function
  • Removed unintended formatting changes to the original code style
  • Added proper memory cleanup

The changes are now minimal and focused solely on replacing the VLA with dynamic allocation. Please review when you have a chance.

@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Dec 20, 2025
@kgryte kgryte added autoclose: Project Conventions Pull request which should be auto-closed due to not following project conventions. and removed Needs Review A pull request which needs code review. labels Dec 20, 2025
@kgryte
Copy link
Member

kgryte commented Dec 20, 2025

Ref: #9282

@stdlib-bot
Copy link
Contributor

Thank you for working on this pull request. However, we cannot accept your contribution as this pull request does not follow project conventions.

We place a high value on consistency throughout the stdlib codebase, and this pull request was found to significantly deviate from stdlib conventions. We encourage you to closely examine other packages in stdlib and attempt to emulate the practices and conventions found therein.

  • If you are attempting to contribute a new package, sometimes the best approach is to simply copy the contents of an existing package and then modify the minimum amount necessary to implement the feature (e.g., changing descriptions, parameter names, and implementation).
  • If you are contributing tests, find a package implementing a similar feature and emulate the tests of that package.
  • If you are updating documentation, examine several similar packages and emulate the content, style, and prose of those packages.

In short, the more effort you put in to ensure that your contribution looks and feels like stdlib—including variables names, bracket spacing, line breaks, etc—the more likely that your contribution will be reviewed and ultimately accepted. We encourage you to closely study the codebase before continuing to work on this pull request.

Thank you again for your interest in stdlib, and we look forward to reviewing your future contributions.

@stdlib-bot stdlib-bot closed this Dec 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autoclose: Project Conventions Pull request which should be auto-closed due to not following project conventions. Needs Changes Pull request which needs changes before being merged. Statistics Issue or pull request related to statistical functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix C lint errors

3 participants