Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45 from mixalturek/master
[JENKINS-24602] Native support for cloc tool
- Loading branch information
Showing
13 changed files
with
496 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
src/main/java/hudson/plugins/sloccount/model/cloc/ClocFile.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
package hudson.plugins.sloccount.model.cloc; | ||
|
||
import javax.xml.bind.annotation.XmlAttribute; | ||
import java.io.Serializable; | ||
|
||
/** | ||
* Cloc XML, file element. | ||
* | ||
* @author Michal Turek | ||
* @since 1.20 | ||
*/ | ||
public class ClocFile implements Serializable { | ||
private static final long serialVersionUID = 1; | ||
|
||
@XmlAttribute | ||
private final String name; | ||
|
||
@XmlAttribute | ||
private final int blank; | ||
|
||
@XmlAttribute | ||
private final int comment; | ||
|
||
@XmlAttribute | ||
private final int code; | ||
|
||
@XmlAttribute | ||
private final String language; | ||
|
||
/** | ||
* Constructor. | ||
*/ | ||
public ClocFile(String name, int blank, int comment, int code, String language) { | ||
this.name = name; | ||
this.blank = blank; | ||
this.comment = comment; | ||
this.code = code; | ||
this.language = language; | ||
} | ||
|
||
/** | ||
* This constructor is required by JAXB. | ||
*/ | ||
public ClocFile() { | ||
this(null, 0, 0, 0, null); | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public int getBlank() { | ||
return blank; | ||
} | ||
|
||
public int getComment() { | ||
return comment; | ||
} | ||
|
||
public int getCode() { | ||
return code; | ||
} | ||
|
||
public String getLanguage() { | ||
return language; | ||
} | ||
} |
44 changes: 44 additions & 0 deletions
44
src/main/java/hudson/plugins/sloccount/model/cloc/ClocFiles.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package hudson.plugins.sloccount.model.cloc; | ||
|
||
import javax.xml.bind.annotation.XmlElement; | ||
import java.io.Serializable; | ||
import java.util.List; | ||
|
||
/** | ||
* Cloc XML, files element. | ||
* | ||
* @author Michal Turek | ||
* @since 1.20 | ||
*/ | ||
public class ClocFiles implements Serializable { | ||
private static final long serialVersionUID = 1; | ||
|
||
@XmlElement(name = "file", type = ClocFile.class) | ||
private final List<ClocFile> files; | ||
|
||
@XmlElement(name = "total", type = ClocTotal.class) | ||
private final ClocTotal total; | ||
|
||
/** | ||
* Constructor. | ||
*/ | ||
public ClocFiles(List<ClocFile> files, ClocTotal total) { | ||
this.files = files; | ||
this.total = total; | ||
} | ||
|
||
/** | ||
* This constructor is required by JAXB. | ||
*/ | ||
public ClocFiles() { | ||
this(null, null); | ||
} | ||
|
||
public List<ClocFile> getFiles() { | ||
return files; | ||
} | ||
|
||
public ClocTotal getTotal() { | ||
return total; | ||
} | ||
} |
Oops, something went wrong.