Skip to content

A simple Unity project demonstrating linting through resharper inspectcode and GitHub actions.

License

Notifications You must be signed in to change notification settings

rYuuk/unity-resharper-linting

Repository files navigation

Linting Using Resharper

rider linting

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.

Prerequisite

  • .sln and .csproj files should be present in the source.

GitHub Action Steps

  • .Net is installed.
  • Resharper Global tools are installed.
  • Code checkout.
  • InspectCode is called.
  • Check for any errors.
  • Logfile is uploaded as an Artifact.

Output

image

Issues

  • 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.

Mitigation

  • 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.

About

A simple Unity project demonstrating linting through resharper inspectcode and GitHub actions.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages