justarandomgeek / vscode-factoriomod-debug

Factorio Mod Tool Kit
Other
97 stars 21 forks source link

Incorporating this code into github actions via docker #116

Closed danpf closed 3 months ago

danpf commented 3 months ago

Hello,

I have been working on developing a factorio mod, and I was looking for there to be more CI/CD related tooling for them. I ended up creating my own library factorio-check.

The library builds and distributes a docker image with testing and linting functionality. This was built on the back of this repo, so thank you for maintaining it, and working on open source software in general. Really my repo doesn't do much except package some tools into docker so it is not very groundbreaking, but it is convenient IMO.

If you're interested, you can try linting your factorio codebase with docker via:

$ docker run --rm -v "$(pwd)":"$(pwd):ro" -e MODE=LINT -e TARGET_PATH="$(pwd") -t danpfuw/factorio-check:0.0.11_1.1.104

# no errors:
> Diagnosis completed, no problems found

# Errors manifest as:
> Diagnosis complete, 1 problems found, see /opt/luals/lua-language-server/log/check.json
> Linting complete: Errors found!
> file:///.../src/lua/simple-scenario/control.lua code: undefined-field, message: Undefined field `player_indexxx`., severity: 2, source: Lua Diagnostics., line:char-range: 6:38-6:52

I hope that you find this useful in some capacity, but no worries if you don't.