dx-scanner
Scan your project for possible DX recommendations.
Last updated 6 days ago by dxheroes_dev .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install dx-scanner 
SYNC missed versions from official npm registry.

Tweet

DX Scanner

Version Travis (.org) Codecov last commit GitHub commit activity Downloads/week GitHub contributors All Contributors NPM oclif TypeScript

DX Scanner is an open source CLI tool that allows you to “measure” Developer Experience directly based on your source code. DX Scanner recommends practices that can help you with improving your product development. You can fix some problems automatically with just one command.

DX Scanner Demo

What language is supported?

Language Supported
JavaScript/TypeScript
Java/Kotlin
Python ????
PHP ????
C++ ????
C# ????
Ruby ????

Getting Started ????

Installation

  • with NPM

    npm install -g dx-scanner

  • with Yarn

    yarn global add dx-scanner

Usage

  dx-scanner run [path] [options]

Example:

  dx-scanner run https://github.com/DXHeroes/dx-scanner

Commands

Usage: dx-scanner [command] [options] 

Options:
  -V, --version         output the version number
  -h, --help            output usage information

Commands:
  run [options] [path]  Scan your project for possible DX recommendations
  init                  Initialize DX Scanner configuration
  practices [options]   List all practices id with name and impact

Aliases:
  dxs
  dxscanner

Options for dx-scanner run

Usage: dx-scanner run [path] [options]

Scan your project for possible DX recommendations

Options:
  -a --authorization <authorization>  credentials to the repository (in format "token" or "username:token"; can be set as ENV variable DX_GIT_SERVICE_TOKEN)
  --ci                                CI mode (default: false)
  -d --details                        print details in reports
  --fail <impact>                     exits process with code 1 for any non-practicing condition of given level (high|medium|small|hint|off|all) (default: "high")
  --fix                               tries to fix problems automatically (default: false)
  --fixPattern <pattern>              fix only rules with IDs matching the regex
  -j --json                           print report in JSON (default: false)
  -r --recursive                      scan all components recursively in all sub folders (default: false)
  -h, --help                          output usage information

Examples:
  dx-scanner run
  dx-scanner run ./ --fail=high
  dx-scanner run github.com/DXHeroes/dx-scanner

Auto-fixer

Fix problems detected by DX Scanner automatically.

dx-scanner run [PATH] --fix

Configuration ⚙️

Add dxscannerrc.* config file to change default configuration settings. It can be a .json, .yml, or even a dotfile!

You can also run dx-scanner init to initialize config automatically.

Practices

You can switch off practices that you do not want to scan or you can change their impact level. To do so, refer to the id of the practice.

<summary>List of All Practices ????</summary>
Practice Impact Language Independent JavaScript/TypeScript Java/Kotlin
Create a Readme File high
Create a License File medium
Create a Lockfile high
Create a .gitignore high
Write in Typescript medium
Set .gitignore Correctly high
Use Continuous Integration high
Use Docker small
Use .editorconfig small
Format your code automatically small
Use ESLint medium
ESLint Without Errors medium
Use a different linter medium
Use JS Frontend Testing Framework medium
Use JS Frontend Build Tools medium
Use JS Backend Testing Frameworks high
Use a JS Logging Library small
Use Package Management high
Configure Scripts in package.json medium
Update Dependencies of Major Level small
Update Dependencies of Minor and Patch Level high
Do PullRequests medium
Break down large pull requests into smaller ones medium
Solve Pull Requests Continuously medium
Solve Issues Continuously medium
Write Commit Messages by Convention small
Use Mocking Frameworks for Tests small
Use Testing Frameworks high
Use a Java Logging Dependency small
Use Java Class Naming Convention small
Security vulnerabilities detected high

Possible impact:

high

medium

small

hint

off

Example dxscannerrc.json:


{
    "practices": {
        "JavaScript.GitignoreCorrectlySet": "medium",
        "JavaScript.LoggerUsed": "off",
        "LanguageIndependent.DoesPullRequests": {
          "impact": "small"
        }
    }
}

Github CI Action

Basic example: run DX Scanner on each push to the repo

Create .github/workflows/main.yml.

name: DX Scanner
on: push
jobs:
  dx-scanner:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - name: Runs DX Scanner on the code
        uses: DXHeroes/dx-scanner@master
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}

Generate your Github personal token and set it as an encrypted secret named GITHUB_TOKEN.

Score Computation ????

The impact of each practice is represented by a specific value. DX Scanner uses these values to calculate the overall DX Score.

high = 100 points

medium = 75 points

small = 50 points 

hint = 25 points

The practices you have switched off are not included in the calculation (0 points).

Contributing ????‍???? ????‍????

Feel free to contribute to our DX Scanner. Please follow the Contribution Guide.

License ????

The DX Scanner open source project is licensed under the MIT.

Contributors ✨

Many thanks to these wonderful people (emoji key):


Prokop Simek

???? ????

adelkah

???? ????

Radek Holý

????

Vratislav Kalenda

???? ????

Petr Vnenk

????

Cuong Nguyen

????

vlasy

????

This project follows the all-contributors specification. Any kind of contributions are welcome!

Current Tags

  • 2.0.4-beta.1                                ...           beta (21 days ago)
  • 1.35.3-debug-semver-release-config2.1                                ...           debug/semver-release-config2 (a month ago)
  • 2.0.0-pre-list-practices.1                                ...           feature/list-practices (a month ago)
  • 2.0.0-pre-lp.1                                ...           feature/lp (a month ago)
  • 2.0.0-pre-lp-clean2.1                                ...           feature/lp-clean2 (a month ago)
  • 2.0.0-pre-list-practices-works-for-ts-and-js.1                                ...           hotfix/list-practices-works-fo (a month ago)
  • 2.3.0                                ...           latest (6 days ago)

