Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blank line after/before license #78

Open
rnc opened this issue May 13, 2015 · 31 comments
Open

Blank line after/before license #78

rnc opened this issue May 13, 2015 · 31 comments
Labels
in:core MLP core module is:feature New feature todo Accepted items from the backlog which can be worked on

Comments

@rnc
Copy link
Contributor

rnc commented May 13, 2015

It would be nice to have an option to add a blank line before the license block or / and after the license block.

@mathieucarbou mathieucarbou added the is:enhancement Enhancement to an existing feature label Jul 15, 2015
@mmoayyed
Copy link

mmoayyed commented Aug 6, 2015

Yes, and please make this optional.

For example, I would want something like this on a JSP file:

<%--

    Licensed to Apereo under one or more contributor license
    agreements. See the NOTICE file distributed with this work
    for additional information regarding copyright ownership.
    Apereo licenses this file to you under the Apache License,
    Version 2.0 (the "License"); you may not use this file
    except in compliance with the License.  You may obtain a
    copy of the License at the following location:

      http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.

--%><%= "xyz" %>

Rather than:

<%--

    Licensed to Apereo under one or more contributor license
    agreements. See the NOTICE file distributed with this work
    for additional information regarding copyright ownership.
    Apereo licenses this file to you under the Apache License,
    Version 2.0 (the "License"); you may not use this file
    except in compliance with the License.  You may obtain a
    copy of the License at the following location:

      http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.

--%>
<%= "xyz" %>

@mathieucarbou mathieucarbou added the todo Accepted items from the backlog which can be worked on label Aug 12, 2016
@mirabilos
Copy link
Contributor

Additionally, it would be nice to say: one blank line, but none above if the licence block is the first thing in the file, and never more than one blank line (i.e. don’t add one if one exists, or even collapse them all into one empty line).

@mathieucarbou mathieucarbou added todo Accepted items from the backlog which can be worked on and removed todo Accepted items from the backlog which can be worked on PATCH-WANTED labels Feb 6, 2019
@mathieucarbou mathieucarbou added is:feature New feature in:core MLP core module and removed is:enhancement Enhancement to an existing feature todo Accepted items from the backlog which can be worked on labels Sep 7, 2021
@stale
Copy link

stale bot commented Nov 7, 2021

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale Inactive items that will be automatically closed if not resurrected label Nov 7, 2021
@mirabilos
Copy link
Contributor

@bot see #78 (comment)

@stale stale bot removed the stale Inactive items that will be automatically closed if not resurrected label Nov 7, 2021
@mathieucarbou
Copy link
Owner

@rnc @mmoayyed @mirabilos : Stable Bot automatically mark and closes stale issues. If nobody resurrects or open a PR for that issue, it will just be closed. I understand the feature (nice to have IMO), but as an OSS projects and not having any bandwidth for such nice to have thing, people in need also are welcomed to contribute.
Thanks :-)

@mmoayyed
Copy link

mmoayyed commented Nov 26, 2021

@mathieucarbou I perfectly understand. From my perspective, you're welcome to close this issue. We are no longer using this particular feature or plugin, and have moved on for about 6 years.

@stale
Copy link

stale bot commented Jan 25, 2022

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added stale Inactive items that will be automatically closed if not resurrected and removed stale Inactive items that will be automatically closed if not resurrected labels Jan 25, 2022
@stale
Copy link

stale bot commented Mar 26, 2022

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale Inactive items that will be automatically closed if not resurrected label Jul 25, 2022
@mirabilos
Copy link
Contributor

Yay for bots…

@stale stale bot removed the stale Inactive items that will be automatically closed if not resurrected label Jul 27, 2022
@stale
Copy link

stale bot commented Sep 26, 2022

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale Inactive items that will be automatically closed if not resurrected label Sep 26, 2022
@mirabilos
Copy link
Contributor

mirabilos commented Sep 26, 2022 via email

@stale stale bot removed the stale Inactive items that will be automatically closed if not resurrected label Sep 26, 2022
@stale
Copy link

stale bot commented Nov 25, 2022

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale Inactive items that will be automatically closed if not resurrected label Nov 25, 2022
@mirabilos
Copy link
Contributor

mirabilos commented Nov 25, 2022 via email

@stale stale bot removed the stale Inactive items that will be automatically closed if not resurrected label Nov 25, 2022
@stale
Copy link

stale bot commented Jan 24, 2023

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale Inactive items that will be automatically closed if not resurrected label Jan 24, 2023
@mirabilos
Copy link
Contributor

mirabilos commented Jan 24, 2023 via email

@stale stale bot removed the stale Inactive items that will be automatically closed if not resurrected label Jan 24, 2023
@trallnag
Copy link

trallnag commented Mar 5, 2023

@mirabilos, I admire your persistence 😆

@mathieucarbou mathieucarbou added the todo Accepted items from the backlog which can be worked on label Mar 5, 2023
@mirabilos
Copy link
Contributor

