From nobody Sun Jan 07 16:51:54 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T7NWt337bz55Ph9; Sun, 7 Jan 2024 16:51:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T7NWt2bRPz4CTf; Sun, 7 Jan 2024 16:51:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704646314; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JhQMojbz0vB6JZwOPv/0SgqLIUEi5BiQBFO5eYhhSSA=; b=pMHh3JqIWgmm43ddmDBv8xUyYQXkP9JMc2lvTX9C6X1LqkkG/Jq8w1aWMyb7JQziSwtwSn eswgYdCq2ClHQ/X0TyPJ9+EvHkz8OZ6b6nUWLSkc8RBCdEn6aN70s6SlSMAXCWRz/0ybIT 5m6M0nDqYzAnv9zeoXcGXsHCnoPvG0233B4weoDJ+RpknYGZJbWOVeuITGZahwLR/5jT3m 4KRf300YCLYMRottXaaMDWQp+N8+14RO/CZYpBOxbQVN2GvEKC5ubfOz5DO5ohJYsmEFCx IOuy5i5ljE1GyTy28G+P/N40bswyKRCZQw+RO/kIzOWxAS+YCq4GTDS8ZVvpRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704646314; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JhQMojbz0vB6JZwOPv/0SgqLIUEi5BiQBFO5eYhhSSA=; b=tY4PkU3vanP/dB4VzaAKTQtBN9OLptXfcItFWRD/k8pyx1Gzm19e702lGkirzhyQmZ4nsZ hJ30M14a+HIP9CrRd5rHolLyDMxc+vH1mh7pvPcbAUkdLv+FPtIOq4YToR2+l9JzCBEx5l ZvsH2ME8PQeQ7ABQCyBl2rnrPGCmt00L5UFd5vGL0prjkz17rfF2mRAAdDEdsvyX+tkSx3 kMoRic4WU2rSkhXkSNvSHBN9gPijR98JJ6xi4y54nU3xJ56Wz/p5RdDuGLbjNOs/duTFal VzQ9k8MUfc54Etl6aLO8tj92WL2LxzHow6JC/OE+cWneC/cojCBtmNYp6hi1Uw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704646314; a=rsa-sha256; cv=none; b=FfAjlsB+RtTTkd27XeBrUdshCDJf9h/jGh5DoxhcXoS4QG5uHYjARK5fmQu+bi0FH7nniu Fe02HkUcLrjJQU9Oqrmk8ZOExqY7xE539F00MWv2UIUui7HyYCogGRSwt9XRfebUyQ7Nhp j4V0hiJiu7Us87Vc/uDoGzm5ZXWio+nwsL7emZ3WRSpl3Gv3cvV6hZ0hnVe9R51em6OAem ICDNzY2/kgOkB1/FRshX8BfInIqhqRosNb4o4YYzOogMAPRg/h1bN3F2+NA06BumJL3ToQ qvPkmwi7DdUIo11/aMGXPhoDqO99kQlfVRazHLWx9dnTculzowm6FLoWgaiSGQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4T7NWt1LKmzXpQ; Sun, 7 Jan 2024 16:51:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 407GpsLx023548; Sun, 7 Jan 2024 16:51:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 407GpsOa023545; Sun, 7 Jan 2024 16:51:54 GMT (envelope-from git) Date: Sun, 7 Jan 2024 16:51:54 GMT Message-Id: <202401071651.407GpsOa023545@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 1e8172457833 - main - checkstyle9: Remove irrelevant stuff from qemu List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1e817245783307fd30de71d9e3dc74df6ad20b05 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=1e817245783307fd30de71d9e3dc74df6ad20b05 commit 1e817245783307fd30de71d9e3dc74df6ad20b05 Author: Warner Losh AuthorDate: 2024-01-07 16:14:13 +0000 Commit: Warner Losh CommitDate: 2024-01-07 16:51:49 +0000 checkstyle9: Remove irrelevant stuff from qemu Remove some qemu project specific things we don't care about o Remove python interpreter check o Remove linux header check o Remove trace file specail treatment o Add $FreeBSD$ tag additions o Remove some experiemntal code we won't need o Remove commented out initializer code that we don't explicitly have a rule for. Sponsored by: Netflix --- tools/build/checkstyle9.pl | 64 ++-------------------------------------------- 1 file changed, 2 insertions(+), 62 deletions(-) diff --git a/tools/build/checkstyle9.pl b/tools/build/checkstyle9.pl index aadf6ee152c5..d2c6ea77868d 100755 --- a/tools/build/checkstyle9.pl +++ b/tools/build/checkstyle9.pl @@ -170,8 +170,6 @@ if ($color =~ /^always$/i) { my $dbg_values = 0; my $dbg_possible = 0; -my $dbg_type = 0; -my $dbg_attr = 0; my $dbg_adv_dcs = 0; my $dbg_adv_checking = 0; my $dbg_adv_apw = 0; @@ -1436,17 +1434,12 @@ sub process { } } -# Only allow Python 3 interpreter - if ($realline == 1 && - $line =~ /^\+#!\ *\/usr\/bin\/(?:env )?python$/) { - ERROR("please use python3 interpreter\n" . $herecurr); - } - # Accept git diff extended headers as valid patches if ($line =~ /^(?:rename|copy) (?:from|to) [\w\/\.\-]+\s*$/) { $is_patch = 1; } +# Filter out bad email addresses. if ($line =~ /^(Author|From): .*noreply.*/) { ERROR("Real email adress is needed\n" . $herecurr); } @@ -1512,9 +1505,6 @@ sub process { # ignore non-hunk lines and lines being removed next if (!$hunk_line || $line =~ /^-/); -# ignore files that are being periodically imported from Linux - next if ($realfile =~ /^(linux-headers|include\/standard-headers)\//); - #trailing whitespace if ($line =~ /^\+.*\015/) { my $herevet = "$here\n" . cat_vet($rawline) . "\n"; @@ -1536,26 +1526,6 @@ sub process { $rpt_cleaners = 1; } -# checks for trace-events files - if ($realfile =~ /trace-events$/ && $line =~ /^\+/) { - if ($rawline =~ /%[-+ 0]*#/) { - ERROR("Don't use '#' flag of printf format ('%#') in " . - "trace-events, use '0x' prefix instead\n" . $herecurr); - } else { - my $hex = - qr/%[-+ *.0-9]*([hljztL]|ll|hh)?(x|X|"\s*PRI[xX][^"]*"?)/; - - # don't consider groups splitted by [.:/ ], like 2A.20:12ab - my $tmpline = $rawline; - $tmpline =~ s/($hex[.:\/ ])+$hex//g; - - if ($tmpline =~ /(? 1 && $line =~ /^.+($Declare)/) { - ERROR("TEST: is not type ($1 is)\n". $herecurr); - } - next; - } -# TEST: allow direct testing of the attribute matcher. - if ($dbg_attr) { - if ($line =~ /^.\s*$Modifier\s*$/) { - ERROR("TEST: is attr\n" . $herecurr); - } elsif ($dbg_attr > 1 && $line =~ /^.+($Modifier)/) { - ERROR("TEST: is not attr ($1 is)\n". $herecurr); - } - next; - } - # check for initialisation to aggregates open brace on the next line if ($line =~ /^.\s*\{/ && $prevline =~ /(?:^|[^=])=\s*$/) { @@ -1928,17 +1879,6 @@ sub process { $line =~ s@//.*@@; $opline =~ s@//.*@@; -# check for global initialisers. -# if ($line =~ /^.$Type\s*$Ident\s*(?:\s+$Modifier)*\s*=\s*(0|NULL|false)\s*;/) { -# ERROR("do not initialise globals to 0 or NULL\n" . -# $herecurr); -# } -# check for static initialisers. -# if ($line =~ /\bstatic\s.*=\s*(0|NULL|false)\s*;/) { -# ERROR("do not initialise statics to 0 or NULL\n" . -# $herecurr); -# } - # * goes on variable not on type # (char*[ const]) if ($line =~ m{\($NonptrType(\s*(?:$Modifier\b\s*|\*\s*)+)\)}) {