Validation

com.typesafe.sbt.packager.validation.Validation
See theValidation companion class
object Validation

Attributes

Companion
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Validation.type

Members list

Type members

Types

type Validator = () => List[ValidationResult]

A validator is a function that returns a list of validation results.

A validator is a function that returns a list of validation results.

Attributes

Example

Usually a validator is a function that captures some setting or task value, e.g.

 validatePackageValidators += {
   val universalMappings = (Universal / mappings).value
   () => {
     if (universalMappings.isEmpty) List(ValidationError(...)) else List.empty
   }
 }

The validation package object contains various standard validators.

Inherited and Abstract types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Attributes

Inherited from:
Mirror

Value members

Concrete methods

def apply(validators: Seq[Validator]): Validation

Value parameters

validators

a list of validators that produce a Validation result

Attributes

Returns

aggregated result of all validator function

def runAndThrow(validators: Seq[Validator], log: Logger): Unit

Runs a list of validators and throws an exception after printing all errors and warnings with the provided logger.

Runs a list of validators and throws an exception after printing all errors and warnings with the provided logger.

Value parameters

log

used to print errors and warnings

validators

a list of validators that produce the validation result

Attributes