licensed/docs/configuration.md

93 строки
3.4 KiB
Markdown
Исходник Обычный вид История

2018-02-20 18:20:41 +03:00
# Configuration file
A configuration file specifies the details of enumerating and operating on license metadata for apps.
2021-07-11 06:44:23 +03:00
Configuration can be specified in either YML or JSON formats, with examples given in YML. The example
below describes common configuration values and their purposes. See [configuration options documentation](./configuration)
for in depth information.
2018-02-20 18:20:41 +03:00
2021-07-11 06:44:23 +03:00
Additionally, some dependency sources have their own specific configuration options. See the [source documentation](./sources) for details.
2018-10-14 09:08:26 +03:00
2018-02-20 18:20:41 +03:00
```yml
# If not set, defaults to the directory name of `source_path`
name: 'My application'
2018-10-14 09:08:26 +03:00
# Path is relative to the location of the configuration file and specifies
# the root to expand all paths from
# If not set, defaults to a git repository root
root: 'relative/path/from/configuration/file/directory'
2020-01-03 19:08:05 +03:00
# Path is relative to configuration root and specifies where cached metadata will be stored.
2018-02-20 18:20:41 +03:00
# If not set, defaults to '.licenses'
cache_path: 'relative/path/to/cache'
2018-10-14 09:08:26 +03:00
# Path is relative to configuration root and specifies the working directory when enumerating dependencies
2018-02-20 18:20:41 +03:00
# Optional for single app configuration, required when specifying multiple apps
# Defaults to current directory when running `licensed`
source_path: 'relative/path/to/source'
# Whether to take any action when records are detected in the cache paths that don't map to evaluated
# dependencies.
# Available values are:
# - 'error': treat stale cached records as errors. Notify the user and fail status checks
# - 'warn', '', unset: treat stale cached records as warnings. Notify the user but do not fail status checks
# - 'ignore': Ignore stale cached records. Do not notify the user and do not fail status checks
# Optional, when not set this defaults to 'warn' behavior
stale_records_action: 'warn'
2018-02-20 18:20:41 +03:00
# Sources of metadata
sources:
2018-03-08 12:52:42 +03:00
bower: true
2018-12-31 22:18:13 +03:00
bundler: false
2018-02-20 18:20:41 +03:00
2020-01-03 19:08:05 +03:00
# Dependencies with these licenses are allowed and will not raise errors or warnings.
# This list does not have a default value and is required for `licensed status`
# to succeed.
2018-02-20 18:20:41 +03:00
allowed:
- mit
- apache-2.0
- bsd-2-clause
- bsd-3-clause
- cc0-1.0
- isc
2018-02-20 18:20:41 +03:00
2020-01-03 19:08:05 +03:00
# These dependencies are ignored during enumeration.
# They will not be cached, and will not raise errors or warnings.
# This configuration is intended to be used for dependencies that don't need to
# be included for compliance purposes, such as other projects owned by the current
# project's owner, internal dependencies, and dependencies that aren't shipped with
# the project like test frameworks.
2018-02-20 18:20:41 +03:00
ignored:
2018-12-31 22:18:13 +03:00
bundler:
2018-02-20 18:20:41 +03:00
- some-internal-gem
bower:
- some-internal-package
2020-01-03 19:08:05 +03:00
# These dependencies have licenses not on the `allowed` list and have been reviewed.
# They will be cached and checked, but will not raise errors or warnings for a
# non-allowed license. Dependencies on this list will still raise errors if
# license text cannot be found for the dependency.
2018-02-20 18:20:41 +03:00
reviewed:
2018-12-31 22:18:13 +03:00
bundler:
2018-02-20 18:20:41 +03:00
- bcrypt-ruby
bower:
- classlist # public domain
- octicons
2023-02-07 03:22:22 +03:00
# Specify additional license terms that have been obtained from a dependency's owner
# which apply to the dependency's license
additional_terms:
2023-02-06 02:08:49 +03:00
bundler:
bcrypt-ruby:
- .licenses/amendments/bundler/bcrypt-ruby/amendment.txt
2021-07-11 06:44:23 +03:00
# A single configuration file can be used to enumerate dependencies for multiple
# projects. Each configuration is referred to as an "application" and must include
# a source path, at a minimum
2018-02-20 18:20:41 +03:00
apps:
2021-07-11 06:44:23 +03:00
- source_path: path/to/application1
- source_path: path/to/application2
2018-02-20 18:20:41 +03:00
```