Skip to content

bug: exclude not working at all #785

@eureka-cpu

Description

@eureka-cpu
$ taplo --version
taplo 0.9.3

This is my .taplo.toml:

[formatting]
reorder_keys = false

[[rule]]
include = ["**/Cargo.toml"]
exclude = [
  # This is an auto-generated file and should not be formatted.
  "src/my-workspace-hack/Cargo.toml",
]
keys = ["dependencies"]

[rule.formatting]
reorder_keys = true

It would seem no matter what I do (even if I exclude all toml files recursively) I cannot get it to exclude any toml files from the format check.

$ taplo fmt src/cloud-reaper-workspace-hack/Cargo.toml
 INFO taplo:format_files:load_config: found configuration file path="/home/eureka/Code/CloudScytheLabs/cloud-reaper/.taplo.toml"
 INFO taplo:format_files:collect_files: found files total=1 excluded=0 cwd="/home/eureka/Code/CloudScytheLabs/cloud-reaper"

See that 0 were excluded even though it is excluded

doing exclude = [ "**/Cargo.toml"] or any variant of excluding this file results in it being included anyway

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions