Skip to content

Add Goatfile Metadata #44

@zekroTJA

Description

@zekroTJA

It should be possible to add metadata to Goatfiles (like a Goatfile Version) that is checked or taken in consideration by Goat before execution.

Format

> version = "1"
>
> [Parameters]
> param1 = "string"
> param2 = { type = "int", optional = true }
> param3 = { type = "string", default = "someString" }

The body of the header would utilize the same TOML-like format as, i.e., the Options section. Therefore, we can re-use the parsing utilities from there.

Todo's

This issue could be split in the following sub tasks.

  • Implementation of an AST (see AST #57)*
  • Implementation of the metadata section into the parser
  • Using metadata to check for required parameters
  • Using metadata to check Goatfile versions

*This step is open for discussion. It would make the whole issue way more elaborate. But we need to perform changes on the parser and this could be easily combined with the AST implementation. Also, a sort of AST could be useful for the required parameter analysis.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions