rj.tools.jcsc.ant
Class JCSCTask

java.lang.Object
  extended byorg.apache.tools.ant.ProjectComponent
      extended byorg.apache.tools.ant.Task
          extended byrj.tools.jcsc.ant.JCSCTask

public class JCSCTask
extends org.apache.tools.ant.Task

JCSCTask

Version:
__0.98.1__
Author:
Ralph Jocham

Field Summary
 
Fields inherited from class org.apache.tools.ant.Task
description, location, target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
project
 
Constructor Summary
JCSCTask()
           
 
Method Summary
 void addFileSet(org.apache.tools.ant.types.FileSet fs)
          Add a file set include all files to parse
 void execute()
          Describe execute method here.
protected  void executeFile(rj.tools.jcsc.ant.ParseFile file)
          executeFile runs JCSC on one File
protected  void executeFiles(rj.tools.jcsc.ant.ParseFile[] files)
          executeFiles runs JCSC on an array of Files
protected  rj.tools.jcsc.ant.ParseFile[] getFiles()
          getFiles transforms FileSet into an File array
 void setCopyAssociatedFiles(java.lang.String value)
          Copy associated files to destdir
 void setDestdir(java.lang.String dir)
          setDestdir - the folder into which the output is written to.
 void setFailProperty(java.lang.String name)
          If this property is set JCSC will not fail directly but will set the specified property to 'true'.
 void setFailSeverity(java.lang.String level)
          set the level for a found violation to cause a build fail
 void setFailValue(java.lang.String value)
          setFailValue set the fail value which will cause a failure if the avg violations per ncss is higher.
 void setFile(java.lang.String file)
          setFile - the name of the single file to check.
 void setIgnoreTestSeverity(java.lang.String level)
          set the level for a found violation to cause a build fail
 void setJcscHome(java.lang.String home)
          The home of JCSC
 void setResultsformatter(java.lang.String resultsFormatter)
          setResultsformatter - the results formatter to use.
 void setRules(java.lang.String rules)
          setRules - the rules file to use.
 void setStartDate(java.lang.String date)
          setStartDate set the date/time from which files are being considered.
 void setStartpackage(java.lang.String startpackage)
          The name of the topmost package with the tailing '.', For example: com.foo... would have com.
 void setViolationsSorter(java.lang.String name)
          Set the sorting algorithm for how the found violations have to be sorted
 void setWorstCount(int count)
          setWorstCount - how many files should be part of the hall of 'shame'.
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getProject, setProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JCSCTask

public JCSCTask()
Method Detail

setRules

public void setRules(java.lang.String rules)
setRules - the rules file to use.

Parameters:
rules - a String value

setFile

public void setFile(java.lang.String file)
setFile - the name of the single file to check.

Parameters:
file - a String value

setStartpackage

public void setStartpackage(java.lang.String startpackage)
The name of the topmost package with the tailing '.', For example: com.foo... would have com.

Parameters:
startpackage -

setResultsformatter

public void setResultsformatter(java.lang.String resultsFormatter)
setResultsformatter - the results formatter to use.

Parameters:
resultsFormatter - a String value

setDestdir

public void setDestdir(java.lang.String dir)
setDestdir - the folder into which the output is written to.

Parameters:
dir - a String value

setWorstCount

public void setWorstCount(int count)
setWorstCount - how many files should be part of the hall of 'shame'.

Parameters:
count - an int value

setStartDate

public void setStartDate(java.lang.String date)
setStartDate set the date/time from which files are being considered. Format YYYY-MM-DD HH:MM:SS

Parameters:
date - a String value

setFailValue

public void setFailValue(java.lang.String value)
setFailValue set the fail value which will cause a failure if the avg violations per ncss is higher.

Parameters:
value - a String value

setViolationsSorter

public void setViolationsSorter(java.lang.String name)
Set the sorting algorithm for how the found violations have to be sorted

Parameters:
name - of class to be uses as algorithm implementation

setFailSeverity

public void setFailSeverity(java.lang.String level)
set the level for a found violation to cause a build fail

Parameters:
level -

setFailProperty

public void setFailProperty(java.lang.String name)
If this property is set JCSC will not fail directly but will set the specified property to 'true'.

Parameters:
name -

setIgnoreTestSeverity

public void setIgnoreTestSeverity(java.lang.String level)
set the level for a found violation to cause a build fail

Parameters:
level -

setCopyAssociatedFiles

public void setCopyAssociatedFiles(java.lang.String value)
Copy associated files to destdir

Parameters:
value -

setJcscHome

public void setJcscHome(java.lang.String home)
The home of JCSC

Parameters:
home -

addFileSet

public void addFileSet(org.apache.tools.ant.types.FileSet fs)
Add a file set include all files to parse

Parameters:
fs - a FileSet value

getFiles

protected rj.tools.jcsc.ant.ParseFile[] getFiles()
getFiles transforms FileSet into an File array

Returns:
a File[] value

execute

public void execute()
             throws org.apache.tools.ant.BuildException
Describe execute method here.

Throws:
org.apache.tools.ant.BuildException - if an error occurs

executeFile

protected void executeFile(rj.tools.jcsc.ant.ParseFile file)
                    throws org.apache.tools.ant.BuildException
executeFile runs JCSC on one File

Parameters:
file - a File value
Throws:
org.apache.tools.ant.BuildException - if an error occurs

executeFiles

protected void executeFiles(rj.tools.jcsc.ant.ParseFile[] files)
                     throws org.apache.tools.ant.BuildException
executeFiles runs JCSC on an array of Files

Parameters:
files - a ParseFile[] value
Throws:
org.apache.tools.ant.BuildException - if an error occurs


(c) 1999-2005 by Ralph Jocham (rjocham72@netscape.net)
JCSC is released under the terms of the GNU General Public License