Skip to content

--fix argument doesn't work in v3.1.0 #8

@Neutronlul

Description

@Neutronlul

Version

v3.1.0

Command used to run

pre-commit run --all-files

Optional configuration (if different from the default)

pre-commit hook

repos:
  - repo: https://github.com/docker-compose-linter/pre-commit-dclint
    rev: v3.1.0  # Matches the dclint version, use the sha or tag you want to point at
    hooks:
      - id: dclint
        # Optional: regex override for compose files
        files: '^(?:.*/)?(?:docker-)?compose\.ya?ml$'
        # Optional: enable autofix on commit
        args: [ --fix ]

.dclintrc

rules:
  service-image-require-explicit-tag: 1
  require-project-name-field: 0
  no-unbound-port-interfaces: 1

Description

After updating from v3.0.0 to v3.1.0, I noticed that dclint wasn't auto-fixing any issues. It seems like it's ignoring the --fix argument, as other arguments (--fix-dry-run for example) work just fine. Additionally, it'll print this message:

0 errors and 1 warnings potentially fixable with the `--fix` option.

It doesn't look like the argument has changed between the versions, and running it outside of pre-commit works as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions