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

License header URL support #1093

Closed
bpayne55 opened this issue Jan 13, 2022 · 1 comment
Closed

License header URL support #1093

bpayne55 opened this issue Jan 13, 2022 · 1 comment
Labels

Comments

@bpayne55
Copy link

bpayne55 commented Jan 13, 2022

A group can have multiple projects with the same license header. Is it possible to support a link to the header text? This way, the license header doesn't need to be checked into every repository. It can be hosted in one place.

I believe the place the change would happen would be here, which might be fairly straightforward.

private String readFileOrContent(FormatterStepConfig config) throws IOException {
if (content != null) {
return content;
} else {
byte[] raw = Files.readAllBytes(config.getFileLocator().locateFile(file).toPath());
return new String(raw, config.getEncoding());
}
}

@nedtwigg
Copy link
Member

I strongly recommend blowdryer for this. There are lots of places where Spotless (and other plugins) has a file as an input, and people want to pass a URL, here's another example.

We aren't going to merge support for URLs directly into Spotless, because that is best handled at a different level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants