Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] utils/checkpackagelib: exclude two files from Config.in indentation check
@ 2017-12-18  8:43 Thomas Petazzoni
  2017-12-18 22:03 ` Yann E. MORIN
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Thomas Petazzoni @ 2017-12-18  8:43 UTC (permalink / raw)
  To: buildroot

package/x11r7/Config.in and package/kodi/Config.in do not comply with
the normal Config.in indentation rules. However, this violation of the
rule is legitimate, so let's skip them in check-package for this
specific indentation check.

This removes the last 314 remaining warnings on Config.in files.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

---
Note: I am not totally sure about this patch. Indeed package/Config.in
uses the same rule as package/{x11r7,kodi}/Config.in, but
check-package doesn't report warnings about it. Perhaps I'm missing
something in the check-package logic.
---
 utils/checkpackagelib/lib_config.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/utils/checkpackagelib/lib_config.py b/utils/checkpackagelib/lib_config.py
index 26ebb393d1..fb39182b91 100644
--- a/utils/checkpackagelib/lib_config.py
+++ b/utils/checkpackagelib/lib_config.py
@@ -133,6 +133,10 @@ class Indent(_CheckFunction):
                         text]
         elif entry in entries_that_should_not_be_indented:
             if not text.startswith(entry):
+                # two Config.in files have a special but legitimate indentation rule
+                if self.filename in [ "./package/x11r7/Config.in",
+                                      "./package/kodi/Config.in" ]:
+                    return
                 return ["{}:{}: should not be indented"
                         .format(self.filename, lineno),
                         text]
-- 
2.14.3

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2018-03-22  8:18 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-18  8:43 [Buildroot] [PATCH] utils/checkpackagelib: exclude two files from Config.in indentation check Thomas Petazzoni
2017-12-18 22:03 ` Yann E. MORIN
2017-12-19  1:57   ` Ricardo Martincoski
2017-12-19  5:33     ` Bernd Kuhls
2017-12-19  8:28   ` Thomas Petazzoni
2017-12-20 11:06     ` Yann E. MORIN
2017-12-19  1:56 ` Ricardo Martincoski
2017-12-19  8:36   ` Thomas Petazzoni
2017-12-19 23:32     ` Ricardo Martincoski
2017-12-20  8:10       ` Thomas Petazzoni
2018-03-22  3:20 ` Ricardo Martincoski
2018-03-22  8:18   ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox