capsule icon indicating copy to clipboard operation
capsule copied to clipboard

Code cleanup

Open pakoito opened this issue 8 years ago • 2 comments

There are some other parts of the app where static analysis has flagged me, like lack of equals and hashCode on some inner classes inside AbstractSpecialisedImmutableMap. Plenty of redundant casts and extra typing that could be replaced by diamonds. Indentation is also all over the place, with a mix of tabs and two and four spaces.

I could open another PR and help, if contributions are accepted.

pakoito avatar Aug 10 '16 20:08 pakoito

@pakoito, thanks for getting in touch. Which static analysis tools are you using? Are they part of the Android tool suite?

Part of the data structure implementations were generated by a code generator. It might therefore be true, that redundant casts were introduced to cater for generating primitive specialized versions of the collections. But you're right, that those should be cleaned up in one or the other way.

Indentation and formatting for the project should obey to the Google Coding Styleguide, which is setup via the maven-eclipse-plugin integration.

Parts of capsule were extracted from the rascal-value and rascal codebase, before becoming a standalone project. Those three projects are still co-evolving at the moment. Some formatting inconsistencies might still be around therefore. I'll take care to fix those inconsistencies.

msteindorfer avatar Aug 11 '16 11:08 msteindorfer

I'm currently using SonarLint, which is an aggregation of PMD, FindBugs and others.

The tests and pom file are indentated with tabs.

pakoito avatar Aug 11 '16 19:08 pakoito