5

At the moment our team is working with a custom eclipse Formatter configuration. Is there a way to import the generated xml file into Checkstyle to have both on the same ruleset?

Sebastian Basner
  • 515
  • 5
  • 11
  • Does this answer your question? [converting an eclipse formatter file to a checkstyle file](https://stackoverflow.com/questions/8327498/converting-an-eclipse-formatter-file-to-a-checkstyle-file) – Tom Dec 18 '20 at 11:19

2 Answers2

5

As answered here, there is no way to convert a formatter file to a checkstyle ruleset at the moment. The formater file has another syntax as checkstyle, so it's unable to read it.

Community
  • 1
  • 1
crasp
  • 743
  • 14
  • 22
  • 2
    thx for your answer. Very sad as it works the other way around. I will wirte my ruleset now in checkstyle and export it as eclipse formatter. – Sebastian Basner Jul 31 '12 at 09:27
0

Preferences -> Java -> Code Style - > Formatter

You can import/export or create a new format rules.

tostao
  • 2,803
  • 4
  • 38
  • 61
  • That is not the problem, I have the eclipse formatter xml file exported but I can't import it to checkstyle. When I try checkstyle tells me that there is "no grammar found" – Sebastian Basner Jul 16 '12 at 08:32
  • Did you check the encoding of the file? Try export from eclipse where this formatter is working one more time. If this does not help than open file in notepad++ and check syntaxt, may some tags are not properly closed or sth like this(formatter is xml file). – tostao Jul 16 '12 at 12:23