You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to turn every warning the linter emits into an error.
From the docs:
Optionally specify migration test codes to handle as errors. When no test code specified, all warnings are handled as errors.
But the implementation does not work when checking the 'when no test code specified' part. The problem is in this code, either this doesn't work or I don't know how to appropriately specify an empty list for this option on the command line:
I think the documentations can be improved since it's rather unclear how to specify multiple warning names in the CLI and for each of the config file formats. Having some examples would be nice.
I would like to turn every warning the linter emits into an error.
From the docs:
But the implementation does not work when checking the 'when no test code specified' part. The problem is in this code, either this doesn't work or I don't know how to appropriately specify an empty list for this option on the command line:
django-migration-linter/django_migration_linter/management/utils.py
Lines 55 to 67 in 117967a
Here are some examples and what happens in the debugger:
python manage.py lintmigrations --no-cache --warnings-as-error CREATE_INDEX CREATE_INDEX_EXCLUSIVE DROP_INDEX REINDEX
python manage.py lintmigrations --no-cache --warnings-as-error
python manage.py lintmigrations --no-cache --warnings-as-error=
(same result aspython manage.py lintmigrations --no-cache --warnings-as-error ''
)So what's the right way to get the behavior of treating all warnings as errors without passing them all individually?
The text was updated successfully, but these errors were encountered: