jamoyjamie/japr

By jamoyjamie

Updated 10 months ago

A cross-language tool for rating the quality of open source, commercial and personal projects

Image
0

53

Jamie's Awesome Project Rater

A cross-language tool for rating and enforcing the overall quality of projects by looking at tool & language setup

It's a linter that makes sure you install linters (and some other stuff)

Screenshot of a report

Installation

Using pip:

pip install japr

Using pipx which will get you the latest, bleeding edge version:

pipx install git+https://github.com/JamJar00/japr

Or you can use Docker:

docker run --rm -v $(pwd):/app jamoyjamie/japr:v1.0.1

Usage

japr <directory> -t <project-type>

For more options:

japr <directory> [--summary] [--project-type <open-source|inner-source|team|personal>]

Project Type

To run a check you need to tell Japr about the audience of your projects so it can select a good set of rules to apply. Most personal projects don't need a pull request template for example!

Select one of the following project types and pass on the command line via -t/--project-type or in the configuration file as in the section below.

Project TypeDescription
open-sourceA comprehensive ruleset for open source projects that are for anyone and everyone that might stumble upon the code
inner-sourceA comprehensive ruleset for projects that are accessible across an organisation and may be used by other teams (often referred to as 'inner source' projects
teamA balanced ruleset designed for projects that belong to a single team
personalA lightweight ruleset designed to tidy up personal projects

Animation of a report and a fix

Configuration

Configuration is done mostly through a .japr.yaml file in the root of your repository.

# .japr.yaml
projectType: open-source

The most useful thing to put in there is the project type so it doesn't need to be specified on the command line each time

Suppressing Checks

If you need to suppress a check then you can add an overrides second to your configuration file like so:

# .japr.yaml
override:
  - id: CI001
    suppress: true

Be aware that the project's score is always calculated against the full ruleset no matter what you suppress so that the score is comparable across projects of the same type.

Score

Japr produces a score for each project between 0 and 5 stars. A project with a 5 star score is very commendable.

This score is always calculated against the full ruleset so is comparable between projects of the same type even if they have different suppressions set.

Supported Languages

Japr will work for projects of all languages however there are additional checks for the following:

  • Python
  • C#
  • Javascript

The following table tracks the level of support for each language. Many languages also have additional checks not listed.

PythonC#JSRust
Linter setup
Lock files in Git
Dependency ManagersPoetry, PipenvNPM, YarnCargo

Experimental Automatic Fixes

Japr can automatically fix some issues when supplied the --fix flag. This functionality is highly expermental

Docker Pull Command

docker pull jamoyjamie/japr