chore: fix JavaScript lint errors (issue #6355)#10698
Open
chinanuj wants to merge 1 commit intostdlib-js:developfrom
Open
chore: fix JavaScript lint errors (issue #6355)#10698chinanuj wants to merge 1 commit intostdlib-js:developfrom
chinanuj wants to merge 1 commit intostdlib-js:developfrom
Conversation
---
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: passed
- 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: 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
---
Contributor
|
@chinanuj Hey, I suggest you re-read the issue again. The max-lines 300 limit you tried to fix here is just a warning, not an actual error. The real error was in-> |
Author
|
Hey @lokesh, I actually looked for precision.js first, but it looks like that file doesn't even exist on the develop branch anymore (probably deleted/moved a while ago). Since the predicate_loops.js warning was still lingering in the codebase, I figured I'd just knock it out to help clean things up. As you can see below there is no scripts folder which was suppose to contain precision.js inside log2 folder .
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Description
This PR addresses the
max-lineslinting failure inpredicate_loops.jsreported by the automated JavaScript lint workflow.The
predicate_loops.jsfile previously exceeded the strict 300-line limit. To resolve this without altering the core logic, I refactored the script by extracting four helper functions into their own files within thelib/directory:callbackBody->lib/callback_body.jssignatures->lib/signatures.jsupdateManifest->lib/update_manifest.jsupdateMainHeader->lib/update_main_header.jsThe main script was updated to
require()these modules, bringing it comfortably under the maximum line limit. All new files strictly adhere tostdlibproject conventions, including proper Apache license headers and the required// MODULES //,// MAIN //, and// EXPORTS //block dividers. Unused variables were also removed from the main script.Related Issues
resolves #6355
Checklist