Linting not working with Rider

I don’t think so.

The way we compute relative path is here. Basically, we are trying several strategies in a row, and in your case it seems none are working:

  1. Relative path to (IntelliJ) project basedir
  2. Relative path to module basedir (not applicable in Rider)
  3. Relative path to content root (should always work in Rider, because each file of the solution is a content root).
  4. Find first common ancestor between the file to analyze and the project basedir (should always work, except if the project basedir and the file to analyze are on different drives on Windows)

One thing you can try is to update to latest Rider version (2021.3) to see if this is maybe a bug on their side.
If that doesn’t work, I will prepare a special build of SonarLint that will log all values used in the computation of the relative path (project basedir, content roots, …).