packages feed

headroom-0.4.3.0: embedded/default-config.yaml

## This is the configuration file for Headroom.
## See https://github.com/vaclavsvejcar/headroom for more details.

## Defines with which version of Headroom this configuration is compatible.
## Headroom uses this field to detect whether your configuration doesn't need
## any manual migration steps in case that it's older than your current Headroom
## version. You don't need to touch this field unless explicitly stated in
## migration guide during upgrading Headroom to new version.
# version: ""

## 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: []

## If set to 'true', Headroom tries to detect whether any VCS (like GIT) is used
## for current project and if yes, it loads rules for ignored files and excludes
## all source paths that matches these rules.
exclude-ignored-paths: false

## 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).
variables:
  _haskell_module_copyright: "!!! INSERT HASKELL MODULE COPYRIGHT !!!"
  _haskell_module_name: "!!! INSERT HASKELL MODULE NAME !!!"
  _haskell_module_license: "!!! INSERT MODULE LICENSE !!!"
  _haskell_module_maintainer: "!!! INSERT MODULE MAINTAINER !!!"
  _haskell_module_stability: "!!! INSERT MODULE STABILITY !!!"
  _haskell_module_portability: "!!! INSERT MODULE PORTABILITY !!!"
  _haskell_module_longdesc: "!!! INSERT MODULE LONG DESCRIPTION !!!"
  _haskell_module_shortdesc: "!!! INSERT MODULE SHORT DESCRIPTION !!!"
  _java_package_name: "!!! UNKNOWN JAVA PACKAGE NAME !!!"
  _purescript_module_name: "!!! INSERT PURESCRIPT MODULE NAME !!!"

