Skip to content

Unused function parameter detection fails in cases it shouldn't #10

Open
@kshyatt

Description

@kshyatt
function a(b::Vector{Int})
    return [c^2 for c in b]
end

will cause semgrep to error with the current rules saying b is unused.

Similarly, Val types used to dispatch (or any ::Type{SomeType}) arguments cause unused parameter errors:

function a(b::Vector{Int}, ::Val{true})
    return b
end

this will generate an error saying ::Val{true} is unused.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions