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

Latest commit

 

History

History
57 lines (44 loc) · 1.92 KB

README.md

File metadata and controls

57 lines (44 loc) · 1.92 KB

UsageContributingLicense

ProjLintTemplates

A maintained collection of templates for usage with ProjLint's file_content_template option.

Usage

In your .projlint.yml add a new file_content_template section:

  - file_content_template:
      matching:
        .swiftlint.yml:
          template_url: "https://raw.githubusercontent.com/JamitLabs/ProjLintTemplates/master/Community/App/ProjLint.stencil"
          parameters:
            rightholder: "Jamit Labs GmbH"

Note that any parameters will be replaced within the Stencil file. E.g. in the above example all {{ rightholder }} entries would be replaced. You can also use the <:key:> structure to reference any shared variables within your configuration file.

Here's a complete working example content for a .projlint.yml file:

shared_variables:
  rightholder: Jamit Labs GmbH
  project_name: NewProjectTemplate

rules:
  - file_content_template:
      matching:
        .swiftlint.yml:
          template_url: "https://raw.githubusercontent.com/JamitLabs/ProjLintTemplates/master/JamitLabs/App/SwiftLint.stencil"
          parameters:
            rightholder: <:rightholder:>
        .projlint.yml:
          template_url: "https://raw.githubusercontent.com/JamitLabs/ProjLintTemplates/master/JamitLabs/App/ProjLint.stencil"
          parameters:
            rightholder: <:rightholder:>
            project_name: <:project_name:>

Contributing

See the file CONTRIBUTING.md.

License

This library is released under the MIT License. See LICENSE for details.