-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue 8: Add a plugin system for quality reporters
- Loading branch information
1 parent
7e9f14d
commit 6c88a41
Showing
4 changed files
with
44 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,10 @@ | ||
from __future__ import unicode_literals | ||
|
||
import pluggy | ||
|
||
VERSION = '2.4.1' | ||
DESCRIPTION = 'Automatically find diff lines that need test coverage.' | ||
QUALITY_DESCRIPTION = 'Automatically find diff lines with quality violations.' | ||
|
||
# Other packages that implement diff_cover plugins use this. | ||
hookimpl = pluggy.HookimplMarker('diff_cover') |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import pluggy | ||
|
||
hookspec = pluggy.HookspecMarker("diff_cover") | ||
|
||
|
||
@hookspec | ||
def diff_cover_report_quality(): | ||
""" | ||
Return a 2-part tuple: | ||
- Quality plugin name | ||
- Object that implements the BaseViolationReporter protocol | ||
""" |
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 |
---|---|---|
|
@@ -2,4 +2,5 @@ | |
Jinja2>=2.7.1 | ||
six>=1.6.1 | ||
jinja2_pluralize | ||
pluggy | ||
pygments |