question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Migration linting cannot be controlled exclusively through configuration files

See original GitHub issue

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:

https://github.com/3YOURMIND/django-migration-linter/blob/8cf37cd0f2bcd09485d698f9c573f19acbb946cf/django_migration_linter/management/commands/lintmigrations.py#L208-L213

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
David-Wobrockcommented, Jan 28, 2022

Okay, thanks you two for the complimentary info 👍 While I don’t necessarily agree on all points made, I think it’s easiest and most flexible to simply allow all options to be specified in the config files too. I opened a new PR with the necessary changes https://github.com/3YOURMIND/django-migration-linter/pull/191

@phillipuniverse Interesting remark about the project_root_path as a Python settings. For now, the linter only supports one settings (MIGRATION_LINTER_OVERRIDE_MAKEMIGRATIONS), but one could imagine handling also all options as Python settings if that makes sense. In a simple pattern like f"MIGRATION_LINTER_{option_key.upper()}" or f"MIGRATION_LINTER_{option_key.upper()}_OPTION". Can I let you open another issue for this specific discussion? 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configuration Files - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >
ESLint fails to load plugins when using ESLint 6.x #696 - GitHub
Failed to load plugin 'jest' declared in '--config': Cannot find module ... with ESLint today after experimenting with migration to node 12.
Read more >
Migrating and configuring Eslint with Angular 11
In this post we will walk through migrating and configuring an ... These other configuration files can be created by us or installed...
Read more >
Configuration :: RuboCop Docs
The behavior of RuboCop can be controlled via the .rubocop.yml configuration file. It makes it possible to enable/disable certain cops (checks) and to...
Read more >
VS Code ESLint extension - Visual Studio Marketplace
eslintrc configuration file. You can do this by either using the VS Code command Create ESLint configuration or by running the eslint command...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found