From 07943d35ea2cad3090891d99837c622d1f3d8aed Mon Sep 17 00:00:00 2001 From: =?utf8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Tue, 8 Oct 2019 10:38:29 +0100 Subject: [PATCH] build: comment on why we're not adopting certain flake8 rules MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Simplify the list of ignored warnings now that we only have two left, and document why we're not honouring them. Signed-off-by: Daniel P. Berrangé --- build-aux/syntax-check.mk | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/build-aux/syntax-check.mk b/build-aux/syntax-check.mk index 4427c592a6..427f12fd24 100644 --- a/build-aux/syntax-check.mk +++ b/build-aux/syntax-check.mk @@ -882,13 +882,17 @@ sc_require_enum_last_marker: { echo '$(ME): enum impl needs _LAST marker on second line' 1>&2; \ exit 1; } || : -# Validate many python style rules -FLAKE8_LINE_LENGTH = E501 -FLAKE8_WARNINGS = W504 - -FLAKE8_IGNORE = $(FLAKE8_LINE_LENGTH),$\ - $(FLAKE8_WARNINGS) \ - $(NULL) +# We're intentionally ignoring a few warnings +# +# E501: Force breaking lines at < 80 characters results in +# some really unnatural code formatting which harms +# readability. +# +# W504: Knuth code style requires the operators "or" and "and" etc +# to be at the start of line in a multi-line conditional. +# This the opposite to what is normal libvirt practice. +# +FLAKE8_IGNORE = E501,W504 sc_flake8: @if [ -n "$(FLAKE8)" ]; then \ -- 2.47.2