From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5F0F2C433DF for ; Sun, 11 Oct 2020 18:47:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1E74D2173E for ; Sun, 11 Oct 2020 18:47:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727894AbgJKSrh (ORCPT ); Sun, 11 Oct 2020 14:47:37 -0400 Received: from smtprelay0152.hostedemail.com ([216.40.44.152]:36828 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727610AbgJKSrh (ORCPT ); Sun, 11 Oct 2020 14:47:37 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay04.hostedemail.com (Postfix) with ESMTP id 0A703180A7FE4; Sun, 11 Oct 2020 18:47:36 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-HE-Tag: moon91_6002c68271f4 X-Filterd-Recvd-Size: 1953 Received: from XPS-9350.home (unknown [47.151.133.149]) (Authenticated sender: joe@perches.com) by omf13.hostedemail.com (Postfix) with ESMTPA; Sun, 11 Oct 2020 18:47:35 +0000 (UTC) Message-ID: Subject: Re: git grep/sed to standardize "/* SPDX-License-Identifier: " From: Joe Perches To: Linus Torvalds Cc: LKML , Jiri Kosina Date: Sun, 11 Oct 2020 11:47:34 -0700 In-Reply-To: References: <307a7581abe24135ac243c3080d4ab9e7c044cbf.camel@perches.com> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.36.4-0ubuntu1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 2020-10-11 at 11:42 -0700, Linus Torvalds wrote: > On Tue, Oct 6, 2020 at 4:13 PM Joe Perches wrote: > > Almost all source files in the kernel use a standardized SPDX header > > at line 1 with a comment /* initiator and terminator */: > > > > /* SPDX-License-Identifier: */ > > > > $ git grep -PHn '^/\* SPDX-License-Identifier:.*\*/\s*$' | \ > > wc -l > > 17847 > > That grep pattern makes zero sense. > > Why would */ be special at all? It isn't. > > $ git grep SPDX-License-Identifier: | wc -l > 52418 > > and a *LOT* of those are shell scripts and use "#", or are C sources > and use "//" etc. > > So your "standardization" is completely pointless. Anybody who expects > that pattern just doing something fundamentally wrong, because the > pattern you want to standardize around is simply not valid. It's just a trivial grep pattern to determine if the c90 style SPDX-License-Identifier is in an individual single line comment. Almost all are.