Skip to content

Fix warnings - #232

Closed
ufechner7 wants to merge 3 commits into
mainfrom
fix_loader
Closed

Fix warnings#232
ufechner7 wants to merge 3 commits into
mainfrom
fix_loader

Conversation

@ufechner7

@ufechner7 ufechner7 commented Jun 16, 2026

Copy link
Copy Markdown
Member

Fix warnings about unused parameters

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses warnings related to unused parameters/closure arguments in the YAML loading code path.

Changes:

  • Renames unused load_wing parameters to underscore-prefixed names to indicate intentional non-use.
  • Renames unused lambda parameters in YAML constructor mappings to underscore-prefixed names.
  • Adds data/catenary_export.yaml to .gitignore.

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/yaml_loader.jl Marks intentionally-unused arguments (function + mapping lambdas) with underscore-prefixed names to avoid unused-parameter warnings.
.gitignore Ignores a specific generated YAML artifact (data/catenary_export.yaml).

Comment thread src/yaml_loader.jl Outdated
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@ufechner7
ufechner7 requested a review from 1-Bart-1 June 17, 2026 12:45
@1-Bart-1

Copy link
Copy Markdown
Member

Instead of renaming the unused parameters to _data / _twist_surfaces, consider de-naming the slots — drop the binding entirely and keep only a type annotation:

function load_wing(mode::AbstractAeroModel, row, idx, ::Any, set, wing_type,
                   vsm_set, yaml_to_ref, yaml_parse_ref_points,
                   yaml_parse_origin, ::Any)

These two positional slots only exist so this method's signature matches the AeroPlate method (which does use them), so there's nothing meaningful to name. ::Any keeps the dispatch slot, removes the binding, and the linter has nothing to flag — no _ prefix and no need for the explanatory docstring paragraph.

For the mapping closures that ignore their argument (row -> set, row -> vsm_set, row -> wing_type, row -> mode), the closure must still accept the row the caller passes, so a slot is required there. The equivalent there is the bare placeholder rather than an _-prefixed name:

:set     => _ -> set,
:vsm_set => _ -> vsm_set,

_ alone is Julia's canonical throwaway (not a prefix on a real name), and StaticLint doesn't flag it.

If the _-prefix noise is bothersome across the whole file, the other option is to disable just this lint rule via "julia.lint.useoffuncargs": false — these are false positives (args required for dispatch / calling convention), not real unused values, so suppressing the rule is defensible and needs zero source changes.

@1-Bart-1

Copy link
Copy Markdown
Member

outdated

@1-Bart-1 1-Bart-1 closed this Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants