Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creation of badges? #6

Open
bavovanachte opened this issue Jun 6, 2017 · 2 comments
Open

Creation of badges? #6

bavovanachte opened this issue Jun 6, 2017 · 2 comments

Comments

@bavovanachte
Copy link
Member

Would it be a good idea to include the creation of badges in this project as well?

At the moment, I am creating my pylint badges like this (in gitlab):

pylint_full:
  <<: *pylint_setup
  script:
    - pylint --rcfile=pylint.rc src/PSF90372_Test_cases/*.py | tee pylint_score.txt
  after_script:
    - export PYLINT_SCORE=`sed -n 's~Your code has been rated at \([^/]*\).*~\1~p' pylint_score.txt`
    - wget https://img.shields.io/badge/pylint-$PYLINT_SCORE%2F10.0-blue.svg
    - mv *.svg pylint.svg
  allow_failure: true
  artifacts:
    paths:
    - pylint.svg
    when: always

Downsides of this are that:

  • It depends on an external service (which could be unstable)
  • Is fairly primitive (ATM, I just generate a blue badge, the colour doesn't depend on the score)

@Letme what do you think?

@Letme
Copy link
Member

Letme commented Jun 6, 2017

It would be a good idea to integrate it directly into the plugin and there images could easily be chosen. I would put this on enhancement list.

@Letme
Copy link
Member

Letme commented Jun 23, 2017

Adding a bit more reference for that wget as this is in fact full blown API service which just works - and can be hosted anywhere 😄 https://github.com/badges/shields

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants