0

I am looking for some pointers on generating eclipse code formatter xml file using squid rules defined in SonarQube. Please suggest how to do this using SonarLint or any other opensource plugin available.

CheckStyle plugin lets me currently generate eclipse code formatter rules using CheckStyle --> Create Formatter-Profile menu entry by right clicking on the project. I can configure the project to use generated code formatter profile so that when I right click on the file and click on "Apply Checkstyle fixes", those fixes are applied from the generated profile.

swiftBoy
  • 35,607
  • 26
  • 136
  • 135

1 Answers1

-2

There is no need to create a rule file and import it onto Eclipse. Instead, simply install SonarLint for Eclipse, and use connected mode to apply the rules activated on your SonarQube server.

G. Ann - SonarSource Team
  • 22,346
  • 4
  • 40
  • 76
  • Thank you for the reply. But I am not looking to create and import a rule file. By using the connected mode in SonarLint plugin, I could analyze the project using the quality profile defined in SonarQube server. Once I see the issues in eclipse,I was wondering if there is a solution to generate eclipse code formatter profile for formatting(checkstyle) related rules. – Kranthi Kurra Oct 14 '16 at 19:03
  • What would you do with it? You're going to apply CheckStyle rules via eclipse, and then ... export the formatter profile for import into SonarQube? – G. Ann - SonarSource Team Oct 14 '16 at 19:18
  • With CheckStyle plugin, there is a feature to generate Eclipse code formatter profile. A project could be configured to use the generated formatter profile so that when you do a "CTRL+SHIFT+F" shortcut or "Apply CheckStyle Fixes", all the formatting issues are fixed. – Kranthi Kurra Oct 14 '16 at 19:23
  • With the new SonarLint plugin, is there a way to generate fixes for formatting related issues automatically? – Kranthi Kurra Oct 14 '16 at 19:24
  • Thank you. Is this feature in development or do you have any plans for supporting that feature in the near future? – Kranthi Kurra Oct 14 '16 at 20:04