Can we run sonar-scanner in linux for iOS/Swift projects?

We are running sonar-scanner in macOS to scan iOS/Swift projects and it is working fine and reporting issues to sonarcloud.
But we were looking to improve our CI process and thinking if we can run sonar-scanner in linux docker images, so checking if is there any limitation which requires macOS machines only to find swift related issues, Please let us know what do you think about this or is there any issues with this approach ?

Yes, although you’ll have a hard (impossible) time generating things like code coverage information. If that’s an acceptable trade-off, go right ahead!