Skip to main content
Version: v4.5.0

Validate Stack

On This Page

This section aims to guide you in validating your Stack and in correcting parameters that do not pass validation.

About Stack Validation

Stack validation ensures that all of your Stack's configuration files are as designed.

The validation is done by the command stk-legacy validate, which removes empty folders and validates if the Stack fields were filled in correctly.

You are also free to define which files should be ignored so that they are not included in the final version of your Stack. The validation will consider the files registered in the following files:

  • .gitignore: It's the file present in a Git repository at the root of your project, where you can configure which files to ignore when pushing your changes to a remote repository.

  • .stackignore: Similar to .gitignore, present in the root of the Stack, in this file you can configure which files will be ignored in your Stack so that they are not used.

After validation, you can have a simplified or more detailed return:

  • The simplified return of the validation of a Stack presents the successes and failures of the validation.
  • The detailed return of the validation of a Stack presents each file validated and the one that was ignored.

Configure ignored files

Files are skipped before validation and tests are run. You must include in the configuration file the files that you want to ignore when you finish developing your Stack.

Populate the .gitignore and .stackignore files with the folders and files you want to be ignored. Check out the following example:

.gitignore
 # Dependencies
/node_modules

# Production
/build

# Generated files
.myreactapp
.cache-loader

# Misc
.DS_Store
.env
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*

List of validated fields

The list below presents all the validated parameters of your Stack's configuration file (the stack.yaml file and all the plugin.yaml and template.yaml files. If an error occurs when validating your Stack, check below how each field must be filled in:

description

AttributeAccepted Value
typestring
minlength0
maxlength500
requiredfalse

name

AttributeAccepted Value
typestring
minlength0
maxlength100
requiredtrue
emptyfalse
regex^([a-z][a-z0-9]*)(-[a-z0-9]+)*$

display-name

AttributeAccepted Value
typestring
minlength0
maxlength100
requiredfalse

picture

AttributeAccepted Value
typestring
minlength0
maxlength200
requiredfalse

category

AttributeAccepted Value
typestring
requiredfalse
check_withcheck_categories

compatibility

AttributeAccepted Value
typelist
requiredfalse

technologies

AttributeAccepted Value
typelist
check_withcheck_technologies
requiredfalse

about

about
AttributeAccepted Value
typestring
requiredfalse
regex.+\.md

use-cases

AttributeAccepted Value
typelist
requiredfalse
schemadict
title
AttributeAccepted Value
typestring
minlength0
maxlength200
requiredtrue
emptyfalse
content
AttributeAccepted Value
typestring
regex.+\.md
requiredtrue
emptyfalse
stackfile
AttributeAccepted Value
typestring
requiredtrue
emptyfalse
regex.+.\\(yaml|yml)

Was this page helpful?