From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A84E5158020 for ; Sat, 29 Oct 2022 05:43:30 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8688BE086A; Sat, 29 Oct 2022 05:43:28 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6C280E086A for ; Sat, 29 Oct 2022 05:43:28 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 5C618340B7E for ; Sat, 29 Oct 2022 05:43:27 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 8FC68629 for ; Sat, 29 Oct 2022 05:43:25 +0000 (UTC) From: "Arthur Zamarin" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Arthur Zamarin" Message-ID: <1667020850.d2ff093fae54ee3507a97c6d91c86fd093e46c29.arthurzam@gentoo> Subject: [gentoo-commits] proj/pkgcore/pkgcheck:master commit in: src/pkgcheck/checks/ X-VCS-Repository: proj/pkgcore/pkgcheck X-VCS-Files: src/pkgcheck/checks/codingstyle.py X-VCS-Directories: src/pkgcheck/checks/ X-VCS-Committer: arthurzam X-VCS-Committer-Name: Arthur Zamarin X-VCS-Revision: d2ff093fae54ee3507a97c6d91c86fd093e46c29 X-VCS-Branch: master Date: Sat, 29 Oct 2022 05:43:25 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: ef91a177-ada2-4be9-8b6d-16e2526884d2 X-Archives-Hash: a4d5cee3873983bb3b67a5e5cdf187b7 commit: d2ff093fae54ee3507a97c6d91c86fd093e46c29 Author: Arthur Zamarin gentoo org> AuthorDate: Sat Oct 29 05:20:50 2022 +0000 Commit: Arthur Zamarin gentoo org> CommitDate: Sat Oct 29 05:20:50 2022 +0000 URL: https://gitweb.gentoo.org/proj/pkgcore/pkgcheck.git/commit/?id=d2ff093f BetterCompressionCheck: fix false positive when fixed When the issue is fixed, we get a url which looks like "${URL}.tar.bz2", but this URL was matching for the ".tar" extension in previous regex variant. Fix this by forcing the after ".tar" a ".bz2" doesn't appear. Resolves: https://github.com/pkgcore/pkgcheck/issues/487 Signed-off-by: Arthur Zamarin gentoo.org> src/pkgcheck/checks/codingstyle.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pkgcheck/checks/codingstyle.py b/src/pkgcheck/checks/codingstyle.py index 0933c492..b6ef8c34 100644 --- a/src/pkgcheck/checks/codingstyle.py +++ b/src/pkgcheck/checks/codingstyle.py @@ -416,7 +416,7 @@ class BetterCompressionCheck(Check): known_results = frozenset([BetterCompressionUri]) REGEXPS = ( - (r'.*\b(?P(?Phttps?://[^/]*?gitlab[^/]*?/.*/-/archive/.*?/\S*)\.(?:tar\.gz|tar|zip))', + (r'.*\b(?Phttps?://[^/]*?gitlab[^/]*?/.*/-/archive/.*?/\S*\.(?:tar\.gz|tar(?!.bz2)|zip))', '.tar.bz2'), )