Generated code contains multiple linting issues
JaffaKetchup opened this issue · comments
Is there an existing issue?
- I have searched existing issues
Build info
- objectbox version: 2.3.1
- Flutter/Dart version: 3.13.9 + 3.1.5
- Build OS: Windows 11
- Deployment OS or device: Windows 11 (but happens regardless of platforms)
Steps to reproduce
- Generate code from any model
- 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:
- Add the lints above to the 'ignore_for_file' lints line
- Actually fix the issues in generation
Code
Code
@Entity()
class Foo {
@Id()
int id = 0;
}
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!
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
Also, perhaps adding to the docs to exclude the file completely anyway might be worthwhile.
OK, this is a non-issue then. Closing.