Message ID | 20230519121354.704395-1-carlos@redhat.com |
---|---|
Headers |
Return-Path: <libc-alpha-bounces+patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 756DF3857705 for <patchwork@sourceware.org>; Fri, 19 May 2023 12:14:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 756DF3857705 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1684498463; bh=w714gl159UhjNIvyP6zMtZA7S9csTmN62U9b/ioDHQE=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=L94zs7EuQlvNUkzPTPFF0aF6PhcHNSau7Q7TjJo4pOrQ+kna1OCPH1lT9UkTP99ch MmVPKLUpXPt8tpDJBh7CJ/1UaPZ1wkay+sVeVzmbEeZjoSag2/C0CMu6r8R7IUMR3r 33dUO9o8QaXRv/MJBYKeqWnYSFLZ9/Avsgvzf8DE= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id AFB883858D39 for <libc-alpha@sourceware.org>; Fri, 19 May 2023 12:14:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AFB883858D39 Received: from mail-yw1-f199.google.com (mail-yw1-f199.google.com [209.85.128.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-163-ZW1nJ2_OPrWiwbpr3w-bow-1; Fri, 19 May 2023 08:13:58 -0400 X-MC-Unique: ZW1nJ2_OPrWiwbpr3w-bow-1 Received: by mail-yw1-f199.google.com with SMTP id 00721157ae682-561e68fe434so17412367b3.1 for <libc-alpha@sourceware.org>; Fri, 19 May 2023 05:13:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684498437; x=1687090437; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=w714gl159UhjNIvyP6zMtZA7S9csTmN62U9b/ioDHQE=; b=Kyc0qvgT4wH1Jerd3+l3794MDdfZr70siY4IttJL/tyAWFKOZhADcCNArZJ8aB7yAZ b0582w2jYNi1pd6n6bOMnTO5O2zWNiJhvhehB0vnr5aLEtpKP7vsyQUfk4f6HAEDqn9M Q/J6KS1JiZtUhE6U2qhA//Xj34ngAR07kocCIlPT3/1bSuSsAwCerlrcfSXstyMgv5M/ 44THAl2n3dt0WKafPkjKlgM82In1XTC+ULkaw1p7b0dvn4BOjcma5PUSgiOkey+OMnzR ZPMVSX59BdLlMdFp0jR/4z4fjfscO2FLH+8b7vwotFfB4iwntWwsvidL1Ptzmrn1YyhB XdrQ== X-Gm-Message-State: AC+VfDwtkGdUb40z/LCCj9WABD9OXOr65YDvXrvCWtZiZuC0nimq30Je 41bKfSFYxggntPDBLXLkk2zX+A3Judfb6R+BfSMFV1kLg5nBWgt3KmWyvTQPSB64oQ+4UU+ndf4 /UQX0dBH/c4MBLT5zRmq+GjVgYQaMgwOq+yOPRC3TBc1bwnGYisJlkpzrTNLaQWpDc4JEBs/O1D HT5A== X-Received: by 2002:a0d:cb55:0:b0:54c:1716:b20 with SMTP id n82-20020a0dcb55000000b0054c17160b20mr1563476ywd.17.1684498437581; Fri, 19 May 2023 05:13:57 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7WtXEskOwm+4Oj2KnyLgZYJu63CZdwxt25o/HPpVH635vDRCWRJy7xgY4SKHHPp1mL9pY7ug== X-Received: by 2002:a0d:cb55:0:b0:54c:1716:b20 with SMTP id n82-20020a0dcb55000000b0054c17160b20mr1563443ywd.17.1684498437236; Fri, 19 May 2023 05:13:57 -0700 (PDT) Received: from DESKTOP-1DH6NSL.localdomain ([198.48.244.52]) by smtp.gmail.com with ESMTPSA id m129-20020a817187000000b0055a18d8479csm1110436ywc.21.2023.05.19.05.13.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 May 2023 05:13:56 -0700 (PDT) To: libc-alpha@sourceware.org, Noah Goldstein <goldstein.w.n@gmail.com>, Adhemerval Zanella <adhemerval.zanella@linaro.org>, Florian Weimer <fweimer@redhat.com> Cc: Carlos O'Donell <carlos@redhat.com> Subject: [PATCH 0/1] Add linting checks to 'make check' Date: Fri, 19 May 2023 08:13:53 -0400 Message-Id: <20230519121354.704395-1-carlos@redhat.com> X-Mailer: git-send-email 2.40.0 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list <libc-alpha.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=subscribe> From: Carlos O'Donell via Libc-alpha <libc-alpha@sourceware.org> Reply-To: Carlos O'Donell <carlos@redhat.com> Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" <libc-alpha-bounces+patchwork=sourceware.org@sourceware.org> |
Series |
Add linting checks to 'make check'
|
|
Message
Carlos O'Donell
May 19, 2023, 12:13 p.m. UTC
We have some existing linting checks in scripts/ around the specifics of the installed headers, but nothing specifically about the sources for glibc. Since this is the first time I see myself plumbing $(srcdir) down into a test, and then using it in that test, I think we should have a discussion around this patch to see if we as developers consider it acceptable to lint the Makefile format in 'make check' itself. The check needs to run the python interpreter about 200 times, but it's fairly fast and on a slow system takes ~3s. My gut feeling is that basic linting checks could go into 'make check', but anything more complicated would have to live in pre-commit CI. Deciding what is "basic" is going to have to be evaluated on an ongoing basis and with input from what developers consider too slow or onerous for 'make check'. I want to make the case here for basic linting because it provides immediate and positive feedback to new contributors of the project that they have made a mistake in writing their Makefile. This is even better than pre-commit CI linting; which you often want to run locally anyway. I don't think we should stop here. I think we should take Noah's .clang-format and hammer it into a lint for 'make check' that covers all source files that we know we want formatted a particularly way and keep expanding that. This would likely have to run in pre-commit CI, but we would keep all the test infrastructure in scripts/ or the project tree itself with a special make target. On that note, we could add a special target for this e.g. make lint, and run that in pre-commit CI. For now I'm suggesting we adopt a small Makefile linting pass in 'make check', but the options to change this in the future are open. Carlos O'Donell (1): Add lint-makefiles Makefile linting test. Makefile | 6 +++++ scripts/lint-makefiles.sh | 47 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 scripts/lint-makefiles.sh
Comments
On Fri, 19 May 2023, Carlos O'Donell via Libc-alpha wrote: > acceptable to lint the Makefile format in 'make check' itself. The check > needs to run the python interpreter about 200 times, but it's fairly > fast and on a slow system takes ~3s. My gut feeling is that basic If something is significantly slower, I'd suggest parallelizing at the makefile level (not relevant for a 3s test, but certainly helps for e.g. the conform/ tests which take quite a lot of time if run in serial but are extremely parallel).
On 5/19/23 12:55, Joseph Myers wrote: > On Fri, 19 May 2023, Carlos O'Donell via Libc-alpha wrote: > >> acceptable to lint the Makefile format in 'make check' itself. The check >> needs to run the python interpreter about 200 times, but it's fairly >> fast and on a slow system takes ~3s. My gut feeling is that basic > > If something is significantly slower, I'd suggest parallelizing at the > makefile level (not relevant for a 3s test, but certainly helps for e.g. > the conform/ tests which take quite a lot of time if run in serial but are > extremely parallel). Agreed. Source linting is in that category.