Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-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 E5133D288 for ; Mon, 24 Sep 2012 17:27:08 +0000 (UTC) Received: (qmail 5197 invoked by uid 500); 24 Sep 2012 17:27:07 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 5142 invoked by uid 500); 24 Sep 2012 17:27:07 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 5134 invoked by uid 99); 24 Sep 2012 17:27:07 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Sep 2012 17:27:07 +0000 Date: Tue, 25 Sep 2012 04:27:07 +1100 (NCT) From: "Robert Muir (JIRA)" To: dev@lucene.apache.org Message-ID: <728544198.117393.1348507627753.JavaMail.jiratomcat@arcas> In-Reply-To: <2018753967.100580.1348104967765.JavaMail.jiratomcat@arcas> Subject: [jira] [Commented] (LUCENE-4409) implement javadocs linting with eclipse ecj compiler 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/LUCENE-4409?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13461928#comment-13461928 ] Robert Muir commented on LUCENE-4409: ------------------------------------- +1, thanks for cleaning up. taskname is cool, i didn't like the log output but didnt know about this. > implement javadocs linting with eclipse ecj compiler > ---------------------------------------------------- > > Key: LUCENE-4409 > URL: https://issues.apache.org/jira/browse/LUCENE-4409 > Project: Lucene - Core > Issue Type: Task > Components: general/build > Reporter: Robert Muir > Assignee: Uwe Schindler > Fix For: 4.1, 5.0 > > Attachments: LUCENE-4409-componentdef.patch, LUCENE-4409.patch, LUCENE-4409.patch > > > today we have a lot of custom python scripts checking javadocs (checking for missing stuff too). > Most of this is implemented by parsing html etc (some of this should stay this way, like broken-link detection) > But actually the eclipse compiler can do most of this type of linting, and has a lot of options for it. We can pull it via ivy and run it from the command-line. > I tested this manually by adding a bogus throws clause to Codec.java, downloading the ecj.jar from maven and running it manually: > {noformat} > rmuir@beast:~/workspace/lucene-trunk/lucene/core/src/java$ java -cp ~/Downloads/ecj-3.7.2.jar org.eclipse.jdt.internal.compiler.batch.Main -source 1.6 -d none -enableJavadoc -properties ~/workspace/lucene-trunk/dev-tools/eclipse/.settings/org.eclipse.jdt.core.prefs . > ... > ---------- > 120. ERROR in /home/rmuir/workspace/lucene-trunk/lucene/core/src/java/./org/apache/lucene/codecs/Codec.java (at line 59) > * @throws IOException */ > ^^^^^^^^^^^ > Javadoc: Exception IOException is not declared > ---------- > {noformat} > here i specified -d none (don't generate class files), and essentially told it to read the compiler warnings/errors options set in the dev-tools config. For javadocs-lint we would want our own separate properties file that disables the ordinary java warnings (because eclipse can warn/error/ignore on lots of things, not just javadocs, and does by default). > Separately we could also use this to check/fail/warn on other things besides javadoc... -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org