From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 10C888018B for ; Tue, 4 Jul 2017 16:03:36 +0200 (CEST) Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=rich@annexia.org; spf=Pass smtp.mailfrom=rich@annexia.org; spf=Pass smtp.helo=postmaster@annexia.org Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of rich@annexia.org) identity=pra; client-ip=80.68.91.176; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="rich@annexia.org"; x-sender="rich@annexia.org"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of rich@annexia.org designates 80.68.91.176 as permitted sender) identity=mailfrom; client-ip=80.68.91.176; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="rich@annexia.org"; x-sender="rich@annexia.org"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of postmaster@annexia.org designates 80.68.91.176 as permitted sender) identity=helo; client-ip=80.68.91.176; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="rich@annexia.org"; x-sender="postmaster@annexia.org"; x-conformance=sidf_compatible; x-record-type="v=spf1" IronPort-PHdr: =?us-ascii?q?9a23=3AS4joiRP0HxmB2pQPwMQl6mtUPXoX/o7sNwtQ0KIM?= =?us-ascii?q?zox0LPv9rarrMEGX3/hxlliBBdydsKMbzbKO+4nbGkU4qa6bt34DdJEeHzQksu?= =?us-ascii?q?4x2zIaPcieFEfgJ+TrZSFpVO5LVVti4m3peRMNQJW2aFLduGC94iAPERvjKwV1?= =?us-ascii?q?Ov71GonPhMiryuy+4ZPebgFKiTanfb9+MAi9oBnMuMURnYZsMLs6xAHTontPde?= =?us-ascii?q?RWxGdoKkyWkh3h+Mq+/4Nt/jpJtf45+MFOTav1f6IjTbxFFzsmKHw65NfqtRbY?= =?us-ascii?q?UwSC4GYXX3gMnRpJBwjF6wz6Xov0vyDnuOdxxDWWMMvrRr0yRD+s7bpkSAXwhS?= =?us-ascii?q?kJNzA37nzZhM9+jK1UvB2uuh5wzIDPbYGJKPZzZL/Rcc8ASGZfWMtaSixPApm7?= =?us-ascii?q?b4sKF+cNM/pWr4jhqFsOtxS+HxSjD/7vxTNSgXH6x7Ax3eAmEQHAwgMgBNwCu2?= =?us-ascii?q?nTodXvNacdTeC1wbLSwjXFafNZxzj86InSfRw7pvGMR71wfNPXxEIyFA3Flk2d?= =?us-ascii?q?pI/5Mz+P1+kAsHKX4u59We61lmIqqQB8rz6yzck2kIbJnJgaylXc+CV53ok1Id?= =?us-ascii?q?q4RVZhbt6iFptfqS6bN4psTc84RGFooik6xqUHuZ69YicK1Iwqyh3DZ/CdcoWF?= =?us-ascii?q?4QjvWeKMLTtimX5oerOyiw638Ue6y+38Use00ExNripAitTMrHEN2ADT6sWcUP?= =?us-ascii?q?R9+EGh1iiA1gDS8O5IO0c0lbDUK5I52L4/ioITsVjfHi/xgEj5kLWZdkAg+uSx?= =?us-ascii?q?7+TnY67mpoOHOo9vigD+N7wuldalDeQ5NAgORWmb9v6m2L3t502qCIlN2/Y/l6?= =?us-ascii?q?2ctJHBOewaoLS4CklbyNUN8RG6Wn2c0d8YlGMLZG0DXVTPrY/vNkqEaKTiDPy/?= =?us-ascii?q?q12qljp7xvmAOafuVMaeZkPfmavsKO4uo3VXzxA+mIhS?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0ATAQCXn1tZ/7BbRFBcGwEBAQMBAQEJA?= =?us-ascii?q?QEBFgEBAQMBAQEJAQEBgy6Pe5BBAQEBAQEBBoEolgCCEYYcAoMKPxgBAQEBAQE?= =?us-ascii?q?BAQEBAWoogjMigkQBBTpPCxgJExIPBSiKVhGydItGATGDJ4MFPYUPhTaCd4IxB?= =?us-ascii?q?Z8GApN2kiuVMx84gQqBAghJhxY/iWABAQE?= X-IPAS-Result: =?us-ascii?q?A0ATAQCXn1tZ/7BbRFBcGwEBAQMBAQEJAQEBFgEBAQMBAQE?= =?us-ascii?q?JAQEBgy6Pe5BBAQEBAQEBBoEolgCCEYYcAoMKPxgBAQEBAQEBAQEBAWoogjMig?= =?us-ascii?q?kQBBTpPCxgJExIPBSiKVhGydItGATGDJ4MFPYUPhTaCd4IxBZ8GApN2kiuVMx8?= =?us-ascii?q?4gQqBAghJhxY/iWABAQE?= X-IronPort-AV: E=Sophos;i="5.40,307,1496095200"; d="scan'208";a="230402340" Received: from annexia.org ([80.68.91.176]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 04 Jul 2017 16:03:35 +0200 Received: from rich by annexia.org with local (Exim 4.84_2) (envelope-from ) id 1dSOQQ-0007Fw-8m for caml-list@inria.fr; Tue, 04 Jul 2017 15:03:34 +0100 Date: Tue, 4 Jul 2017 15:03:34 +0100 From: "Richard W.M. Jones" To: caml-list@inria.fr Message-ID: <20170704140334.GB18152@annexia.org> References: <20170704140128.GA18152@annexia.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170704140128.GA18152@annexia.org> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [Caml-list] OCaml code style and syntax checking On Tue, Jul 04, 2017 at 03:01:28PM +0100, Richard W.M. Jones wrote: > I have a need to make automated stylistic and syntax checks to > a large amount of OCaml code. The sort of rules would be: > > - Check that indentation is used, and used consistently. > > - Excessive use of parentheses where not needed. > > - Use ( .. ) instead of begin .. end. > > - Flag uses of various Obj.* and unsafe_* functions. > > It seems to me that some of these could be tested with either camlp4 > or ppx. I think if we allowed the checker to go back to the original > code (eg to see if the parser parsed as block as '(' or 'begin'), > it might be able to check all of these things. > > Anyway, before I start on it I'm wondering if anyone has ever > looked at doing this kind of thing? Now that I actually formulate the right search terms, I see that ocp-lint exists :-/ Rich.