Giter Site home page Giter Site logo

Comments (4)

gdubicki avatar gdubicki commented on July 22, 2024 1

We can start by checking if the the config is a valid YAML and provide friendly error messages with github.com/adrienverge/yamllint using a method mentioned in adrienverge/yamllint#112 .

from gitlabform.

gdubicki avatar gdubicki commented on July 22, 2024

We have moved this forward a bit in v2.9.0 thanks to switching the YAML parser from PyYAML to ruamel.yaml that by default disallows duplicate dict keys. It is also wrapped in yamlpath that promises to provide more helpful error messages.

I think that the next step will be switch to YAML 1.2 for configuration in gitlabform v3.
UPDATE: ...or not, see #340 (comment).

from gitlabform.

armingerten avatar armingerten commented on July 22, 2024

In order to move this forward, it could be considered to provide a JSON Schema that describes the basic structure of the config.yml file. Providing such schema has multiple advantages:

  • The schema can be used when running gitlabform to validate whether the config.yml is malformed. Libraries like yamale provide an implementation to validate YAML using JSON Schema (Current PyPi download count / day is ~10.000).
  • The schema can be integrated into popular IDEs (IDEA, VSCode, etc.) and used for validation, documentation and code completion.
  • When added properly to schemastore.org, IDEs automatically detect the schema and offer afore mentioned validation, documentation and code completion out of the box.

WDYT?

from gitlabform.

gdubicki avatar gdubicki commented on July 22, 2024

Closing in favor of the newer #499.

from gitlabform.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.