Skip to content

Commit

Permalink
add docs for analyze and dev
Browse files Browse the repository at this point in the history
Signed-off-by: Emily McMullan <[email protected]>
  • Loading branch information
eemcmullan committed Nov 1, 2023
1 parent b7180bb commit 1db1096
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 3 deletions.
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,6 @@ Flags:
Use "kantra [command] --help" for more information about a command.
```

Additionally, two environment variables control the container runtime and the kantra image: `PODMAN_BIN` and `RUNNER_IMG`:
- `PODMAN_BIN`: path to your container runtime (podman or docker); ie: `PODMAN_BIN=/usr/local/bin/docker`
- `RUNNER_IMG`: the tag of the kantra image to invoke; ie: `RUNNER_IMG=localhost/kantra:latest`

### Analyze

Expand Down
11 changes: 11 additions & 0 deletions docs/analyzer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## Analyzer-lsp Documentation

### kantra analyze runs [analyzer-lsp](https://github.com/konveyor/analyzer-lsp)

- To better understand how rules are used in analysis, see the [rules](https://github.com/konveyor/analyzer-lsp/blob/main/docs/rules.md)
documentation

- If a rule is matched, it creates a [violation](https://github.com/konveyor/analyzer-lsp/blob/main/docs/violations.md)

- [Labels](https://github.com/konveyor/analyzer-lsp/blob/main/docs/labels.md)
can be used to filter in and out rules
15 changes: 15 additions & 0 deletions docs/developer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
### Running kantra

Two environment variables control the container runtime and the kantra image: `PODMAN_BIN` and `RUNNER_IMG`:
- `PODMAN_BIN`: path to your container runtime (podman or docker)
- `RUNNER_IMG`: the tag of the kantra image to invoke

#### example:

`podman build -f Dockerfile -t kantra:dev`

`RUNNER_IMG=kantra:dev PODMAN_BIN=/usr/local/bin/podman go run main.go analyze --input=<path-to-src-application> --output=./output`

#### Helpful flags:
- To increase logs for debugging, you can set `--log-level` (default is 5)
- ie: `--log-level=7`
10 changes: 10 additions & 0 deletions docs/windup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
## Known differences between Windup and kantra output

#### `--rules` + `--target`
- In Windup, you can specify a custom rule with a target. If the custom rule does not
have a label with the given target specified, it will **still** run the rule.

- In kantra, if a rule is given as well as a target, but the given rule **does not**
have the target label, the given rule will not match.
- You must add the target label to the custom rule (if applicable) in
order to run this rule.

0 comments on commit 1db1096

Please sign in to comment.