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 815058018B for ; Tue, 4 Jul 2017 16:02:06 +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=3A0QeyxhB1hYtBXsn5CyCwUyQJP3N1i/DPJgcQr6Af?= =?us-ascii?q?oPdwSPr8pcbcNUDSrc9gkEXOFd2CrakV1KyO6+jJYi8p2d65qncMcZhBBVcuqP?= =?us-ascii?q?49uEgeOvODElDxN/XwbiY3T4xoXV5h+GynYwAOQJ6tL1LdrWev4jEMBx7xKRR6?= =?us-ascii?q?JvjvGo7Vks+7y/2+94fdbghMhjexe69+IAmrpgjNq8cahpdvJLwswRXTuHtIfO?= =?us-ascii?q?pWxWJsJV2Nmhv3+9m98p1+/SlOovwt78FPX7n0cKQ+VrxYES8pM3sp683xtBnM?= =?us-ascii?q?VhWA630BWWgLiBVIAgzF7BbnXpfttybxq+Rw1DWGMcDwULs5Xymp4aV2Rx/ykC?= =?us-ascii?q?oJOT43/n/KhMJzg61UvA+uqBJkzo7IfI2YLuZycr/HcN8EQ2dKQ8ZfVzZGAoO5?= =?us-ascii?q?d4YDAfYPPedEoIn9vVQOtwaxDhSsC+/1zTFEnGL906k90+QnDw7GxwIsFM8JvX?= =?us-ascii?q?TOrdX6KKcSXPuvw6nOyzXMcfxX2Tbn54TSdRAhu/6MUKt2fMHMykcvDxvIg1aM?= =?us-ascii?q?pYD/Pj6Y1f4BvmyG4+Z6SO6iiW8qpgdsqTa13MgskJPGhocNx1DE6yp5xIE1KM?= =?us-ascii?q?WiR059Z96rDpRRtyCAOIdsRcMiWW5otD47yr0Ap5G7YDAHxZc7yxLFavGKcJKE?= =?us-ascii?q?7xb+WOqLPDt1hnNodKq6hxmo8EigzuP8VtOz0FZPtidFiNjMuWwN1xHI8MeHTP?= =?us-ascii?q?198Vmu2DaOzQ/f8OZEIVo7labDMZ4u3qYwloYPsUTEBiL5hF/5jKqSdkk9/uio?= =?us-ascii?q?6v/nYqn9q5+HN450jxn+Pb40lsy+B+Q4KAkOUHKB9eSyzr2wtXH+Fb5Di/lzlq?= =?us-ascii?q?jCrLjbI94ar+i3GVx7yIEmvlyFDjym2c4U1UZBCRQNWhWBgpOjcwXUIfv4Jf65?= =?us-ascii?q?hVm8kT4twOrJaO6ySq7RJ2TOxe+yNY127FRRnVI+?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0A/BQCXn1tZ/7BbRFBcHgYMGQYMgy6gP?= =?us-ascii?q?AEBAQEBAQaZOYkoQhUBAQEBAQEBAQEBAWoogjMigwR7EyEFKIpWEbJ0i3iDJ4M?= =?us-ascii?q?FPYpFgneCMQWXKYddApN2kiuVMzUigQqBAgiFDAyCRz+JYAEBAQ?= X-IPAS-Result: =?us-ascii?q?A0A/BQCXn1tZ/7BbRFBcHgYMGQYMgy6gPAEBAQEBAQaZOYk?= =?us-ascii?q?oQhUBAQEBAQEBAQEBAWoogjMigwR7EyEFKIpWEbJ0i3iDJ4MFPYpFgneCMQWXK?= =?us-ascii?q?YddApN2kiuVMzUigQqBAgiFDAyCRz+JYAEBAQ?= X-IronPort-AV: E=Sophos;i="5.40,307,1496095200"; d="scan'208";a="230401974" 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:01:29 +0200 Received: from rich by annexia.org with local (Exim 4.84_2) (envelope-from ) id 1dSOOO-0007FY-EG for caml-list@inria.fr; Tue, 04 Jul 2017 15:01:28 +0100 Date: Tue, 4 Jul 2017 15:01:28 +0100 From: "Richard W.M. Jones" To: caml-list@inria.fr Message-ID: <20170704140128.GA18152@annexia.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) Subject: [Caml-list] OCaml code style and syntax checking 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? Rich.