Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
user-check

GitHub Action

DX Scanner Action

v1 Pre-release

DX Scanner Action

user-check

DX Scanner Action

Measure Developer Experience directly based on your source code

Installation

Copy and paste the following snippet into your .yml file.

              

- name: DX Scanner Action

uses: DXHeroes/dx-scanner@v1

Learn more about this action in DXHeroes/dx-scanner

Choose a version

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.

DX Scanner Demo

What language is supported?

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

Getting Started 🏁

Installation

  • with NPM

    npm install -g dx-scanner

  • with Yarn

    yarn global add dx-scanner

Usage

Scan your project for possible DX recommendations.

USAGE
  $ dx-scanner [PATH] [OPTIONS]

OPTIONS
  -a, --authorization=authorization  Credentials to the repository. (in format "token" or "username:token"; can be set as ENV variable DX_GIT_SERVICE_TOKEN)
  -h, --help                         Help
  -i, --init                         Initialize DX Scanner configuration
  -j, --json                         Print report in JSON
  -r, --recursive                    Scan all components recursively in all sub folders
  -v, --version                      Output the version number
  --ci                               CI mode
  --fail=high|medium|small|off|all   [default: high] Run scanner in failure mode. Exits process with code 1 for any non-practicing condition of given level.

ALIASES
  $ dx-scanner dxs
  $ dx-scanner dxscanner

EXAMPLES
  dx-scanner
  dx-scanner ./ --fail=high
  dx-scanner github.com/DXHeroes/dx-scanner

Configuration ⚙️

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

Practices
You can switch off practices you do not want to scan or change their impact. Use the id of the practice.

Possible impact:

high

medium

small

hint

off

Example :

{
    "practices": {
        "JavaScript.GitignoreCorrectlySet": "medium",
        "JavaScript.LoggerUsed": "off"
    }
}

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 💯

Impact of each practice is represented by a specific value. DX Scanner uses the values to count 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
Prokop Simek

💻 🚧
adelkah
adelkah

💻 🚧
Radek Holý
Radek Holý

💻
Vratislav Kalenda
Vratislav Kalenda

💻 🤔
Petr Vnenk
Petr Vnenk

💻

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