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

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

Open
fbiville opened this issue Dec 11, 2018 · 1 comment
Open

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

fbiville opened this issue Dec 11, 2018 · 1 comment
Labels
enhancement New feature or request
Milestone

Comments

@fbiville
Copy link
Owner

fbiville commented Dec 11, 2018

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.

@fbiville fbiville added this to the 0.1.0 milestone Dec 11, 2018
@fbiville fbiville modified the milestones: 1.0.0-M01, 1.0.0-M02 Dec 28, 2018
@fbiville fbiville added the enhancement New feature or request label Dec 28, 2018
@fbiville
Copy link
Owner Author

@fbiville fbiville modified the milestones: 1.0.0-M04, 1.0.0-M05 Dec 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant