Conform
This extension generates the .conform.yaml file for configuring Conform.
It takes a simplified version of the configuration file:
- The top-level policiesentry is removed
- The typeandspecsections of the policy are removed
Instead, the plugin takes a set with the commit and license attributes (the
two valid policy types), and the value is what would typically get placed under
spec. This change reduces the overall nesting of the input.
Usage
Example input:
{
  commit = {
    header = {
      length = 89;
      imperative = true;
      case = "lower";
      invalidLastCharacters = ".";
    };
    gpg = {
      required = false;
      identity = {
        gitHubOrganization = "some-organization";
      };
    };
    conventional = {
      types = [
        "type"
      ];
      scopes = [
        "scope"
      ];
    };
  };
  license = {
    skipPaths = [
      ".git/"
      "build*/"
    ];
    allowPrecedingComments = false;
  };
}
This would produce the following .conform.yaml file:
policies:
  - spec:
      conventional:
        scopes:
          - scope
        types:
          - type
      gpg:
        identity:
          gitHubOrganization: some-organization
        required: false
      header:
        case: lower
        imperative: true
        invalidLastCharacters: .
        length: 89
    type: commit
  - spec:
      allowPrecedingComments: false
      skipPaths:
        - .git/
        - build*/
    type: license