Christian Cecili
unread,Jan 23, 2024, 10:08:03 AMJan 23Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to checkstyle-devel
Hello!
I was testing the EmptyBlock check feature, and I noticed that if I write a block with only a comment inside, Checkstyle marks it as an error. I was thinking that, since it's common for many programmers to write what needs to be done in that block in a comment (like TODO comments) and then come back to it at a later time, it would be useful to handle this situation as a kind of WARNING rather than an ERROR. Checkstyle could notify you that you're leaving an empty block, but if it detects a comment inside, it could issue a warning like: "You are leaving an empty block with only one comment inside."
I wanted to know what you think about this, whether it's a bad idea or if it's worth discussing in a new issue, or if this feature is already implemented somewhere else (if so, I apologize, it may have escaped my notice😅).
Having said that, I still want to express my compliments on the project itself. It's essential for writing clean and readable code, which is crucial for a Java programmer.