Browsed by
Series: Implementing a Java code style with CheckStyle

CheckStyle – Enforcing a coding style: part 1

CheckStyle – Enforcing a coding style: part 1

This entry is part 1 of 4 in the series Implementing a Java code style with CheckStyle

The easy way – Using someone else’s rules. As my little tutorial project was going along, I started to realise that I really wasn’t doing a very good job of getting consistency in my code. Whilst I don’t have to worry about reviewers struggling through pull requests littered with formatting changes, I do care about the quality of my work. A while back I sent the following tweet: Why I am determined to keep the quality of my test code…

Read More Read More

CheckStyle – Enforcing a coding style: part 2

CheckStyle – Enforcing a coding style: part 2

This entry is part 2 of 4 in the series Implementing a Java code style with CheckStyle

Cranking up the challenge – Making my own rules. In the second of three posts on configuring CheckStyle as a code format enforcer, I will be looking at how to set my own rules by producing my own checkstyle.xml Disclaimer time. I was aware that there is a plugin for Eclipse to make this task easy. There were however two reasons that I didn’t want to do that. The point of this whole blog is to learn about the tools…

Read More Read More

CheckStyle – Enforcing a coding style: part 3

CheckStyle – Enforcing a coding style: part 3

This entry is part 3 of 4 in the series Implementing a Java code style with CheckStyle

The sensible way to make your own ruleset. As I mentioned in CheckStyle – Enforcing a coding style: part 2, there is a far simpler way to choose your own rules than by manually editing an xml file. I use the Community edition of Intellij IDEA. Going back a few years however I learnt my first Java code at ITU using Eclipse. To be fair I did try it out when I started programming professionally, but I never really was happy…

Read More Read More

CheckStyle – Enforcing a coding style: part 4

CheckStyle – Enforcing a coding style: part 4

This entry is part 4 of 4 in the series Implementing a Java code style with CheckStyle

Final Thoughts After struggling to get the last few posts out I have adopted a more agile approach to my blog. Now, whatever state the post is in it, will be published on Monday evening. I didn’t quite get everything finished off last week so here goes with my final thoughts about implementing CheckStyle into a new project. The last changes in my CheckStyle implementation Having set the Javadoc rules to ignore in my ruleset, I of course remembered that…

Read More Read More