Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

False positive missing_placeholder_with_metadata when it's followed by a key with @@x- #70

Open
AhmedLSayed9 opened this issue Oct 9, 2024 · 4 comments

Comments

@AhmedLSayed9
Copy link

When a property with a placeholder is followed by a key prefixed with @@x-, a warning The placeholder is defined in the metadata, but not in the message.(missing_placeholder_with_metadata) is popped.

i.e:

{
  "some": "some {title}",
  "@some": {
    "placeholders": {
      "title": {
        "type": "String"
      }
    }
  },
  "@@x-comment": ""
}
@mosuem
Copy link
Collaborator

mosuem commented Oct 10, 2024

This is indeed a bug! Thanks for reporting. We should introduce special treatment for metadata starting with @@x-, or even just with @@.

@mosuem
Copy link
Collaborator

mosuem commented Oct 14, 2024

Using your example, I cannot reproduce this. Does this exact code trigger the warning for you? Could you share more about your setup?

@AhmedLSayed9
Copy link
Author

@mosuem Nothing fancy, just a new empty flutter project and adding an arb file can produce it:

Screen.Recording.2024-10-14.at.9.29.38.PM.mov

@mosuem mosuem removed the needs-info label Oct 17, 2024
@plaa
Copy link

plaa commented Nov 6, 2024

FWIW, I can reproduce this bug. I was just coming to report it myself.

I'm using Mac M3, VSCode version 1.95.1, ARB Editor v0.2.1. It seems to me Ahmed is also using Mac.

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

No branches or pull requests

3 participants