This is a sample Unity Project demonstrating linting with a GitHub action using resharper inspect code.
For linting tool, resharper's Inspect Code is used.
It uses a .dotSettings
file in source for validating the rules, more can be found out about this here.
.sln
and.csproj
files should be present in the source.
- .Net is installed.
- Resharper Global tools are installed.
- Code checkout.
- InspectCode is called.
- Check for any errors.
- Logfile is uploaded as an Artifact.
- There are unity specific errors like
Cannot resolve symbol 'UnityEngine’
, this is due to Unity not being installed on Github hosted machine for the action.
- A self hosted runner could be used.
- On this server unity can be installed, which will remove all unity errors. If it still not works try this workaround for unity support.
- Also dotnet, resharper global tools, can be installed on server.
- This way we can remove the steps for installing dotnet and resharper.