Skip to content

Commit

Permalink
~fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
shanshin committed Mar 26, 2024
1 parent 404279d commit 01d4263
Show file tree
Hide file tree
Showing 7 changed files with 182 additions and 76 deletions.
25 changes: 14 additions & 11 deletions kover-cli/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,17 @@ Allows you to generate HTML and XML reports from the existing binary report.

`java -jar kover-cli.jar report [<binary-report-path> ...] --classfiles <class-file-path> [--exclude <class-name>] [--excludeAnnotation <annotation-name>] [--html <html-dir>] [--include <class-name>] --src <sources-path> [--title <html-title>] [--xml <xml-file-path>]`

| Option | Description | Required | Multiple |
|---------------------------------------|---------------------------------------------------------------------------------------------------------|:--------:|:--------:|
| `<binary-report-path>` | list of binary reports files | | + |
| --classfiles <class-file-path> | location of the compiled class-files root (must be original and not instrumented) | + | + |
| --exclude <class-name> | filter to exclude classes, wildcards `*` and `?` are acceptable | | + |
| --excludeAnnotation <annotation-name> | filter to exclude classes and functions marked by this annotation, wildcards `*` and `?` are acceptable | | + |
| --html <html-dir> | generate a HTML report in the specified path | | |
| --include <class-name> | filter to include classes, wildcards `*` and `?` are acceptable | | + |
| --src <sources-path> | location of the source files root | + | + |
| --title <html-title> | title in the HTML report | | |
| --xml <xml-file-path> | generate a XML report in the specified path | | |
| Option | Description | Required | Multiple |
|------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------|:--------:|:--------:|
| `<binary-report-path>` | list of binary reports files | | + |
| --classfiles <class-file-path> | location of the compiled class-files root (must be original and not instrumented) | + | + |
| --exclude <class-name> | filter to exclude classes, wildcards `*` and `?` are acceptable | | + |
| --excludeAnnotation <exclude-annotation-name> | filter to exclude classes and functions marked by this annotation, wildcards `*` and `?` are acceptable. Excludes have priority ver includes | | + |
| --includeAnnotation <include-annotation-name> | filter to include classes marked by this annotation, wildcards `*` and `?` are acceptable | | + |
| --excludeInheritedFrom <exclude-ancestor-name> | filter to exclude classes extending the specified class or implementing an interface, wildcards `*` and `?` are acceptable | | + |
| --includeInheritedFrom <include-ancestor-name> | filter to include only classes extending the specified class or implementing an interface, wildcards `*` and `?` are acceptable | | + |
| --html <html-dir> | generate a HTML report in the specified path | | |
| --include <class-name> | filter to include classes, wildcards `*` and `?` are acceptable | | + |
| --src <sources-path> | location of the source files root | + | + |
| --title <html-title> | title in the HTML report | | |
| --xml <xml-file-path> | generate a XML report in the specified path | | |
Original file line number Diff line number Diff line change
Expand Up @@ -65,28 +65,28 @@ internal class ReportCommand : Command {

@Option(
name = "--excludeAnnotation",
usage = "filter to exclude classes and functions marked by this annotation, wildcards `*` and `?` are acceptable",
usage = "filter to exclude classes and functions marked by this annotation, wildcards `*` and `?` are acceptable. Excludes have priority over includes",
metaVar = "<exclude-annotation-name>"
)
private var excludeAnnotation: MutableList<String> = ArrayList()

@Option(
name = "--includeAnnotation",
usage = "filter to include classes by this annotation, wildcards `*` and `?` are acceptable",
usage = "filter to include classes marked by this annotation, wildcards `*` and `?` are acceptable. Excludes have priority over includes",
metaVar = "<include-annotation-name>"
)
private var includeAnnotation: MutableList<String> = ArrayList()

@Option(
name = "--excludeInheritedFrom",
usage = "filter to exclude classes inheriting the specified class or implementing an interface, wildcards `*` and `?` are acceptable",
usage = "filter to exclude classes extending the specified class or implementing an interface, wildcards `*` and `?` are acceptable. Excludes have priority over includes",
metaVar = "<exclude-ancestor-name>"
)
private var excludeInheritedFrom: MutableList<String> = ArrayList()

@Option(
name = "--includeInheritedFrom",
usage = "filter to include only classes inheriting the specified class or implementing an interface, wildcards `*` and `?` are acceptable",
usage = "filter to include only classes extending the specified class or implementing an interface, wildcards `*` and `?` are acceptable. Excludes have priority over includes",
metaVar = "<include-ancestor-name>"
)
private var includeInheritedFrom: MutableList<String> = ArrayList()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,18 +189,26 @@ public static class ClassFilters {
/**
* Classes that have at least one of the annotations specified in this field are presents in the report.
* All other classes that are not marked with at least one of the specified annotations are not included in the report.
* <p>
* If inclusion and exclusion rules are specified at the same time, then excludes have priority over includes.
* This means that even if a class is annotated both annotations from exclude and include, it will be excluded from the report.
* </p>
*/
public final Set<String> includeAnnotation;

/**
* Classes that have at least one of the annotations specified in this field are not filtered.
* <p>
* If inclusion and exclusion rules are specified at the same time, then excludes have priority over includes.
* This means that even if a class is annotated both annotations from exclude and include, it will be excluded from the report.
* </p>
*/
public final Set<String> excludeAnnotation;

/**
* <p>Include only classes inheriting at least one of the specified classes or implementing at least one of the interfaces.</p>
* <p>Include only classes extending at least one of the specified classes or implementing at least one of the interfaces.</p>
* <p>
* The entire inheritance tree is analyzed, that is, a class may not inherit the specified class directly.
* The entire inheritance tree is analyzed, that is, a class may not extending the specified class directly.
* Similarly, for the specified interfaces, it is checked that they are implemented directly in the class, or in one of its heirs.
* </p>
*
Expand All @@ -209,14 +217,14 @@ public static class ClassFilters {
* <li> classes and interfaces declared in the application </li>
* <li> classes and interfaces declared outside the application, if they are directly inherited or implemented by any type from the application</li>
*</ul>
* <p>If specified class or interface that is not declared in the application and that is not inherited/implemented directly by one of the application types, then such a filter will have no effect.</p>
* <p>If specified class or interface that is not declared in the application and that is not extending/implemented directly by one of the application types, then such a filter will have no effect.</p>
*/
public final Set<String> includeInheritedFrom;

/**
* <p>Exclude classes inheriting at least one of the specified classes or implementing at least one of the interfaces.</p>
* <p>Exclude classes extending at least one of the specified classes or implementing at least one of the interfaces.</p>
* <p>
* The entire inheritance tree is analyzed, that is, a class may not inherit the specified class directly.
* The entire inheritance tree is analyzed, that is, a class may not extend the specified class directly.
* Similarly, for the specified interfaces, it is checked that they are implemented directly in the class, or in one of its heirs.
* </p>
*
Expand All @@ -225,7 +233,7 @@ public static class ClassFilters {
* <li> classes and interfaces declared in the application </li>
* <li> classes and interfaces declared outside the application, however they are directly inherited or implemented by any type from the application</li>
*</ul>
* <p>If specified class or interface that is not declared in the application and that is not inherited/implemented directly by one of the application types, then such a filter will have no effect.</p>
* <p>If specified class or interface that is not declared in the application and that is not extended/implemented directly by one of the application types, then such a filter will have no effect.</p>
*/
public final Set<String> excludeInheritedFrom;

Expand Down
Loading

0 comments on commit 01d4263

Please sign in to comment.