From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yann E. MORIN Date: Mon, 18 Dec 2017 23:03:44 +0100 Subject: [Buildroot] [PATCH] utils/checkpackagelib: exclude two files from Config.in indentation check In-Reply-To: <20171218084303.12472-1-thomas.petazzoni@free-electrons.com> References: <20171218084303.12472-1-thomas.petazzoni@free-electrons.com> Message-ID: <20171218220344.GC2903@scaer> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: buildroot@busybox.net Thomas, All, On 2017-12-18 09:43 +0100, Thomas Petazzoni spake thusly: > 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. Can't we simply fix those two files to not have that unusual indentation in the first place? AFAICS, that special indentation is about the 'source' lines... Surely that does not bring much to have them indented, and they could simply be left-aligned... Regards, Yann E. MORIN. > This removes the last 314 remaining warnings on Config.in files. > > Signed-off-by: Thomas Petazzoni > > --- > 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 > > _______________________________________________ > buildroot mailing list > buildroot at busybox.net > http://lists.busybox.net/mailman/listinfo/buildroot -- .-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'