#444 Header should ignore package-info.java [patch attached]

open
nobody
Check (274)
5
2012-10-10
2007-01-04
Sebastian Davids
No

Discussion

  • fix

     
    Attachments
  • Logged In: YES
    user_id=1683672
    Originator: YES

    File Added: patch1628143.txt

     
  • Lars Kühne
    Lars Kühne
    2007-01-05

    Logged In: YES
    user_id=401384
    Originator: NO

    First of all, thanks for sending a patch along with the RFE, this is very much appreciated.

    However, I'm not sure that this is really something you really want: Most users use the header checks to verify that all files include some legal blurb, like copyright notices and stuff. The package-info.java is not a regular java source file, but it would typically contain non-trivial information that is copyrighted: The package documentation.

    --
    // Copyright 2007 lkuehne

    /*
    * This is a really complicated package doc.
    * Pages and pages.
    * Someone spent many hours writing it.
    /
    package example;
    --

    Hence I think most users would want to check the package-info.java file for a header as well.

    Maybe I missed something, can you explain why you need this functionality?

     
  • Logged In: YES
    user_id=1683672
    Originator: YES

    Hmm, appearently I found a bug in the old version of javadoc I was using ... the new one doesn't have it anymore.

    It choked on:

    /
    * Header
    */
    /

    * Package comment.
    */
    package example;

    @@@@

    The new version doesn't choke on it anymore.

    So I do not need to exclude package-info.java anymore.

     
  • Toby Byron
    Toby Byron
    2009-04-20

    lkuehne: I think that you are missing something: the problem with non-java files is that the format for comments usually differs from java source files.

    So, even if the legal boilerplate content is the same, you may use / ... / to demark the comment in java source files but in html files (e.g. package.html).

    Thus, you DO sometimes need to suppress the check in certain files.

    This is just one use case, and I bet there are others.