jamoyjamie/japr
A cross-language tool for rating the quality of open source, commercial and personal projects
53
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)
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
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 Type | Description |
---|---|
open-source | A comprehensive ruleset for open source projects that are for anyone and everyone that might stumble upon the code |
inner-source | A comprehensive ruleset for projects that are accessible across an organisation and may be used by other teams (often referred to as 'inner source' projects |
team | A balanced ruleset designed for projects that belong to a single team |
personal | A lightweight ruleset designed to tidy up personal projects |
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.
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.
Japr will work for projects of all languages however there are additional checks for the following:
The following table tracks the level of support for each language. Many languages also have additional checks not listed.
Python | C# | JS | Rust | |
---|---|---|---|---|
Linter setup | ✅ | ✅ | ✅ | |
Lock files in Git | ✅ | ❌ | ✅ | ✅ |
Dependency Managers | Poetry, Pipenv | NPM, Yarn | Cargo |
Japr can automatically fix some issues when supplied the --fix
flag. This functionality is highly expermental
docker pull jamoyjamie/japr