hudson.plugins.violations.types.pep8
Class Pep8Parser
java.lang.Object
hudson.plugins.violations.types.pep8.Pep8Parser
- All Implemented Interfaces:
- ViolationsParser
public class Pep8Parser
- extends Object
- implements ViolationsParser
Parser for PEP 8 reports.
Supports only pep8 output where each line represents a
single issue report (i.e. no verbose, show-pep8 or
show-source arguments).
Adapted from the pylint parser.
- Author:
- Ali Rantakari
|
Constructor Summary |
Pep8Parser()
Constructor - create the pattern. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MATCH_MIN_GROUP_COUNT
public static int MATCH_MIN_GROUP_COUNT
Pep8Parser
public Pep8Parser()
- Constructor - create the pattern.
parse
public void parse(FullBuildModel model,
File projectPath,
String fileName,
String[] sourcePaths)
throws IOException
- Parse a violations file.
- Specified by:
parse in interface ViolationsParser
- Parameters:
model - the model to store the violations in.projectPath - the project path used for resolving paths.fileName - the name of the violations file to parse
(relative to the projectPath).sourcePaths - a list of source paths to resolve classes against
- Throws:
IOException - if there is an error.
parseLine
public void parseLine(FullBuildModel model,
String line,
File projectPath)
- Parses a PEP 8 line and adding a violation if regex
- Parameters:
model - build model to add violations toline - the line in the file.projectPath - the path to use to resolve the file.
Copyright © 2004-2012 Hudson. All Rights Reserved.