diff --git a/README.md b/README.md index d474861a2..a70ca4c48 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,16 @@ 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. + +* [Supported Languages](#What-language-is-supported) +* [Getting Started](#Getting-Started) + * [Installation](#Installation) + * [Usage](#Usage) +* [Configuration](#Configuration-βš™οΈ) + * [Practices](#Practices) + * [GitHub CI Action](#GitHub-Ci-Action) + + ![DX Scanner Demo](./demo.svg) @@ -31,6 +41,7 @@ C++ | 🚧 C# | 🚧 Ruby | 🚧 + ## Getting Started 🏁 ### Installation @@ -44,31 +55,101 @@ Ruby | 🚧 ### Usage + +``` +Scan your project for possible DX recommendations. + +USAGE + $ dx-scanner [COMMAND] + +COMMANDS + init Initialize DX Scanner configuration. + practices List all practices id with name and impact. + run Scan your project for possible DX recommendations. +``` + + +
+dxs run + ``` Scan your project for possible DX recommendations. USAGE - $ dx-scanner [PATH] [OPTIONS] + $ dx-scanner run [PATH] OPTIONS -a, --authorization=authorization Credentials to the repository. (in format "token" or "username:token"; can be set as ENV variable DX_GIT_SERVICE_TOKEN) - -f, --fix Automatically fix problems - --fixPattern Fix only practices with ID matching this regex pattern - -h, --help Help - -i, --init Initialize DX Scanner configuration + -f, --fix Tries to fix problems automatically + -h, --help show CLI help -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. + --fixPattern=fixPattern Fix only rules with IDs matching the regex. + +ALIASES + $ dx-scanner dxs + $ dx-scanner dxscanner EXAMPLES dx-scanner run dx-scanner run ./ --fail=high dx-scanner run github.com/DXHeroes/dx-scanner ``` +
+ + + +
+dxs practices + +``` +List all practices id with name and impact. + +USAGE + $ dx-scanner practices + +OPTIONS + -h, --help show CLI help + -j, --json Print practices in JSON +``` +
+ + +
+dxs init -
+``` +Initialize DX Scanner configuration. + +USAGE + $ dx-scanner init + +OPTIONS + -h, --help show CLI help +``` +
+ + +## Configuration βš™οΈ +Add ```dxscannerrc.*``` config file to change default configuration settings. It can be a ```.json```, ```.yml```, and even a dotfile! + +You can also run ```dxs init``` to initialize config automatically. + +### Practices ### +You can switch off practices you do not want to scan or change their impact. Use the id of the practice. + +
List of All Practices πŸ” Practice | Impact | Language Independent | JavaScript/TypeScript | Java @@ -90,21 +171,21 @@ 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 JS Package Management | high | ❌ | βœ… | ❌ +Use Package Management | high | ❌ | βœ… | βœ… Configure Scripts in package.json | medium | ❌ | βœ… | ❌ -Update Dependencies of Major Level | small | ❌ | βœ… | ❌ -Update Dependencies of Minor and Patch Level | high | ❌ | βœ… | ❌ +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 | ❌ | ❌ | βœ… +Security vulnerabilities detected | high | ❌ | βœ… | ❌
-## 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 @@ -119,11 +200,16 @@ off ``` Example : -``` +```json +dxscannerrc.json + { "practices": { "JavaScript.GitignoreCorrectlySet": "medium", - "JavaScript.LoggerUsed": "off" + "JavaScript.LoggerUsed": "off", + "LanguageIndependent.DoesPullRequests": { + "impact": "small" + } } } ```