Tuesday, January 22, 2008

Tapestry Code Quality

According to Enerjy, Tapestry comes in at about the top of the list for open source projects they've scanned. I suspect that T5 is quite a bit larger than the other top projects, and T5 probably also gets knocked down because I tend not to JavaDoc implementations, just the interfaces.

Also, looks like it doesn't understand Tapestry components, or the concept that the visible annotations on fields are both functional and documentation providing. Oh, and it hates that I don't use braces on trivial if statements.

This is all fine and good, though the code inspections built into IntelliJ were of more use to me.

3 comments:

  1. It's always nice for you but also for us avid tapestry users.

    ReplyDelete
  2. Hi, thanks for taking a look at Enerjy and congratulations on the score.

    I wouldn't suggest for a moment that the index score should replace static analysis like the IntelliJ code inspections. I view them as complementary in a couple of situations. First, if you're introducing static analysis to a legacy codebase then the index score can show you which files to focus on improving. Second once you've got your static analysis violations under control then the score can suggest files with subtler problems that are worth refactoring. We actually bundle our Eclipse plugin for computing index scores along with our static code analyzer.

    I agree with you on the braces for trivial if statements. I'm a big fan of using braces whenever an if statement spans multiple lines but when the statement is written on a single line then it seems sensible to make an exception. I'll rerun the index model with that rule reconfigured to exclude if statements on a single line to see how that affects its prediction accuracy on our training data.

    Mark
    Enerjy Software

    ReplyDelete
  3. Oh, and it hates that I don't use braces on trivial if statements.

    ...and that when you do use braces, you put them on their own line. That's got to knock at least a tenth of a percent off, though if the world were a just and fair place, it would be a full point. :)

    ReplyDelete

Please note that this is not a support forum for Tapestry. Requests for help will be deleted. Please subscribe to the Tapestry user mailing list if you are in need of support, or contact me directly for professional (for pay) support.

Spammers: Don't bother. I delete your comments and it's a waste of time for both of us. 垃圾邮件发送者:不要打扰。我删除您的评论和它的时间对我们双方的浪费