GitHub Action
DX Scanner Action
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.
Language | Supported |
---|---|
JavaScript/TypeScript | ✅ |
Java | ✅ |
Python | 🚧 |
PHP | 🚧 |
C++ | 🚧 |
C# | 🚧 |
Ruby | 🚧 |
-
with NPM
npm install -g dx-scanner
-
with Yarn
yarn global add dx-scanner
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
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"
}
}
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
.
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).
Feel free to contribute to our DX Scanner. Please follow the Contribution Guide.
The DX Scanner open source project is licensed under the MIT.
Many thanks to these wonderful people (emoji key):
Prokop Simek 💻 🚧 |
adelkah 💻 🚧 |
Radek Holý 💻 |
Vratislav Kalenda 💻 🤔 |
Petr Vnenk 💻 |
This project follows the all-contributors specification. Any kind of contributions are welcome!