zavoloklom / docker-compose-linter

A command-line tool for validating and enforcing best practices in Docker Compose files.
MIT License
13 stars 1 forks source link

--fix doesn't work with errors that certain keys are already defined #9

Closed smares closed 1 month ago

smares commented 1 month ago

I tried to run the linter with --fix but it keeps failing with errors that keys were already defined, such as "links" or "expose".

Did you ever run this with a docker-compose.yml having multiple services?

zavoloklom commented 1 month ago

@smares Could you please provide a sample of docker-compose file and console output that you get?

I tested it on different compose files (eg https://github.com/zavoloklom/docker-compose-linter/blob/main/tests/mocks/docker-compose.yml), but of course I could miss something, so I really appreciate your feedback and looking forward to see more details to fix it.

zavoloklom commented 1 month ago

@smares I guess I figured out what happened here, I fixed it in v1.0.4. Feel free to reach out if it’s still not working for you and thank you for your feedback!