Skip to content

License header URL support #1093

Closed
Closed

Description

@bpayne55

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());
}
}

Activity

  1. nedtwigg commented on Jan 13, 2022

    @nedtwigg
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions