Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quoted values unquoating #13

Open
malefici opened this issue Oct 9, 2020 · 0 comments
Open

Quoted values unquoating #13

malefici opened this issue Oct 9, 2020 · 0 comments

Comments

@malefici
Copy link

malefici commented Oct 9, 2020

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant