lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENE-7013) Move license header before package declaration in all *.java files
Date Thu, 04 Feb 2016 11:18:39 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-7013?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15132162#comment-15132162
] 

Uwe Schindler commented on LUCENE-7013:
---------------------------------------

bq. It's interesting to see that we have quite a few files with the old header, so now it's
a chance to fix them too (e.g. LazyDocument.java).

I know those. I noticed them when I improved the validation tasks to detect broken license
headers, formatted as javadocs (see root's build.xml). The checker now uses Apache RAT to
"detect" license headers before processing them. Its a dynamic replacement of the static,
huge regex: https://github.com/apache/lucene-solr/blob/master/build.xml#L127-L219

We also have files with non-ASF license headers (BSD or Porter Stemmer license). Those are
all fine, maybe the header should be moved up, but as those are partially autogenerated we
should not touch (and is unlikely - better "forbidden" - that you edit them with a GUI).

> Move license header before package declaration in all *.java files
> ------------------------------------------------------------------
>
>                 Key: LUCENE-7013
>                 URL: https://issues.apache.org/jira/browse/LUCENE-7013
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Shai Erera
>            Assignee: Shai Erera
>            Priority: Minor
>         Attachments: LUCENE-7013.patch, mvcopyright.py
>
>
> In LUCENE-7012 we committed a change to the IDE templates to place the license header
before the package declaration in new Java files.
> I wrote a simple Python script which moves the header before the package declaration.
To be on the safe side, if a .java file does not already start with the license header or
with {{package org.apache}}, it doesn't modify it and asks for manual intervention.
> It runs quite fast, so I don't mind running and committing one module at a time.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message