pre-commit-hook-yamlfmt
pre-commit-hook-yamlfmt copied to clipboard
Is it possible to ignore a line ?
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 ?
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 '----'