Received: from mail.cmpwn.com (mail.cmpwn.com [45.56.77.53]) by nld3-dev1.alpinelinux.org (Postfix) with ESMTPS id D2BAC781F64 for ; Tue, 23 Jul 2019 14:01:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=cmpwn.com; s=cmpwn; t=1563890464; bh=3MnuWTwxzYru4Shf4tOQ5/fg7yll3rHknchTB4qsaaY=; h=To:In-Reply-To:From:Date:Subject; b=f52Xa81Cq/aLFRyghy+KSIj+d9L3pp4wQ0pV6CDk0hGPaUUlDsl0RFTaf/OUuJOt8 T8VfKfRCdgKkoM9KDOdG1QHCHwK+Fbpjll3bXnzj4HmTG6bvJpiCmBnE1ilYBoktR9 fz1wznp6aD8BMEWx4m51++2Wl+aJlO0w4/4NQzPA= Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 To: "Olliver Schinagl" , In-Reply-To: <1c2e99a3-4995-296d-b6e1-6fbad8261ab8@schinagl.nl> From: "Drew DeVault" Date: Tue, 23 Jul 2019 10:01:03 -0400 Subject: Re: Alpine Linux aports codestyle Message-Id: On Tue Jul 23, 2019 at 8:28 AM Olliver Schinagl wrote: > over the past year or so, I've started to contribute to Alpine Linux's=20 > aports, and have met various codestyles. To get to the bottom of what is= =20 > 'the' Alpine Linux codestyle, I came up empty handed, there is no=20 > CODESTYLE.md, no search query that finds anything nor on the wiki. Informally I gather that the basics are: - snake_case - Indent with a single tab - 1 blank line after the initial set of variables, then again between each function - Wrap to 80 columns - Local variables (e.g. not pkgname, options, etc) named with an underscore prefix I also generally alpha-sort when I have lots of things which can be arbitrarily ordered. When in doubt pick a couple of nice looking APKBUILDs to keep as a reference. I use this page as a reference for Python packages: https://wiki.alpinelinux.org/wiki/Python_package_policies abuild will also warn you on several common errors automatically. I think there's a second package you can install somewhere which expands the list of lintable problems, which probably ought to be merged into abuild proper. > As I was about to do a version bump to community/mtd-utils, I noticed a= =20 > lot of activity on the package, a great thing!. Sadly I came to the=20 > realization, that in the 'default' aports workflow, the=20 > maintainers/contributers do not get CC-ed on changes. As I'm mostly only= =20 > familiar with Linux, U-Boot and busybox development, I missed the=20 > 'get_maintainers' step, where people involved in abuild's would be kept= =20 > in the loop. I use the email based workflow and send patches to ~alpine/aports@lists.alpinelinux.org. When I do this I often copy/paste the Maintainer and/or Contributor lines into the email and swap them for Cc. You can get git send-email to open your editor for reviewing/editing the email by passing --annotate or setting git config --global sendemail.annotate yes.