Browse Source

Add Codacy code quality badge to README

softuart
Xose Pérez 6 years ago
parent
commit
66600aab81
2 changed files with 11 additions and 1 deletions
  1. +1
    -1
      README.md
  2. +10
    -0
      pre-commit

+ 1
- 1
README.md View File

@ -6,7 +6,7 @@ It uses the Arduino Core for ESP8266 framework and a number of 3rd party librari
[![version](https://img.shields.io/badge/version-1.12.4a-brightgreen.svg)](CHANGELOG.md) [![version](https://img.shields.io/badge/version-1.12.4a-brightgreen.svg)](CHANGELOG.md)
![branch](https://img.shields.io/badge/branch-dev-orange.svg) ![branch](https://img.shields.io/badge/branch-dev-orange.svg)
[![travis](https://travis-ci.org/xoseperez/espurna.svg?branch=dev)](https://travis-ci.org/xoseperez/espurna) [![travis](https://travis-ci.org/xoseperez/espurna.svg?branch=dev)](https://travis-ci.org/xoseperez/espurna)
[![license](https://img.shields.io/github/license/xoseperez/espurna.svg)](LICENSE)
[![codacy](https://img.shields.io/codacy/grade/c9496e25cf07434cba786b462cb15f49/dev.svg)](https://www.codacy.com/app/xoseperez/espurna/dashboard)[![license](https://img.shields.io/github/license/xoseperez/espurna.svg)](LICENSE)
[![donate](https://img.shields.io/badge/donate-PayPal-blue.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=xose%2eperez%40gmail%2ecom&lc=US&no_note=0&currency_code=EUR&bn=PP%2dDonationsBF%3abtn_donate_LG%2egif%3aNonHostedGuest) [![donate](https://img.shields.io/badge/donate-PayPal-blue.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=xose%2eperez%40gmail%2ecom&lc=US&no_note=0&currency_code=EUR&bn=PP%2dDonationsBF%3abtn_donate_LG%2egif%3aNonHostedGuest)
[![twitter](https://img.shields.io/twitter/follow/xoseperez.svg?style=social)](https://twitter.com/intent/follow?screen_name=xoseperez) [![twitter](https://img.shields.io/twitter/follow/xoseperez.svg?style=social)](https://twitter.com/intent/follow?screen_name=xoseperez)


+ 10
- 0
pre-commit View File

@ -52,6 +52,14 @@ travis = "[![travis](https://travis-ci.org/{USER}/{REPO}.svg?branch={BRANCH})]"
BRANCH = BRANCH BRANCH = BRANCH
) )
codacy = "[![codacy](https://img.shields.io/codacy/grade/{HASH}/{BRANCH}.svg)]" \
"(https://www.codacy.com/app/{USER}/{REPO}/dashboard)".format(
HASH = "c9496e25cf07434cba786b462cb15f49",
USER = USER,
REPO = REPO,
BRANCH = BRANCH
)
lines = open(README).readlines() lines = open(README).readlines()
with open(README, "w") as fh: with open(README, "w") as fh:
for line in lines: for line in lines:
@ -61,6 +69,8 @@ with open(README, "w") as fh:
fh.write(version) fh.write(version)
elif "![branch]" in line: elif "![branch]" in line:
fh.write(branch) fh.write(branch)
elif "![codacy]" in line:
fh.write(codacy)
else: else:
fh.write(line) fh.write(line)


Loading…
Cancel
Save