Skip to content

[Bug Report] Behaviour of enforce_dependencies: key missing #319

@gmcgibbon

Description

@gmcgibbon

Description
Without enforce_dependencies: present in a package config, it is assumed that dependency enforcement is false. I think this is a bug because the key should be required. You can turn off dependency enforcement if you want, but the package YAML should explicitly do so. It makes it easier to turn on later, and to have a more readable config file.

Since dependency enforcement is Packwerk's only flagship check now, I don't know why you wouldn't want to use it eventually.

To Reproduce
Create a package.yml without enforce_dependencies and run bin/packwerk validate. This passes, and Packwerk registers this as being disabled / false.

Expected Behaviour
Validation fails and asks for the ket to exist, or the default is true.

Screenshots
If applicable, add screenshots to help explain your problem.

Version Information

  • Packwerk: 3.0 / edge
  • Ruby 3.2.1

Additional Context
I think we want to make the key required. It makes the most sense to me. All checker keys should likely be made required.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions