Class GatewayCheckstyleListener
- java.lang.Object
-
- GatewayCheckstyleListener
-
- All Implemented Interfaces:
com.puppycrawl.tools.checkstyle.api.AuditListener,java.util.EventListener
public class GatewayCheckstyleListener extends java.lang.Object implements com.puppycrawl.tools.checkstyle.api.AuditListenerThis is a listener for checkstyle. It is designed to follow the rules of checkstyle for gateway java. We grade by only taking off once per type of error. Therefore rather than the default output, we group errors by type Listing every instance of a specific issue on a single line.
-
-
Constructor Summary
Constructors Constructor Description GatewayCheckstyleListener()The constructor of the listener.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddError(com.puppycrawl.tools.checkstyle.api.AuditEvent aEvt)voidaddException(com.puppycrawl.tools.checkstyle.api.AuditEvent aEvt, java.lang.Throwable aThrowable)voidauditFinished(com.puppycrawl.tools.checkstyle.api.AuditEvent aEvt)voidauditStarted(com.puppycrawl.tools.checkstyle.api.AuditEvent aEvt)voidfileFinished(com.puppycrawl.tools.checkstyle.api.AuditEvent aEvt)voidfileStarted(com.puppycrawl.tools.checkstyle.api.AuditEvent aEvt)static java.util.List<jh61b.grader.TestResult>getResults()A method to return all the tests run from an audit.static voidsetDefaultValues(double max, double lossVal, java.lang.String visibil, boolean typeOrInst)Sets the values for the score and visibility of checkstyle tests.
-
-
-
Method Detail
-
setDefaultValues
public static void setDefaultValues(double max, double lossVal, java.lang.String visibil, boolean typeOrInst)Sets the values for the score and visibility of checkstyle tests.- Parameters:
max- the maximum score you can get for checkstylelossVal- the number of points lost for every mistakevisibil- the visibility of each testtypeOrInst- whether to take off per type of error (True) or all mistakes (False)
-
getResults
public static java.util.List<jh61b.grader.TestResult> getResults()
A method to return all the tests run from an audit.- Returns:
- the list of tests
-
auditStarted
public void auditStarted(com.puppycrawl.tools.checkstyle.api.AuditEvent aEvt)
- Specified by:
auditStartedin interfacecom.puppycrawl.tools.checkstyle.api.AuditListener
-
auditFinished
public void auditFinished(com.puppycrawl.tools.checkstyle.api.AuditEvent aEvt)
- Specified by:
auditFinishedin interfacecom.puppycrawl.tools.checkstyle.api.AuditListener
-
fileStarted
public void fileStarted(com.puppycrawl.tools.checkstyle.api.AuditEvent aEvt)
- Specified by:
fileStartedin interfacecom.puppycrawl.tools.checkstyle.api.AuditListener
-
fileFinished
public void fileFinished(com.puppycrawl.tools.checkstyle.api.AuditEvent aEvt)
- Specified by:
fileFinishedin interfacecom.puppycrawl.tools.checkstyle.api.AuditListener
-
addError
public void addError(com.puppycrawl.tools.checkstyle.api.AuditEvent aEvt)
- Specified by:
addErrorin interfacecom.puppycrawl.tools.checkstyle.api.AuditListener
-
addException
public void addException(com.puppycrawl.tools.checkstyle.api.AuditEvent aEvt, java.lang.Throwable aThrowable)- Specified by:
addExceptionin interfacecom.puppycrawl.tools.checkstyle.api.AuditListener
-
-