Giter VIP home page Giter VIP logo

checkers_parser's Introduction

Code Checkers Parser

*last project stable version is on branch "Stable"

Supported checkers:

  • Radon CC & MI (Tested on versions: 6.0.1)
  • Ruff (Tested on versions: 0.1.8)
  • Bandit (Tested on versions: 1.7.6)

How to use

1. Clone repository

git clone https://github.com/vsaverin/checkers_parser

2. Setup project

2.1 Create .env file in project root

Example:

SECRET_KEY = "string"
GITLAB_URL = "https://url.com"
ACCESS_TOKEN = "access_token"
POSTGRES_DB = "local_db"
POSTGRES_USER = "local_user"
POSTGRES_PASSWORD = "qwerty123321"

2.2 In settings.py specify your reports filenames:

BANDIT_FILENAME = 'bandit.txt'
RUFF_FILENAME = 'ruff.json'
RADON_MI_FILENAME = 'radon_mi.txt'
RADON_CC_FILENAME = 'radon_cc.txt'

Also don't forger to replace default ALLOWED_HOSTS with yours

ALLOWED_HOSTS = [
    "your_address:8008"
]

3. Build!

poetry lock --no-update
docker-compose -f deploy/docker-compose.yml up --build

After successful build service will be available on port 8008 by default

!!! Services requires Superuser authentication !!!

4. Create superuser:

docker container exec -it container-name /bin/sh 
python3 manage.py createsuperuser

5. Connect your GitLab project using django admin:

5.1 Goto:

https://yourhost.com/admin

5.2 Open Application

MAIN -> GitlabProjects

5.3 Create New Object

- Project name: Your Custom project name (will be displayed on dashboard)
- Project Id: id of the gitlab project u want to connect
- Analysis job name: name of the analysis stage in ur pipeline
- Bandit filename: name of file to search in ur gitlab artifacts (ex. bandit.json)
- Ruff filename: name of file to search in ur gitlab artifacts (ex. ruff.json)
- Radon mi filename: name of file to search in ur gitlab artifacts (ex. radon_mi.json)
- Radon cc filename: name of file to search in ur gitlab artifacts (ex. radon_cc.json)

ToDo:

  • Refactoring
  • Multiple projects support
  • Projects artifacts auto-update (by last proceeded job id)
  • Move Dashboard & Projects to different app
  • Errors catching (with ui)

checkers_parser's People

Contributors

vsaverin avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.