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
SONAR: code quality for 13 release #9772
Comments
I will let Thomas answer the "transient" question but I am all for helping split the work and fixing the others! |
TBH i would fix some cases where we know for sure that it can NEVER be serializable but after that i would propably just ignore (remove the rule) the "make XXX transient or serializable" because also JSF itself doesnt serializable the event but the user might - and it might even just works for the most cases, when the user itself e.g. serialize NodeCollapseEvent and the user applied a serializable TreeNode if we make it transient, the user will never have the coiche to serialize it |
Ok as long we have a good reason to do it I'm cool with that, I've disabled this rule then We have 20 critical now just by removing this rule 😅 |
16 critical and 66 Major left. I'm having a look at ImageCropperRenderer. We have a lot of Remove usage of generic wildcard type. not sure yet how to deal with those |
i would disable this rule until a user comes up with a related problem someday; we never had any problems |
i also wonder about java:S2160 i think this are rules for "normal projects", not for OS frameworks which gets reviews from X people |
I agree about the Generics warning I think we should just disable it. |
will also fix some java:S1181 and deactivate the rule |
S2160 makes sense (maybe less relevant in DotEndPoint and co.) but in general I would definitely keep it (specially when it comes to POJOs) S1452: maybe exclude that rule for org.primefaces.component package (trying to solve that squid can result into ugly stuff, I didn't try, but looking at a component like DataTable, quickly can have a snowball effect) S1181: how is it by design? |
S2160: we can add it back but how can we exclude this for this specific classes? i dont like to add something like //CHECKSTYLE:OFF S1181: we have currently 2 cases only and this can throw a LinkageError/NoClassDefFound |
…rRenderer.java)
This change will break premium templates. They (or at least Diamond) come with a custom menu component. In the renderer they do: WidgetBuilder wb = getWidgetBuilder(context);
wb.init("Diamond", menu.resolveWidgetVar(), clientId)
.attr("statefulScroll", menu.isStatefulScroll());
wb.finish(); Which no longer works, because |
Yep that could just just be.. WidgetBuilder wb = getWidgetBuilder(context);
wb.init("Diamond", menu).attr("statefulScroll", menu.isStatefulScroll());
wb.finish(); |
I was about to post that 👍🏻. I'll update the forum thread. |
That's another reason why PrimeTek should put their templates into private repositories, that would help everyone... |
did we remove it during 13? |
Description
The codebase might need some attention since last time we focused on this, on this day:
More details here: https://sonarcloud.io/project/issues?resolved=false&id=org.primefaces%3Aprimefaces
I see a lot of
Make "XXX" transient or serializable"
kind of errors, and I think it'd be great to know once and for all what to do with these warnings?The rest should be quite easy to fix. If you have any questions, suggestions, feel free to share 😉
Describe the solution you would like
See how we can split the work (it's redundant work and not so fun 😅 )
Additional context
Also I see we have some singletons for DT/TT features, I'm planning to remove those for many reasons (essentially it's an anti-pattern, and we don't need to define them as singleton)
The text was updated successfully, but these errors were encountered: