Skip to content

Migration linting cannot be controlled exclusively through configuration files #167

@phillipuniverse

Description

@phillipuniverse

The usage docs says that all of the parameters can be controlled with a configuration file (pyproject.toml or .django_migration_linter.cfg) but this is not quite true. There are a handful of configs that can only be used via arguments on the command line:

  • project_root_path
  • verbosity
  • app_label
  • migration_name
  • git_commit_id
  • include_migrations_from

All of these properties make explicit references to options passed to the management command rather than to config which is read from config files. Example:

linter.lint_all_migrations(
app_label=options["app_label"],
migration_name=options["migration_name"],
git_commit_id=options["git_commit_id"],
migrations_file_path=options["include_migrations_from"],
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions