1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# Configuration for Lichen, a tool for managing licenses
# This file allows you to specify global settings and per-license configurations.
# ▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰ #
# Global Configuration #
# ▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰ #
# When applying license headers to files, prefer using block comments if the
# file type supports them. If set to false, line comments are preferred.
# If a preferred comment style is not available for a file type, the other
# style will be used as a fallback.
# Possible values: true, false
# Default: Not set, behavior depends on application logic (likely line comments)
# prefer_block = true
# Controls the behavior when multiple licenses are configured to apply to
# the same file.
# - true: Conflicting licenses will be merged into a single header (if possible)
# or the last specified license will replace previous ones. Warnings may be
# issued.
# - false: The incoming license will overrite the existing.
# Default: false
# multiple = true
# A list of regular expressions. Any file path that matches *any* of these
# regular expressions will be excluded from license header application,
# regardless of any per-license 'targets' configuration. This is useful for
# excluding common ignore patterns or specific files/directories globally.
# Examples:
# - "\\.gitignore": Excludes all .gitignore files.
# - ".*lock": Excludes files ending with "lock" (e.g., Cargo.lock).
# - "\\.git/.*": Excludes everything inside the .git directory.
# - "README.*": Excludes files starting with "README".
# - ".*\\.(md|rst|txt)": Excludes common documentation files.
# Default: Empty list.
= [
"\\.gitignore",
".*lock",
"\\.git/.*",
"\\.licensure\\.yml",
"README.*",
"LICENSE.*",
".*\\.(md|rst|txt)",
"Cargo.toml",
".*\\.github/.*",
]
# If set to true, ignore entries found in .gitignore files or exlclude patterns when determining
# which files to process. Files listed in .gitignore will be processed if
# they are not otherwise excluded by the global or per-license 'exclude'
# rules, or included by per-license 'targets'.
# If set to false (the default behavior), files ignored by .gitignore and exclude patterns will
# also be ignored by Lichen.
# Possible values: true, false
# Default: false
# all = true
# ▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰ #
# Per-License Configuration #
# ▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰ #
# [[license]] blocks define configurations for specific licenses.
# Each block specifies which files a license should apply to,
# the license identifier, and optional author information.
[[]]
# A regular expression. Files matching this regex will be excluded *for this
# specific license*, even if they are included by the 'targets' for this
# license. This provides fine-grained exclusion control within a license block.
# Example: exclude = "tests/.*" # Excludes files in the tests directory for this license
# Default: No exclusion for this license.
# exclude = "some/pattern/to/exclude"
# A list of file paths or directory paths. This license will only be
# considered for files found within these paths. If left empty, this license
# can potentially apply to any file not excluded globally or by the license's
# 'exclude' pattern.
# Paths can be relative to the configuration file or absolute.
# Examples:
# targets = ["src/", "tests/main.rs"]
# targets = ["/path/to/specific/directory"]
# Default: Current directory
= ["."]
# The SPDX identifier for the license. This is a mandatory field.
# Refer to the SPDX License List for valid identifiers:
# https://spdx.org/licenses/
= "MIT"
# The date to use in the license header. If not provided, the current year
# will likely be used by default by the application logic.
# Format: "YYYY-MM-DD"
# Example: date = "2023-10-27"
# Default: Not set, Uses the current year.
# date = "2023-10-27"
# A list of authors to include in the license header. Each author can have a
# name and an optional email address.
# If left empty, no author information will be included for this license header,
# unless the license text itself hardcodes it.
# Default: Empty list of authors.
= [
{ = "Core Contributor", = "core@example.com" },
{ = "Another Contributor" }, # Email is optional
]
# You can add more [[license]] blocks for other licenses and their respective
# configurations.
# [[license]]
# targets = ["src/cli/"]
# id = "Apache-2.0"
# authors = [
# { name = "CLI Developer" }
# ]
# [[license]]
# targets = ["examples/"]
# id = "GPL-3.0-or-later"
# date = "2024-01-01"