## 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-top-code    = Margin (in no. of empty lines) between generated
##                         header and code above it, but only IF header is NOT
##                         the first thing in file.
##  - margin-top-file    = Margin (in no. of empty lines) between generated
##                         header the very top of the file, but only IF header
##                         IS the first thing in file.
##  - margin-bottom-code = Margin (in no. of empty lines) between generated
##                         header and code below it, but only IF header is NOT
##                         the last thing in file.
##  - margin-bottom-file = Margin (in no. of empty lines) between generated
##                         header the very end of the file, but only IF header
##                         IS the last thing in file.
##  - 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.
##                           Expects valid regular expression.
##      ends-with          = Defines how the license header comment ends.
##                           Expects valid regular expression.
##                         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.
##                           Expects valid regular expression.
license-headers:
  ## C configuration
  c:
    file-extensions: ["c"]
    margin-top-code: 0
    margin-top-file: 0
    margin-bottom-code: 0
    margin-bottom-file: 0
    put-after: []
    put-before: ["^#include"]
    block-comment:
      starts-with: ^\/\*
      ends-with: \*\/$

  ## C++ configuration
  cpp:
    file-extensions: ["cpp"]
    margin-top-code: 0
    margin-top-file: 0
    margin-bottom-code: 0
    margin-bottom-file: 0
    put-after: []
    put-before: ["^#include"]
    block-comment:
      starts-with: ^\/\*
      ends-with: \*\/$

  ## CSS configuration
  css:
    file-extensions: ["css"]
    margin-top-code: 0
    margin-top-file: 0
    margin-bottom-code: 0
    margin-bottom-file: 0
    put-after: []
    put-before: ['([^\r\n,{}]+)(,(?=[^}]*{)|\s*{)']
    block-comment:
      starts-with: ^\/\*
      ends-with: \*\/$

  ## Dart configuration
  dart:
    file-extensions: ["dart"]
    margin-top-code: 0
    margin-top-file: 0
    margin-bottom-code: 0
    margin-bottom-file: 0
    put-after: []
    put-before: []
    line-comment:
      prefixed-by: ^\/\/

  ## Go configuration
  go:
    file-extensions: ["go"]
    margin-top-code: 0
    margin-top-file: 0
    margin-bottom-code: 0
    margin-bottom-file: 0
    put-after: []
    put-before: []
    line-comment:
      prefixed-by: ^\/\/

  ## Haskell configuration
  haskell:
    file-extensions: ["hs"]
    margin-top-code: 0
    margin-top-file: 0
    margin-bottom-code: 0
    margin-bottom-file: 0
    put-after: []
    put-before: ["^module"]
    block-comment:
      starts-with: ^{-\|
      ends-with: (?<!#)-}$

  ## HTML configuration
  html:
    file-extensions: ["htm", "html"]
    margin-top-code: 0
    margin-top-file: 0
    margin-bottom-code: 0
    margin-bottom-file: 0
    put-after: []
    put-before: ["^(<!DOCTYPE|<[a-zA-Z])"]
    block-comment:
      starts-with: ^<!--
      ends-with: -->$

  ## Java configuration
  java:
    file-extensions: ["java"]
    margin-top-code: 0
    margin-top-file: 0
    margin-bottom-code: 0
    margin-bottom-file: 0
    put-after: []
    put-before: ["^package"]
    block-comment:
      starts-with: ^\/\*
      ends-with: \*\/$

  ## JS configuration
  js:
    file-extensions: ["js"]
    margin-top-code: 0
    margin-top-file: 0
    margin-bottom-code: 0
    margin-bottom-file: 0
    put-after: []
    put-before: []
    block-comment:
      starts-with: ^\/\*
      ends-with: \*\/$

  ## Kotlin configuration
  kotlin:
    file-extensions: ["kt"]
    margin-top-code: 0
    margin-top-file: 0
    margin-bottom-code: 0
    margin-bottom-file: 0
    put-after: []
    put-before: ["^package"]
    block-comment:
      starts-with: ^\/\*
      ends-with: \*\/$

  ## PHP configuration
  php:
    file-extensions: ["php"]
    margin-top-code: 0
    margin-top-file: 0
    margin-bottom-code: 0
    margin-bottom-file: 0
    put-after: []
    put-before: []
    block-comment:
      starts-with: ^\/\*\*
      ends-with: \*\/$

  ## PureScript configuration
  purescript:
    file-extensions: ["purs"]
    margin-top-code: 0
    margin-top-file: 0
    margin-bottom-code: 0
    margin-bottom-file: 0
    put-after: []
    put-before: ["^module"]
    line-comment:
      prefixed-by: ^--

  ## Rust configuration
  rust:
    file-extensions: ["rs"]
    margin-top-code: 0
    margin-top-file: 0
    margin-bottom-code: 0
    margin-bottom-file: 0
    put-after: []
    put-before: ["^use"]
    block-comment:
      starts-with: ^\/\*
      ends-with: \*\/$

  ## Scala configuration
  scala:
    file-extensions: ["scala"]
    margin-top-code: 0
    margin-top-file: 0
    margin-bottom-code: 0
    margin-bottom-file: 0
    put-after: []
    put-before: ["^package"]
    block-comment:
      starts-with: ^\/\*
      ends-with: \*\/$

  ## Shell configuration
  shell:
    file-extensions: ["sh"]
    margin-top-code: 1
    margin-top-file: 0
    margin-bottom-code: 1
    margin-bottom-file: 0
    put-after: ["^#!"]
    put-before: []
    line-comment:
      prefixed-by: ^#

## Configuration for post-processing functions. These functions
## allows to modify/enhance already rendered license headers, e.g. update years
## in copyright statements, etc. Each function can be enabled/disabled using the
## 'enabled' key and eventually customized using the 'config' key.
post-process:
  ## Post-processing function that updates years in copyright statements in
  ## rendered license header. If you need to update copyright year only for
  ## selected author(s), define them in 'selected-authors-only' key, otherwise
  ## ommit/comment out this key completely and all copyright statements will be
  ## updated.
  update-copyright:
    enabled: false
    config:
      ## If used, updates copyright statements of selected authors only. You can
      ## not only use list of concrete names, but also any variable defined in
      ## 'variables' section.
      # selected-authors-only: ["John Smith"]
      # selected-authors-only: ["{{ author }}"]