Return-Path: X-Original-To: apmail-mesos-dev-archive@www.apache.org Delivered-To: apmail-mesos-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 45951115B5 for ; Mon, 5 May 2014 19:03:17 +0000 (UTC) Received: (qmail 62065 invoked by uid 500); 5 May 2014 19:03:15 -0000 Delivered-To: apmail-mesos-dev-archive@mesos.apache.org Received: (qmail 62014 invoked by uid 500); 5 May 2014 19:03:15 -0000 Mailing-List: contact dev-help@mesos.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@mesos.apache.org Delivered-To: mailing list dev@mesos.apache.org Received: (qmail 62005 invoked by uid 99); 5 May 2014 19:03:15 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 May 2014 19:03:15 +0000 Date: Mon, 5 May 2014 19:03:15 +0000 (UTC) From: "Vinod Kone (JIRA)" To: dev@mesos.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (MESOS-1291) Use clang-format to automatically format code to style MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/MESOS-1291?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13989851#comment-13989851 ] Vinod Kone commented on MESOS-1291: ----------------------------------- +1. Integration into code editors and auto-formatting sounds cool. > Use clang-format to automatically format code to style > ------------------------------------------------------ > > Key: MESOS-1291 > URL: https://issues.apache.org/jira/browse/MESOS-1291 > Project: Mesos > Issue Type: Improvement > Reporter: Dominic Hamon > Labels: style > > Instead of relying on a script to check and report style errors, we should move to a workflow that allows people to write code how they feel comfortable and then automatically format it to conform to our style guide. > The Chromium style from clang-format (http://clang.llvm.org/docs/ClangFormat.html) is very close to our style except for the dropped braces on class, struct, and function definitions, and two lines of whitespace between method definitions outside a class. As such, we should consider adopting clang-format and patching it to include a Mesos style variant. > It can be run as part of post-reviews or as a git commit hook, or manually from within editors. -- This message was sent by Atlassian JIRA (v6.2#6252)