fzyzcjy / flutter_rust_bridge

Flutter/Dart <-> Rust binding generator, feature-rich, but seamless and simple.
https://fzyzcjy.github.io/flutter_rust_bridge/
MIT License
3.64k stars 256 forks source link

custom ignore_for_file in generated dart file #1948

Closed Krysl closed 2 weeks ago

Krysl commented 2 weeks ago

Is your feature request related to a problem? Please describe. Show too much lint messages in VSCode problem panel, if I had defined some strict lint rules in analysis_options.yaml. Even if I add a exclude config in analysis_options.yaml, As soon as I open the generated code file in VSCode, the exclude option does not work and the lint error is displayed again.

Describe the solution you'd like Add a config in flutter_rust_bridge.yaml, something like to the preamble config in ffigen

welcome[bot] commented 2 weeks ago

Hi! Thanks for opening your first issue here! :smile:

fzyzcjy commented 2 weeks ago

Looks reasonable, and feel free to PR for this!

Krysl commented 2 weeks ago

Looks reasonable, and feel free to PR for this!

Seems easy, I'll give it a try.

fzyzcjy commented 2 weeks ago

Feel free to ping me if needing any hints :)

Krysl commented 2 weeks ago

Just done,but I don't know if there's anything missing.

github-actions[bot] commented 16 hours ago

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new issue.

Key Explaination Example
preamble Raw header of the file, pasted as-it-is. ```yaml preamble: | // ignore_for_file: camel_case_types, non_constant_identifier_names ```