headroom-0.3.2.0: License Header Manager
Copyright(c) 2019-2020 Vaclav Svejcar
LicenseBSD-3-Clause
Maintainervaclav.svejcar@gmail.com
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Headroom.Ext

Description

Headroom provides extended support for selected file types, which mean not only basic management of license headers based on template files is provided, but also some additional functionality is available. For example, some extra data may be extracted from the processed source code file and made available to template via template variables (e.g. module name for Haskell source code files).

Synopsis

Documentation

extractVariables Source #

Arguments

:: FileType

type of the file

-> CtHeaderConfig

license header configuration

-> Maybe TemplateMeta

extracted metadata from corresponding template

-> Maybe (Int, Int)

license header position (startLine, endLine)

-> Text

text of the source code file

-> Variables

extracted variables

Extracts variables specific to the file type (if supported), e.g. module name for Haskell source code. Currently supported file types are:

extractTemplateMeta Source #

Arguments

:: Template t 
=> FileType

file type for which this template will be used

-> t

parsed template

-> Maybe TemplateMeta

extracted template metadata

Extracts medatata from given template for selected file type, which might be later required by the extractVariables function.