headroom-0.2.1.0: embedded/default-config.yaml
## This is the configuration file for Headroom.
## See https://github.com/vaclavsvejcar/headroom for more details.
## Defines the behaviour how to handle license headers, possible options are:
##
## - add = (default) adds license header to files with no existing header
## (same as '-a|--add-headers' command line argument)
## - drop = drops existing license header from without replacement
## (same as '-d|--drop-headers' command line argument)
## - replace = adds or replaces existing license header
## (same as '-r|--replace-headers' command line argument)
run-mode: add
## Paths to source code files (either files or directories),
## same as '-s|--source-path=PATH' command line argument (can be used multiple
## times for more than one path).
##
## NOTE: Not defined in default configuration as this options must be defined by
## the user.
# source-paths: []
## Allows to define list of regular expressions that will be matched against
## 'source-paths' and such paths will be excluded from processing. Same as
## '-e|--excluded-path=REGEX' command line argument (can be used multiple times
## for more than one path).
excluded-paths: []
## Paths to template files (either files or directories),
## same as '-t|--template-path=PATH' command line argument (can be used multiple
## times for more than one path).
##
## NOTE: Not defined in default configuration as this options must be defined by
## the user.
# template-paths: []
## Variables (key-value) to replace in templates,
## same as '-v|--variable="KEY=VALUE"' command line argument (can be used
## multiple times for more than one path).
##
## NOTE: Not defined in default configuration as this options must be defined by
## the user.
# variables: {}
## Allows to change behaviour of license header detection and placement. Such
## configuration is defined for every supported file type, where individual
## configuration keys are:
##
## - file-extensions = List of file extensions valid for given file type.
## - margin-after = Number of blank lines to put AFTER the rendered
## license header text.
## - margin-before = Number of blank lines to put BEFORE the rendered
## license header text.
## - put-after = List of regexp patterns, where the license header is
## placed AFTER the very last line matching one of the
## given regular expressions. If no match found, header
## is placed at the very beginning of the file.
## - put-before = List of regexp patterns, where the license header is
## placed BEFORE the very first line matching one of the
## given regular expressions. If no match found, header
## is placed at the very beginning of the file.
## - block-comment = Defines that the license header is rendered using the
## multi-line (block) comment syntax (such as '/* */').
## Has two mandatory fields:
## starts-with = Defines how the license header comment starts.
## ends-with = Defines how the license header comment ends.
## NOTE: cannot be used together with 'line-comment'.
## - line-comment = Defines that the license header is rendered using the
## single-line comment syntax (such as '//').
## Has one mandatory field:
## prefixed-by = Defines how the license header comment starts.
license-headers:
## C configuration
c:
file-extensions: ["c"]
margin-after: 0
margin-before: 0
put-after: []
put-before: ["^#include"]
block-comment:
starts-with: "/*"
ends-with: "*/"
## C++ configuration
cpp:
file-extensions: ["cpp"]
margin-after: 0
margin-before: 0
put-after: []
put-before: ["^#include"]
block-comment:
starts-with: "/*"
ends-with: "*/"
## CSS configuration
css:
file-extensions: ["css"]
margin-after: 0
margin-before: 0
put-after: []
put-before: ['([^\r\n,{}]+)(,(?=[^}]*{)|\s*{)']
block-comment:
starts-with: "/*"
ends-with: "*/"
## Haskell configuration
haskell:
file-extensions: ["hs"]
margin-after: 0
margin-before: 0
put-after: []
put-before: ["^module"]
block-comment:
starts-with: "{-|"
ends-with: "-}"
## HTML configuration
html:
file-extensions: ["htm", "html"]
margin-after: 0
margin-before: 0
put-after: []
put-before: ["^(<!DOCTYPE|<[a-zA-Z])"]
block-comment:
starts-with: "<!--"
ends-with: "-->"
## Java configuration
java:
file-extensions: ["java"]
margin-after: 0
margin-before: 0
put-after: []
put-before: ["^package"]
block-comment:
starts-with: "/*"
ends-with: "*/"
## JS configuration
js:
file-extensions: ["js"]
margin-after: 0
margin-before: 0
put-after: []
put-before: []
block-comment:
starts-with: "/*"
ends-with: "*/"
## Rust configuration
rust:
file-extensions: ["rs"]
margin-after: 0
margin-before: 0
put-after: []
put-before: ["^use"]
block-comment:
starts-with: "/*"
ends-with: "*/"
## Scala configuration
scala:
file-extensions: ["scala"]
margin-after: 0
margin-before: 0
put-after: []
put-before: ["^package"]
block-comment:
starts-with: "/*"
ends-with: "*/"
## Shell configuration
shell:
file-extensions: ["sh"]
margin-after: 1
margin-before: 1
put-after: ["^#!"]
put-before: []
line-comment:
prefixed-by: "#"