pylint badge
parent
7d4acbf0c2
commit
511b5ef9cb
@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
coverage_badge() {
|
||||
# https://github.com/dbrgn/coverage-badge
|
||||
coverage run --branch --source=/usr/lib/python3.8/site-packages/keymapper tests/test.py
|
||||
python3 -m coverage_badge > data/coverage.svg
|
||||
echo "coverage badge created"
|
||||
}
|
||||
|
||||
pylint_badge() {
|
||||
# https://github.com/jongracecox/anybadge
|
||||
pylint_output=$(pylint keymapper --extension-pkg-whitelist=evdev)
|
||||
rating=$(echo $pylint_output | grep -Po "rated at .+?/" | grep -Po "\d+.\d+")
|
||||
rm data/pylint.svg
|
||||
anybadge -l pylint -v $rating -f data/pylint.svg pylint
|
||||
echo "pylint badge created"
|
||||
}
|
||||
|
||||
pylint_badge &
|
||||
coverage_badge &
|
||||
|
||||
# wait for all badges to be created
|
||||
wait
|
@ -1,4 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# https://github.com/dbrgn/coverage-badge
|
||||
coverage run --branch --source=/usr/lib/python3.8/site-packages/keymapper tests/test.py
|
||||
python3 -m coverage_badge > data/coverage.svg
|
@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="80" height="20">
|
||||
<linearGradient id="b" x2="0" y2="100%">
|
||||
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
|
||||
<stop offset="1" stop-opacity=".1"/>
|
||||
</linearGradient>
|
||||
<mask id="anybadge_1">
|
||||
<rect width="80" height="20" rx="3" fill="#fff"/>
|
||||
</mask>
|
||||
<g mask="url(#anybadge_1)">
|
||||
<path fill="#555" d="M0 0h44v20H0z"/>
|
||||
<path fill="#4c1" d="M44 0h36v20H44z"/>
|
||||
<path fill="url(#b)" d="M0 0h80v20H0z"/>
|
||||
</g>
|
||||
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
|
||||
<text x="23.0" y="15" fill="#010101" fill-opacity=".3">pylint</text>
|
||||
<text x="22.0" y="14">pylint</text>
|
||||
</g>
|
||||
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
|
||||
<text x="63.0" y="15" fill="#010101" fill-opacity=".3">9.66</text>
|
||||
<text x="62.0" y="14">9.66</text>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.0 KiB |
Loading…
Reference in New Issue