objectbox / objectbox-dart

Flutter database for super-fast Dart object persistence
https://docs.objectbox.io/getting-started
Apache License 2.0
918 stars 116 forks source link

Generated code contains multiple linting issues #577

Closed JaffaKetchup closed 5 months ago

JaffaKetchup commented 6 months ago

Is there an existing issue?

Build info

Steps to reproduce

  1. Generate code from any model
  2. Enable and observe the following lint issues:

If needed, this is the file of lints I'm using: https://github.com/JaffaKetchup/flutter_map_tile_caching/blob/42eed0e0d7f408665c2e4eeaa26cd3c4c51896ee/jaffa_lints.yaml

Expected behavior

Either:

Code

Code ```dart @Entity() class Foo { @Id() int id = 0; } ```
greenrobot-team commented 5 months ago

If you add custom linter rules I would say it's up to you to add the relevant ignore statements (or exclude the file from analysis), no?

Just in case, I checked our example with the default Flutter rules (include: package:flutter_lints/flutter.yaml) and found no new analysis warnings.

Edit: as I'm seeing avoid_js_rounded_ints, note that the objectbox package does not support web!

JaffaKetchup commented 5 months ago

Thanks for the response! I suppose you are right that I should exclude the file myself (I have done), I kinda forgot that :D

I appreciate you don't support the web platform, but the issue is that this could cause a poor pub score and/or cause ci issues. So I still think that 'avoid_js_rounded_ints' needs fixing. That was the original issue anyway :D

JaffaKetchup commented 5 months ago

Also, perhaps adding to the docs to exclude the file completely anyway might be worthwhile.

greenrobot-team commented 5 months ago

OK, this is a non-issue then. Closing.