You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Uwe Schindler (JIRA)" <ji...@apache.org> on 2016/07/12 06:39:10 UTC

[jira] [Commented] (LUCENE-7013) Move license header before package declaration in all *.java files

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

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

Hi Steve,

could we not run the license matching 2 times? I think we can rewrite the code and just save the start position of the license in the general license check in the already existing first part and on the {{*.java}} part only compare the offsets if the package pattern matches, instead of running license matcher a second time.

> 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
>             Fix For: 5.5, trunk
>
>         Attachments: LUCENE-7013-precommit.patch, LUCENE-7013.patch, mvcopyright.py, 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