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

Is it possible to ignore a line ? #45

Open
nitrogene opened this issue Dec 13, 2022 · 1 comment
Open

Is it possible to ignore a line ? #45

nitrogene opened this issue Dec 13, 2022 · 1 comment

Comments

@nitrogene
Copy link

Hello,

I am working on a docker compose including mongo (among other services), and I have an issue with yamlfmt. Let's look at the following example:

  mongo:
    image: $MONGO_IMAGE:$MONGO_VERSION
    container_name: mongo
    hostname: mongo
    volumes:
      # Persistent docker volume
      - mongo-storage:/data/db:rw
    networks:
      - logging_network
    restart: 'no'

Yamlfmt turns it into:

  mongo:
    image: $MONGO_IMAGE:$MONGO_VERSION
    container_name: mongo
    hostname: mongo
    volumes:
      # Persistent docker volume
      - mongo-storage:/data/db:rw
    networks:
      - logging_network
    restart: no

Please notice that the single quotes around no are removed. But they are required. Is it possible to make yamlfmt ignore this line ?

@Corfucinas
Copy link

I also want to know this, I have a script to insert a licence and its removing it from the top of the file before '----'

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

2 participants