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

Auto detect type of extension-less files #127

Closed
hannesd opened this issue Jun 12, 2017 · 4 comments
Closed

Auto detect type of extension-less files #127

hannesd opened this issue Jun 12, 2017 · 4 comments
Labels
in:core MLP core module is:feature New feature stale Inactive items that will be automatically closed if not resurrected

Comments

@hannesd
Copy link

hannesd commented Jun 12, 2017

I'd like to adhere to https://google.github.io/styleguide/shell.xml which expects bash files to not have any extension. Currently I am not aware of a configuration option that would allow the license-maven-plugin to correctly deal with this situation.

My suggestion would be to add a boolean option "autoDetect" which, if set to true, will try to find some magic line within the first min(n lines, m bytes) of an extension-less file (unless the whole filename matches an extension or the file is ignored). By "magic line" I mean stuff like "#!/bin/bash".

There would have to be another option like "mapping" (e.g. autoDetectMapping) which allows the user to specify regular expressions that match the magic line, e.g.: <autoDetectMappings><autoDetectMapping><search>#!/bin/bash</search><style>SCRIPT_STYLE</style></autoDetectMapping></autoDetectMappings>

Would there be interest in such a feature? If so, I'd like to give it a try.

@ljacomet
Copy link

ljacomet commented Dec 6, 2017

I second this, adding a different twist to it. In Java projects, you end up having ServiceLoader files under META-INF/services/com.service.class.Name and it would be great to have some support for handling these as well.

@ilooner
Copy link

ilooner commented Apr 11, 2018

+1 would be very useful. Need it for my script files.

@mathieucarbou mathieucarbou added is:enhancement Enhancement to an existing feature todo Accepted items from the backlog which can be worked on labels Feb 6, 2019
@mathieucarbou
Copy link
Owner

in relation to #204

@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
@stale stale bot closed this as completed Nov 14, 2021
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 stale Inactive items that will be automatically closed if not resurrected
Projects
None yet
Development

No branches or pull requests

4 participants