django-test-migrations icon indicating copy to clipboard operation
django-test-migrations copied to clipboard

standarize django's check messages levels usage

Open skarzi opened this issue 5 years ago • 2 comments

In #91 we are introducing more Django checks and according to plans this number of checks will grown, so it's time to establish some rules of check messages levels and it's usage.

Django checks messages has following levels (they are similar to logging levels):

  • DEBUG
  • INFO
  • SUCCESS
  • WARNING
  • ERROR

Reference: https://docs.djangoproject.com/en/3.0/topics/checks/#messages

skarzi avatar Jul 24 '20 14:07 skarzi

My idea is that:

  • We should issue WARNING messages when there's something not quite right with the app (we found any kind of rule violations)
  • We should issue ERROR messages when our app cannot operate properly

This way user can control their CI level with check --fail-level= command. By default our warnings would not fail the build.

sobolevn avatar Jul 25 '20 07:07 sobolevn

Related: https://github.com/wemake-services/django-test-migrations/pull/91/files/a7f72b086d3f0076418674febc745d4626fdb5b5..4b6eeb44aa23441d3179ad3bcce76a4845078afa#r457584209

sobolevn avatar Jul 25 '20 07:07 sobolevn