Skip to content

Inconsistent parameter declaration name #167

@marcelhuberfoo

Description

@marcelhuberfoo

Unfortunately, the JNIGenerator is not using the same parameter names in the generated files as for example the ObjCppGenerator does.
This leads to issues reported by clang-tidy when having the readability-inconsistent-declaration-parameter-name check active.
The issue is in the following line generating the prototype, where the " " should have been " c_":

cppMarshal.fqParamType(p.ty) + " " + idCpp.local(p.ident)

like for the body writer here:
cppMarshal.fqParamType(p.ty) + " c_" + idCpp.local(p.ident)

You can use this search to compare the different generator implementations: https://github.com/search?q=repo%3Across-language-cpp%2Fdjinni-generator%20idCpp.local&type=code

I will potentially put up a PR to propose the fix.

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