View Source mix guide (Guide v0.0.1)

Guide is a tool that turns sobelow static code analysis results into markdown, that can be used to decorate pull requests of GitHub.

This tool can be run with the following mix task:

mix guide --source <url to markdown file> \
          --repo <name of repo in GitHub> \
          --commit <commit hash of the latest commit>

To decorate a PR you have to run these steps inside of a GitHub Action:

  1. mix sobelow --skip --format=json --out=./sobelow.results.json
  2. mix guide --source <url to markdown file> --repo <name of repo in GitHub> --commit <commit hash of the latest commit>
  3. gh pr comment <PR Number> --repo <name of repo in GitHub> -F comment.md

Command line options

  • --source - URL to markdown file, where recommendations can be extracted from.
  • --repo - Specify the name of your repository
  • --commit - Commit hash of the latest commit of our PR, is used to generate code snippets.
  • --results - File path of the results generated by sobelow. Has to be json. Defaults to: sobelow.results.json
  • --target - File path where to store the generated markdown, defaults to: comment.md

Summary

Functions

Callback implementation for Mix.Task.run/1.

Functions