Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/srenatus/refactorerl-docker
pre-shaved yak docker image for using refactorerl
https://github.com/srenatus/refactorerl-docker
Last synced: 11 days ago
JSON representation
pre-shaved yak docker image for using refactorerl
- Host: GitHub
- URL: https://github.com/srenatus/refactorerl-docker
- Owner: srenatus
- Created: 2017-06-14T06:35:03.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-06-14T07:00:54.000Z (over 7 years ago)
- Last Synced: 2024-11-05T22:45:31.150Z (about 2 months ago)
- Language: Shell
- Size: 1000 Bytes
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# RefactorErl docker container
This container is meant to provide a ready-to-go RefactorErl instance, including the right yaws version.
For more information about RefactorErl, please see [its wiki](http://pnyf.inf.elte.hu/trac/refactorerl/wiki).
## Build
$ git clone https://github.com/srenatus/refactorerl-docker
$ cd refactorerl-docker
$ docker build -t referl .## Use
To add _your code_ for RefactorErl's inspection capalibilies by adding a `referl_repo.erl` like this:
```erlang
-module(referl_repo).-export([start/0, load/0]).
start() ->
rpc:call(refactorerl@localhost, referl_repo, load, []).load() ->
ri:reset(),[ ri:add("/code/apps", App) || App <- [app1, app2] ].
```This file will be compiled and `referl_repo:start/0` is run when the container is started:
$ docker run -v /path/to/repo/:/code -p 8001:8001 -it referl
The web UI can be accessed via http://localhost:8001.
Note that further RefactorErl calls can happen in `load/0`, for example executing semantic queries via
```erlang
ri:q("mods.funs[loc > 0].mccabe, [{out, "/code/mccabe.out"}])
```