Rightpoint / android-template

A `cookiecutter` template for Android projects
28 stars 4 forks source link

Lint rules #63

Closed mattognibene closed 5 years ago

mattognibene commented 5 years ago
  1. Default Layout Attribute
    • Flags default layout values that are not needed. One for instance is the textStyle="normal" that can be just removed.
  2. Invalid Import
    • Flags invalid imports. One example is com.foo.bar.R.drawable. Instead just the generated class R should be imported and not R.drawable. Also you should never import anything that's in an internal package.
  3. Naming Pattern
    • Sometimes there is more than one reasonable way to convert an English phrase into camel case, such as when acronyms or unusual constructs like "IPv6" or "iOS" are present. XML HTTP request becomes XmlHttpRequest. XMLHTTPRequest would be incorrect.

Lifted from vanniktech's lint rules

jonduran3000 commented 5 years ago

@mattognibene Everything is looking good but could just run ./gradlew ktlintFormat on your changes so that there aren't any ktlint related formatting issues in the generated projects?