Skip to content

Quoted values unquoating #13

@malefici

Description

@malefici

Some configuration values should be quoted. Pls, take a look at this snippet:

version: '3'
services:
    mysql:
        image: mysql:latest
        environment:
            MYSQL_DATABASE: test
            MYSQL_PASSWORD: test
            # See: https://hub.docker.com/_/mysql
            MYSQL_RANDOM_ROOT_PASSWORD: 'yes'
            MYSQL_USER: test

Linter removes quoting (MYSQL_RANDOM_ROOT_PASSWORD: yes), so using this config will trigger an error services.mysql.environment.MYSQL_RANDOM_ROOT_PASSWORD contains true, which is an invalid type, it should be a string, number, or a null. This means that it is not possible to leave value type specification after this linter usage.

Also, it breaks type specification like this !!str yes.

Sorry, I am not familiar with ruamel.yaml and can not create a proper pull request. Maybe do you know how to fix it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions