0

Similar question has been asked before, but it was years back. Think some solution might be there but unable to find it.

I have a custom eclipse formatter.xml. Need to convert it to Checkstyle rules.xml to enforce formatting in maven project using maven-checkstyle-plugin.

Tried formatter-maven-plugin, but getting inconsistent results on different machines

Any other way to enforce custom formatting check in maven would also suffice. Use case - CI

Arpit
  • 23
  • 9
  • 1
    Does this answer your question? [Create a Checkstyle Configuration from an Eclipse formatter file](https://stackoverflow.com/questions/11499984/create-a-checkstyle-configuration-from-an-eclipse-formatter-file) – Benjamin Marwell Dec 18 '20 at 09:53

1 Answers1

0

Welcome to StackOverflow! You may want to read the 'How do I ask a good question' guide.

As answered here and 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.

Benjamin Marwell
  • 1,173
  • 1
  • 13
  • 36
  • 1
    You found some weird answers to adapt their behaviour ^^. For example the first sentence borrowed from [here](https://stackoverflow.com/revisions/62057554/1) doesn't belong into an answer post. The second thing is writing an answer to point to other answers, like the other user did [here](https://stackoverflow.com/a/11644171). Instead flag the question as a duplicate (you did that already, thank you). – Tom Dec 18 '20 at 11:23