hudson.plugins.violations.types.pep8
Class Pep8Parser
java.lang.Object
hudson.plugins.violations.types.pep8.Pep8Parser
- All Implemented Interfaces:
- ViolationsParser
public class Pep8Parser
- extends java.lang.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. |
Method Summary |
void |
parse(FullBuildModel model,
java.io.File projectPath,
java.lang.String fileName,
java.lang.String[] sourcePaths)
Parse a violations file. |
void |
parseLine(FullBuildModel model,
java.lang.String line,
java.io.File projectPath)
Parses a PEP 8 line and adding a violation if regex |
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,
java.io.File projectPath,
java.lang.String fileName,
java.lang.String[] sourcePaths)
throws java.io.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:
java.io.IOException
- if there is an error.
parseLine
public void parseLine(FullBuildModel model,
java.lang.String line,
java.io.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. All Rights Reserved.