[ 
https://issues.apache.org/jira/browse/LUCENE-7013?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Shai Erera updated LUCENE-7013:
-------------------------------
    Attachment: LUCENE-7013.patch
                mvcopyright.py

{{mvcopyright.py}} is the simple script I wrote. Really, if you have comments 
about improving it, feel free .. I'm definitely a beginner when it comes to 
Python.

The patch demonstrates the run on lucene/demo module. Just to give an idea 
about the needed changes. In most cases, when the license appears exactly after 
the package declaration, the diff is minimal.

If there are no objections, I'll run it over modules and commit each one 
separately.

> 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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to