mirabilos commented Mar 5, 2023 via email

@dbwiddis
Copy link
Contributor

dbwiddis commented Mar 5, 2023

I hate the “stalebot” concept on principle (there recently was a good article about that on Fediverse, too).

Two sides to that.

First, I have this thread bookmarked as an example of what not to do with a stale bot. :-) If a repo is not really actively maintained, the bot is noise.

Second, on the opposite end, if a repo is actively maintained, there are often bug report/issues where the maintainer asks a question and it just sits there... forever. And having a bot close these old, useless issues is sometimes helpful.

Third, this is open source. Maintainers aren't paid for their work, and often end up with competing priorities on their time. This is part of the design of open source. If an issue is important to you, feel free to contribute a fix for it!

@mathieucarbou
Copy link
Owner

The project is actively maintained but new features are not actively added for the reasons mentioned above.

And I am baffled to see how many people would find something useful, but none is courageous enough to send a complete PR.

As such, the bot serves the right purpose here: if a feature is asked by 2-3 people but no one implement it, then it is not an important feature, or these people can work around it. Otherwise, if this is really a no-brainer feature, it would have been implemented because it would have bothered more people.

In the case of this issue, I think only a few people find this interesting, and amongst them, none dares contribute. That's why it is really low priority.

@mirabilos
Copy link
Contributor

mirabilos commented Mar 5, 2023 via email

@mirabilos
Copy link
Contributor

mirabilos commented Mar 5, 2023 via email

@mathieucarbou
Copy link
Owner

Can you imagine people being experienced programmers but in completely different areas and not having the headspace to begin to learn developing a Maven plugin in Java (especially when they’re not experienced in the latter)?

Totally :-) But my point still remains true ;-)

This is an OSS project. Either use it the way it works, or contribute to make it better, or do not use it at all. But don't expect maintainers or contributors to work on your needs.

@uyw4687
Copy link
Contributor

uyw4687 commented Sep 17, 2023

We are no longer using this particular feature or plugin, and have moved on for about 6 years.

@mmoayyed Hello, which one do you use instead?

@mmoayyed
Copy link

Not using maven anymore.

@uyw4687
Copy link
Contributor

uyw4687 commented Sep 17, 2023

@mmoayyed Thanks. I was wondering how to resolve this issue while using license-gradle-plugin whose core logic is this plugin.

Do you use gradle? If so, it would be great to know which one you're using to avoid this issue :)

@iansergeant
Copy link

I think that I have worked around this, at least for my needs with Java. I have added a header definitions line:

<headerDefinitions>C:/<mydirectory>/headerDefs.xml</headerDefinitions>

I then overrode the SLASHSTAR_STYLE as follows in the header definitions file:

<additionalHeaders>
  <slashstar_style>
    <firstLine>/*</firstLine>
    <beforeEachLine>  </beforeEachLine>
    <endLine>*/EOL </endLine>
    <afterEachLine> </afterEachLine>
    <!--skipLine></skipLine-->
    <firstLineDetectionPattern>(\s|\t)*/\*.*$</firstLineDetectionPattern>
    <lastLineDetectionPattern>.*\*/(\s|\t)*$</lastLineDetectionPattern>
    <allowBlankLines>true</allowBlankLines>
    <multiLine>true</multiLine>
    <padLines>false</padLines>
  </slashstar_style>
</additionalHeaders>

The key point here is the addition of EOL to <endLine> to skip a line at the end of the header. I suspect that if you really want to have a blank line at the top, the same workaround would apply to <firstLine>.

@mirabilos
Copy link
Contributor

@iansergeant I have applied that…

tglase@tglase:~/Projekte/mvnparent $ cat src/main/ancillary/myc-javapkg.xml                                     
<?xml version="1.0" encoding="UTF-8"?>
<additionalHeaders>
        <JavaPackage_style>
                <firstLine><![CDATA[EOL/*-]]></firstLine>
                <beforeEachLine><![CDATA[ * ]]></beforeEachLine>
                <endLine><![CDATA[ */EOL]]></endLine>
                <skipLine><![CDATA[^package [a-z]+(\.[a-z][a-z0-9]*)*;$]]></skipLine>
                <firstLineDetectionPattern><![CDATA[(EOL)*(\s|\t)*/\*.*$]]></firstLineDetectionPattern>
                <lastLineDetectionPattern><![CDATA[.*\*/(\s|\t)*(EOL)*]]></lastLineDetectionPattern>
                <allowBlankLines>false</allowBlankLines>
                <isMultiline>true</isMultiline>
                <padLines>false</padLines>
        </JavaPackage_style>
</additionalHeaders>

… but it sometimes leads to an extra blank line when updating the licence headers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in:core MLP core module is:feature New feature todo Accepted items from the backlog which can be worked on
Projects
None yet
Development

No branches or pull requests

8 participants