103 Versions

  • 2.3.0                                ...           6 days ago
  • 2.2.0                                ...           13 days ago
  • 2.1.2                                ...           13 days ago
  • 2.1.1                                ...           14 days ago
  • 2.1.0                                ...           19 days ago
  • 2.0.5                                ...           20 days ago
  • 2.0.4                                ...           21 days ago
  • 2.0.4-beta.1                                ...           21 days ago
  • 2.0.3                                ...           21 days ago
  • 2.0.3-beta.1                                ...           21 days ago
  • 2.0.2                                ...           22 days ago
  • 2.0.1                                ...           a month ago
  • 2.0.0-pre-list-practices-works-for-ts-and-js.1                                ...           a month ago
  • 2.0.0-pre-lp-clean2.1                                ...           a month ago
  • 2.0.0-pre-lp.1                                ...           a month ago
  • 2.0.0-pre-list-practices.1                                ...           a month ago
  • 1.38.0                                ...           a month ago
  • 1.37.1                                ...           a month ago
  • 1.37.0                                ...           a month ago
  • 1.36.0                                ...           a month ago
  • 1.35.3                                ...           a month ago
  • 1.35.3-debug-semver-release-config2.1                                ...           a month ago
  • 1.35.2                                ...           a month ago
  • 1.35.1                                ...           a month ago
  • 1.35.0                                ...           a month ago
  • 1.34.0                                ...           a month ago
  • 1.33.1                                ...           a month ago
  • 1.33.0                                ...           a month ago
  • 1.32.1                                ...           a month ago
  • 1.32.0                                ...           a month ago
  • 1.31.0                                ...           a month ago
  • 1.30.0                                ...           a month ago
  • 1.29.2                                ...           2 months ago
  • 1.29.1                                ...           2 months ago
  • 1.29.0                                ...           2 months ago
  • 1.28.2                                ...           2 months ago
  • 1.28.1                                ...           2 months ago
  • 1.28.0                                ...           2 months ago
  • 1.27.0                                ...           2 months ago
  • 1.26.4                                ...           2 months ago
  • 1.26.2                                ...           2 months ago
  • 1.26.3                                ...           2 months ago
  • 1.26.1                                ...           2 months ago
  • 1.26.0                                ...           2 months ago
  • 1.25.0                                ...           2 months ago
  • 1.24.0                                ...           3 months ago
  • 1.23.2                                ...           3 months ago
  • 1.23.1                                ...           3 months ago
  • 1.23.0                                ...           3 months ago
  • 1.22.1                                ...           3 months ago
  • 1.22.0                                ...           3 months ago
  • 1.21.1                                ...           3 months ago
  • 1.21.0                                ...           3 months ago
  • 1.20.0                                ...           3 months ago
  • 1.19.0                                ...           3 months ago
  • 1.18.2                                ...           3 months ago
  • 1.18.1                                ...           3 months ago
  • 1.18.0                                ...           3 months ago
  • 1.17.10                                ...           3 months ago
  • 1.17.9                                ...           3 months ago
  • 1.17.8                                ...           3 months ago
  • 1.17.7                                ...           3 months ago
  • 1.17.6                                ...           3 months ago
  • 1.17.5                                ...           3 months ago
  • 1.17.4                                ...           3 months ago
  • 1.17.3                                ...           3 months ago
  • 1.17.2                                ...           4 months ago
  • 1.17.1                                ...           4 months ago
  • 1.17.0                                ...           4 months ago
  • 1.16.0                                ...           4 months ago
  • 1.15.2                                ...           4 months ago
  • 1.15.1                                ...           4 months ago
  • 1.15.0                                ...           4 months ago
  • 1.14.3                                ...           4 months ago
  • 1.14.2                                ...           4 months ago
  • 1.14.1                                ...           4 months ago
  • 1.14.0                                ...           4 months ago
  • 1.13.5                                ...           4 months ago
  • 1.13.4                                ...           4 months ago
  • 1.13.3                                ...           4 months ago
  • 1.13.2                                ...           4 months ago
  • 1.13.1                                ...           4 months ago
  • 1.13.0                                ...           4 months ago
  • 1.12.0                                ...           4 months ago
  • 1.11.0                                ...           4 months ago
  • 1.10.0                                ...           4 months ago
  • 1.9.0                                ...           4 months ago
  • 1.8.0                                ...           4 months ago
  • 1.7.0                                ...           4 months ago
  • 1.6.1                                ...           5 months ago
  • 1.6.0                                ...           5 months ago
  • 1.5.0                                ...           5 months ago
  • 1.4.2                                ...           5 months ago
  • 1.4.1                                ...           5 months ago
  • 1.4.0                                ...           6 months ago
  • 1.3.0                                ...           6 months ago
  • 1.2.0                                ...           6 months ago
  • 1.1.4                                ...           6 months ago
  • 1.1.3                                ...           6 months ago
  • 1.1.2                                ...           6 months ago
  • 1.1.1                                ...           6 months ago
  • 1.1.0                                ...           6 months ago
  • 1.0.0                                ...           7 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 358
Last Day 0
Last Week 58
Last Month 585
Dependencies (42)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |