From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Filipp Gunbin Newsgroups: gmane.emacs.devel Subject: Re: Review request (compilation-error-regexp-alist-alist) Date: Thu, 31 Oct 2019 21:28:25 +0300 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="183281"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (darwin) Cc: Stefan Monnier To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 31 19:29:39 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iQFCU-000lX9-0i for ged-emacs-devel@m.gmane.org; Thu, 31 Oct 2019 19:29:38 +0100 Original-Received: from localhost ([::1]:53310 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iQFCS-0006O2-2c for ged-emacs-devel@m.gmane.org; Thu, 31 Oct 2019 14:29:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58546) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iQFBP-0006Ng-JV for emacs-devel@gnu.org; Thu, 31 Oct 2019 14:28:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iQFBO-0008R0-0X for emacs-devel@gnu.org; Thu, 31 Oct 2019 14:28:31 -0400 Original-Received: from out4-smtp.messagingengine.com ([66.111.4.28]:35337) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iQFBN-0008Qh-NC for emacs-devel@gnu.org; Thu, 31 Oct 2019 14:28:29 -0400 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 3C8BF201E3; Thu, 31 Oct 2019 14:28:28 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Thu, 31 Oct 2019 14:28:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.fm; h= from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; s=fm1; bh=Fz2d7J5WxBB/i2Djl+gXGlx9Yo esRwBrNtBucqU8Wkk=; b=j4mU2+j+cbDisHtywTWceJ9cVLY8jNoTqJHGt9+63o 9OIeIqHQvsrAVTy38Z/Z+r90of+oaTP/snki+TJwnA635Q3VJMEWQSQzR3YMcqeM Ixb6DlLn3WIOhZRyCZGoTgFrdo/ZVga+3rwqvkr6n03SSnMocd9y9ucQdjKoPXSY 2Z0c+wns227MAAL52bbPY4/QaX3LlPXNENoV4E68Iyr0g10wYd2SaHDvEggFGWWZ DKj5dzmHSkK91zX/lTEESIPiwWKKVNZMhmif5O0/QuDESRGfOjVv0YUFOdfIFg7L hOqIQEY4oAmzZc6WBo7SInCfE/pmYnNfPCYoE6E1KKCA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=Fz2d7J 5WxBB/i2Djl+gXGlx9YoesRwBrNtBucqU8Wkk=; b=fo6EP/ygFndiUZr5u+McJx E+hzV6RERJnx4gL9wN8gg/XHkIWC0X/iKyRn8+VTyzDVuPBru6mX+6jSpO3ITiYa SZTSJERElpDw0f16lkm6ST0CgSlEoPrY2eeBAiVF8gu+/9OE5nTJaLYJLNTPEmVO orfBQBAk4++W+2yu92Fs6MBjGdFygjNQlf0RgFwHiWh0LxrZxkF6wliLjRrPEuv+ /NMYCQlQU5BVVNPTH0ksVFksxHeCAqkc71GRq1JmvX3Rhb9KDhPyAxhrr4FPWEvs rz/Y7kq9GXMC8Bb5pNLr23w2ocBMmujXemHgL6AWAbNMGRR+rEN02OxWle8UXb3A == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedruddthedgudduudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffujghffgffkfggtgesthdtredttdertdenucfhrhhomhephfhilhhi phhpucfiuhhnsghinhcuoehfghhunhgsihhnsehfrghsthhmrghilhdrfhhmqeenucffoh hmrghinheprghprggthhgvrdhorhhgnecukfhppedukeehrdefvddrieekrddufeehnecu rfgrrhgrmhepmhgrihhlfhhrohhmpehfghhunhgsihhnsehfrghsthhmrghilhdrfhhmne cuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Original-Received: from fgunbin.local (unknown [185.32.68.135]) by mail.messagingengine.com (Postfix) with ESMTPA id 36D9D8005A; Thu, 31 Oct 2019 14:28:27 -0400 (EDT) In-Reply-To: (Filipp Gunbin's message of "Tue, 29 Oct 2019 23:08:20 +0300") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.111.4.28 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:241676 Archived-At: Please review one more patch. When gradle invokes ant tasks, the output seems to be like from plain ant. This patch makes ant regexp more lax: - Accept filenames that may occur on Cygwin, like c:/test (in addition to c:\test) - Accept optional additional severity level after task name. Checkstyle - a popular ant task - outputs its own severity level. I'd be grateful if someone could test it on Windows/Cygwin. I used to be a Cygwin user, but now don't have access to a Windows machine. Thanks. diff --git a/etc/compilation.txt b/etc/compilation.txt index 4a4a318d03..7cd33bbd7a 100644 --- a/etc/compilation.txt +++ b/etc/compilation.txt @@ -49,10 +49,11 @@ The regexps found on http://ant.apache.org/faq.html, and since integrated in both Emacsen, were hairy. The extra two numbers for jikes are the ending line and ending column. - [javac] /src/DataBaseTestCase.java:27: unreported exception ... - [javac] /src/DataBaseTestCase.java:49: warning: finally clause cannot complete normally - [jikes] foo.java:3:5:7:9: blah blah - [javadoc] c:\MyProject\Polynomial.java:560: error: unknown tag: math + [javac] /src/DataBaseTestCase.java:27: unreported exception ... + [javac] /src/DataBaseTestCase.java:49: warning: finally clause cannot complete normally + [jikes] foo.java:3:5:7:9: blah blah + [javadoc] c:\MyProject\Polynomial.java:560: error: unknown tag: math + [checkstyle] [ERROR] /src/Test.java:38: warning: foo: bar * Bash v2 diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index b0bb728de0..f412dbcd54 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -181,9 +181,12 @@ compilation-error-regexp-alist-alist (aix " in line \\([0-9]+\\) of file \\([^ \n]+[^. \n]\\)\\.? " 2 1) + ;; Checkstyle task may report its own severity level: "[checkstyle] [ERROR] ..." + ;; (see AuditEventDefaultFormatter.java in checkstyle sources). (ant - "^[ \t]*\\[[^] \n]+\\][ \t]*\\(\\(?:[A-Za-z]:\\\\\\)?[^: \n]+\\):\\([0-9]+\\):\\(?:\\([0-9]+\\):\\([0-9]+\\):\\([0-9]+\\):\\)?\ -\\( warning\\)?" 1 (2 . 4) (3 . 5) (6)) + "^[ \t]*\\(?:\\[[^] \n]+\\][ \t]*\\)\\{1,2\\}\\(\\(?:[A-Za-z]:\\)?[^: \n]+\\):\ +\\([0-9]+\\):\\(?:\\([0-9]+\\):\\([0-9]+\\):\\([0-9]+\\):\\)?\\( warning\\)?" + 1 (2 . 4) (3 . 5) (6)) (bash "^\\([^: \n\t]+\\): line \\([0-9]+\\):" 1 2) diff --git a/test/lisp/progmodes/compile-tests.el b/test/lisp/progmodes/compile-tests.el index e38c31dd0a..4c2ce83dde 100644 --- a/test/lisp/progmodes/compile-tests.el +++ b/test/lisp/progmodes/compile-tests.el @@ -55,11 +55,19 @@ compile-tests--test-regexps-data 25 nil 8 "errors.c") ;; ant ("[javac] /src/DataBaseTestCase.java:27: unreported exception ..." - 13 nil 27 "/src/DataBaseTestCase.java") + 13 nil 27 "/src/DataBaseTestCase.java" 2) ("[javac] /src/DataBaseTestCase.java:49: warning: finally clause cannot complete normally" - 13 nil 49 "/src/DataBaseTestCase.java") + 13 nil 49 "/src/DataBaseTestCase.java" 1) ("[jikes] foo.java:3:5:7:9: blah blah" - 14 (5 . 10) (3 . 7) "foo.java") + 14 (5 . 10) (3 . 7) "foo.java" 2) + ("[javac] c:/cygwin/Test.java:12: error: foo: bar" + 9 nil 12 "c:/cygwin/Test.java" 2) + ("[javac] c:\\cygwin\\Test.java:87: error: foo: bar" + 9 nil 87 "c:\\cygwin\\Test.java" 2) + ;; Checkstyle error, but ant reports a warning (note additional + ;; severity level after task name) + ("[checkstyle] [ERROR] /src/Test.java:38: warning: foo" + 22 nil 38 "/src/Test.java" 1) ;; bash ("a.sh: line 1: ls-l: command not found" 1 nil 1 "a.sh") @@ -420,8 +428,8 @@ compile--test-error-line (compilation-num-warnings-found 0) (compilation-num-infos-found 0)) (mapc #'compile--test-error-line compile-tests--test-regexps-data) - (should (eq compilation-num-errors-found 90)) - (should (eq compilation-num-warnings-found 35)) + (should (eq compilation-num-errors-found 92)) + (should (eq compilation-num-warnings-found 36)) (should (eq compilation-num-infos-found 26))))) (ert-deftest compile-test-grep-regexps ()