Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Import a user defined checkstyle eclipse

I have a user defined checkstyle xml file and jar file. How can I import the xml and jar file in eclipse.

Should I install eclipse checkstyle plugin and then import my user defined check style in it or is there any alternate way

like image 497
Anand B Avatar asked Jun 27 '13 08:06

Anand B


People also ask

How do I import a Checkstyle file into Eclipse?

In Eclipse, right-click on the project, and pull down to Properties . Select “Checkstyle” and click on the “Local Check Configurations” tab. Click on New . Select “External Configuration File”, enter a “Name:” and the “Location:” of the file, and click OK .


2 Answers

Go to Preferences -> Checkstyle. In the Global Check Configurations box you can specify your own files.

like image 150
Luis Sep Avatar answered Oct 29 '22 07:10

Luis Sep


If by user defined checkstyle, you mean you created some new rules and want them to be a part of your checkstyle, then you can do it like following :

  1. Create plugin project and add your custom checks there.
  2. Make appropriate changes to plugin.xml, checkstyle_packages.xml.
  3. Export the project as Deployable Plug-ins and fragments (Export > Plug-in Developement)
  4. Copy the jar file to Eclipse Plugin folde, so no need to install your custom check .

You can refer this tutorial

like image 2
Denim Datta Avatar answered Oct 29 '22 08:10

Denim Datta