Sign inSign up

openrefactory/icr-go-engine

By openrefactory

•Updated about 1 month ago

Analysis engine for go

Image
0

1.9K

openrefactory/icr-go-engine repository overview

⁠How to use this image

This image contains the executable of the analysis engine of icr-for-go. The executable is named as or-go and the location of the executable (which is /usr/local/icr/) is added to PATH environment variable.

Here is a sample Dockerfile to run an analysis using this image:

FROM openrefactory/icr-go-engine:latest

WORKDIR /usr/local/icr
COPY config.json .

CMD ["or-go"]

The config.json file should contain following contents:

{
    "orHome": "/workspace/orhome",
    "source": "/workspace/source",
    "result": "/workspace/result",
    "diff": "/workspace/result/diff",
    "refactorings": "all",
    "licenseKey": "Some-Valid-License-Key",
    "summaries": "/workspace/summaries",
    "go": {
        "goPath": "/workspace/gp"
    },
    "exclude": [],
    "debug": false
}

Now, build an image:

docker build -f Dockerfile -t icr-go-analysis:latest .

and run:

docker run --rm -v /path/to/source:/workspace/source \
 -v /path/to/result:/workspace/result icr-go-analysis:latest

NB:

  • The result.json file and all the diffs will be generated inside /path/to/result directory.
  • By default, the summaries exist inside the image. So, the summaries has been set to /workspace/summaries and this should not be changed.
  • The path inside the exclude should be given as relative to source path.

Tag summary

Content type

Image

Digest

sha256:cace4b04e…

Size

232.9 MB

Last updated

about 1 month ago

docker pull openrefactory/icr-go-engine