Received: from 7of9.schinagl.nl (7of9.schinagl.nl [62.251.20.244]) by nld3-dev1.alpinelinux.org (Postfix) with ESMTPS id 29D60781B26 for ; Wed, 24 Jul 2019 07:13:44 +0000 (UTC) Received: from [192.168.43.125] (unknown [89.200.35.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by 7of9.schinagl.nl (Postfix) with ESMTPSA id 74F9B123A551; Wed, 24 Jul 2019 09:13:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=schinagl.nl; s=7of9; t=1563952423; bh=gtmiuw78XuxzbJXjbwCGAx6pbrX9LdUuvtv6ekVGDFg=; h=Subject:To:Cc:References:From:Date:In-Reply-To; b=QyCIelZF91GFmJags9g1tOj4QPRE77JvTZbF+t83UBvFF3AU046rqi3xpHA5H8QUn DenFmxbOZhG1SqteX2gW1QYX6PeMxXWkOJRSSNTlaDP3Gdl/U9+2AQ39nsiIFjjpdb SRC1WsspmHl/Hj/0CnbdAamurMe3ZTxuCW/bQKpo= Subject: Re: Alpine Linux aports codestyle To: Natanael Copa Cc: alpine-devel@lists.alpinelinux.org References: <1c2e99a3-4995-296d-b6e1-6fbad8261ab8@schinagl.nl> <20190723212959.316ab849@ncopa-desktop.copa.dup.pw> From: Olliver Schinagl Message-ID: Date: Wed, 24 Jul 2019 09:13:39 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190723212959.316ab849@ncopa-desktop.copa.dup.pw> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Hey Nathanael, On 23-07-2019 21:29, Natanael Copa wrote: > On Tue, 23 Jul 2019 08:28:11 +0200 > Olliver Schinagl wrote: > >> Hey list, >> >> over the past year or so, I've started to contribute to Alpine Linux's >> aports, and have met various codestyles. To get to the bottom of what is >> 'the' Alpine Linux codestyle, I came up empty handed, there is no >> CODESTYLE.md, no search query that finds anything nor on the wiki. >> >> Now of course, the document could be hiding out of plain site, and if >> that is the case, other then saying 'make it findable', I appologize for >> even bringing anything up here. > >> As I was about to do a version bump to community/mtd-utils, I noticed >> a lot of activity on the package, a great thing!. Sadly I came to the >> realization, that in the 'default' aports workflow, the >> maintainers/contributers do not get CC-ed on changes. As I'm mostly >> only familiar with Linux, U-Boot and busybox development, I missed >> the 'get_maintainers' step, where people involved in abuild's would >> be kept in the loop. > > This can and be improved. Excellent, what did you have in mind? I suspsect a CONTRIBUTING.md would fix this. * Read codestyle * always include maintainers in the CC/invite to review. For linux (and u-boot) the get_maintainers script goes over the git log of a APKBUILD and gets the contributers. Actually, this can be easily automated. Codestyle -> linting via the CI. maintainers can also be found using the CI (parse the APKBUILD file, include maintainer via the gitlab API Getting the auther authors/contributers from the log however can cause quite some false positives, e.g. if someone goes over the entire repository and fixes some global issue (removes all cd $builddir statements) he now gets flagged for each MR. > >> Never the less, what triggered for me to address the mailing list >> however was commit 57d39405ad74 ("community/mtd-utils: adhere to >> aports code style"). As the subject already states, 'adhere to aports >> code style' is mentioned, but as mentioned earlier, I cannot seem to >> find this aforementioned code style. It should be obvious then of >> course, that when asking people to adhere to a coding style, this >> style needed to be documented (and more importantantly rationalized). >> It shouldn't needed to be mentioned, by having a guide (that can be >> checked with linters/checkers) makes life easier, for both developers >> and reviewers (passes automated code checks, no need to argue about >> style anymore). >> >> So in short, where is the style guide that everybody keeps talking >> about :) > > Its still unwritten, sorry. I guess its based on what is common for the > majority of the APKBUILDs. It is ofcourse not realistic that everyone > read all of the thousands of APKBUILDs to get how things are normally > done, so yeah, this should be fixed. > > I created an issue: https://gitlab.alpinelinux.org/alpine/aports/issues/10689 Created a MR to kick off the ball. > >> >> Thank you, >> >> Olliver >