Skip to content
This repository was archived by the owner on Jul 18, 2022. It is now read-only.
This repository was archived by the owner on Jul 18, 2022. It is now read-only.

Allow several styles to be configured for a single project #23

@fbiville

Description

@fbiville

Preferably done after #25.

Ideally, we would remain backwards-compatible and still support such configs:

{
  "headerFile": "./license-header.txt",
  "style": "SlashStar",
  "includes": [
    "**/*.go"
  ],
  "excludes": [
    "vendor/**/*",
    "mocks/**/*"
  ],
  "data": {
    "Owner": "Florent Biville (@fbiville)"
  }
}

but also allow something like several configuration groups:

{
  "groups": [
    {
      "headerFile": "./license-header-1.txt",
      "style": "SlashSlash",
      "includes": [
        "project_a/**/*.go"
      ],
      "excludes": [
        "vendor/**"
      ],
      "data": {
        "Company": "Very Important Company",
        "Team": "The A-Team of Gophers"
      }
    },
    {
      "headerFile": "./license-header-2.txt",
      "style": "SlashStar",
      "includes": [
        "project_b/**/*.scala"
      ],
      "data": {
        "Company": "Very Important Company",
        "Team": "The B-Team of Scalaists"
      }
    }
  ]
}

The use of an object is intended here to make sure future changed are easier to carry out (easier to add attribute to an object than migrate from an array to an object).

Note that if there are files effectively matched by configuration style groups, headache should fail and report the conflicting groups.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions