Skip to content

Unused source param on get_first_call_arg in javascript.rs #1817

Description

@carlos-alm

Summary

`cargo check --release` on `crates/codegraph-core` emits one warning, unrelated to any current work:

```
warning: unused variable: `source`
--> crates/codegraph-core/src/extractors/javascript.rs:2437:48
|
2437 | fn get_first_call_arg<'a>(call_node: &'a Node, source: &[u8]) -> Option<Node<'a>> {
| ^^^^^^ help: if this is intentional, prefix it with an underscore: `_source`
```

Suggested fix

Either prefix the parameter with `_source` if it's genuinely unused, or check whether callers pass a real source buffer that should be used (e.g. for string-literal argument extraction) and wire it through if so.

Found while

Investigating issue #1728 (exported-symbol detection) — ran `cargo check --release` on `crates/codegraph-core` to verify an unrelated fix compiled cleanly and noticed this pre-existing warning. Not fixed here to keep that PR scoped to a single concern.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions