f2prateek/dart

Suppress warnings in generated classes

Opened this issue · 6 comments

It would be nice for those of us tha try to keep warnings at Zero, if the generated classes could suppress their unchecked cast warnings.

@SuppressWarnings("unchecked") on the whole class would probably be simplest.

Currently casting Serizlizables to parameterized ArrayList seems to be the biggest culprit for me. But it's probably any Serializable.

@stephanenicolas I could be wrong (it's happened once before) but I don't think Android Studio/IntelliJ has a way to ignore warnings by file or directory.

However, I have a PR for you! #145

Thx @Wavesonics for the PR, but we need it to be green to make something out of it !

Also, I was talking about the quality tools you can automate as part of your builds like findbugs, pmd, checkstyle, not something you manually trigger in AS.

Luolc commented

@stephanenicolas btw, I sent a PR some time ago and it was red as well haha. But I have read the CI test report and the diff is just the order of generated methods in Henson class. (I mentioned it in the PR as well). This kind of failed really matters? Or could you allow us to improve the test cases as well?

Luolc commented

@stephanenicolas Ya I know the TDD principle, but what I am confused is that I need to add some codes not really elegant if I want to make the CI test green(in my case, I could simply sort the method to suit the test but it is kind of ugly :(
So is it a good practice to do so? I am new to open source group and not very familiar with the rules of PR. If the answer is yes, I will update my PR later :)