Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where can I find checkstyle config for Android Coding Style?

Tags:

There are Coding Conventions for Android. They include some stuff like naming conventions that can be checked using checkstyle.

I've found some config for checkstyle: http://ksoichiro.blogspot.com/2011/05/android-checkstyle.html

But I want to ask if there is some more complete config for checkstyle. Maybe Google provide some official checkstyle config?

like image 898
Max Romanovsky Avatar asked Feb 18 '12 08:02

Max Romanovsky


People also ask

Where do I put Checkstyle XML?

In the IDE open Settings and search for Checkstyle. A window is shown that has the option to select our checks. Click on the + button and a window will open which will let us specify the location of the file to be used. Now, we select a configuration XML file and click Next.

What is Checkstyle format?

Overview. Checkstyle is a development tool to help programmers write Java code that adheres to a coding standard. It automates the process of checking Java code to spare humans of this boring (but important) task. This makes it ideal for projects that want to enforce a coding standard.

What is Checkstyle XML file?

Checkstyle obtains a configuration from an XML document whose elements specify the configuration's hierarchy of modules and their properties. You provide a file that contains the configuration document when you invoke Checkstyle at the command line, and when you run a Checkstyle task in ant.


2 Answers

Here you can find some that implement http://source.android.com/source/code-style.html although none of them is official.

  • Eclipse checkstyle checks for Android
  • Checkstyles in the swp-dv-ws2010-osm-1 project
  • Android CheckStyle (Japanese website)
  • Android-getting started guide
like image 188
pixel Avatar answered Sep 17 '22 13:09

pixel


There is Android Check plugin (https://github.com/noveogroup/android-check).

It has two predefined Checkstyle configurations you can use:

  • checkstyle-easy.xml
  • checkstyle-hard.xml
like image 41
stefan.nsk Avatar answered Sep 20 '22 13:09

stefan.nsk