Just want to make sure that even if LOCC fails, we still want to run other tasks such as build the system and test it. Checkstyle task is a good example. Cheers, -Cedric

Michael Paulding wrote:
Hi Hackers,

I added a fail on error attribute to the LOCC Ant task, so that a user
has the option of failing the build if an error occurs while running
LOCC (such as a parse exception).  I set failOnError to true for our
nightly build, so we will immediately know of any "enum" issues or LOCC
failures.

The setter method for this attribute makes use of Project.toBoolean() to
allow strings such as "yes", "no", "true", "false", "on" or "off" as input.

The improvement has been documented in detail here:
http://hackydev.ics.hawaii.edu:8080/browse/LOCC-20

Best regards,
Mike

----- Original Message -----
From: Philip Johnson <[EMAIL PROTECTED]>
Date: Tuesday, November 30, 2004 11:43 am
Subject: [HACKYSTAT-DEV-L:378] Re: Avoid using "enum" as variable name


Can we improve the Ant task for LOCC such that it fails when LOCC fails? That way the build will fail when LOCC fails, and we'll know that there's a problem that needs fixing.

You could make this an attribute of the Ant task, like
failOnLOCCError="true"
so that the Ant user would be able to decide whether to fail the build or not when LOCC fails.


Note also that the correct way to set these kind of boolean properties is with Project.toBoolean():

/**
* Sets build sensor in verbose mode to have meaningful printout for
* sensor debugging. It can be enabled by verbose="true" or "on" or "True" etc.
*
* @param verboseValue True, true, or TRUE
*/
public void setVerbose(String verboseValue) {
this.verboseMode = Project.toBoolean(verboseValue);
}


This enables a variety of values ("true" "on" "FALSE" "Off", etc.) to map to their correct boolean value. Some of our sensor code did not use this Ant idiom.


Cheers, Philip

--On Tuesday, November 30, 2004 10:24 AM -1000 Michael Paulding <[EMAIL PROTECTED]> wrote:


Also, for a more urgent motivation, the current release of LOCC

is based

upon the JDK 1.5 grammar and treats "enum" as a reserved word. This
means whenever we name a variable "enum", LOCC will fail to

parse the

file and we will not have FileMetric data for that module until

it is fixed.










Reply via email to