From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 308 invoked by alias); 15 Jun 2011 11:56:09 -0000 Received: (qmail 300 invoked by uid 22791); 15 Jun 2011 11:56:09 -0000 X-SWARE-Spam-Status: No, hits=-6.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 15 Jun 2011 11:55:49 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p5FBtnf5013271 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 15 Jun 2011 07:55:49 -0400 Received: from localhost.localdomain (ovpn-113-70.phx2.redhat.com [10.3.113.70]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p5FBtl6c025217 for ; Wed, 15 Jun 2011 07:55:48 -0400 From: Phil Muldoon To: gdb@sourceware.org Subject: ARI/Commit rules Reply-to: pmuldoon@redhat.com X-URL: http://www.redhat.com Date: Wed, 15 Jun 2011 11:56:00 -0000 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2011-06/txt/msg00104.txt.bz2 I was writing a patch today, and I once again arrived at the: "Should I use X or Y for this operation" dilemma. There are a lot of unwritten rules about programming usage in GDB (See ARI mails), and sometimes maintainers don't catch them. This is inevitable with a project this size and age. I have come to fear the post-commit ARI warnings ;) This lead me to think, is it possible to distil this post-commit hook script to a user installable script somewhere? If GDB used git as the primary repository we could just make it a pre-commit hook, and a user script would not be needed. But as GDB uses CVS I do not think this is possible. This would help ease the reviewing load. We could put a link to the script in the contributors guide, and a "RUN THIS FIRST" preamble. Also we could perhaps encode some formatting rules in there as well. Blank line after variable decl, two spaces after a period, space in-between function and brackets, etc etc. These nits always trip me up. What do you think? Cheers Phil