-
Notifications
You must be signed in to change notification settings - Fork 227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CSharp sensor should fail if OS is not windows. #535
Comments
|
@jannylund, how do you manage to run a .Net analysis on a non-windows OS as the only way to execute a .Net analysis is thru the Scanner for MSBuild which can't be executed on non-windows machine ? Thanks |
@fmallet previously sonar supported doing source-code-only analysis by using the sonar-runner/sonar-scanner command line tool. This was an easy way to get a quick overview of a legacy project before setting up the full build environment to run with sonar scanner. Today, running somar-scanner on linux will still pull the C# rules from the server and then as mentioned in the ticket, kill the analysis history. If you don't support non-windows, please make it throw an ERROR and quit analysis. |
@fmallet Just curious. JetBrains ported their ReSharper analysis engine to Mono and then became the core part of Rider IDE. MSBuild has been open sourced by Microsoft and is now able to run on non-Windows machines. So all the information seems to indicate the feasibility of running a scanner everywhere. |
@lextm analysis IS possible on non-windows (e.g: MacOS). see this "beta" build that provides this basic support: https://github.com/SonarSource/sonar-scanner-msbuild/releases/tag/3.1-beta.1 I am currently trying to scan on my mac but it fails due to the "fix" done by this issue. If analysis can be performed on a mac, i believe the code changes for this commit should be reverted (or, at least, provide a matching "beta" release for the SonarC# plugin, from a different branch perhaps). |
@liortal53 We decided to implement this "feature" to avoid weird and unexpected behaviors. We will obviously remove this as soon as we think we are ready with cross-platform support. |
I understand that. but currently, it appears that even without full .net core support, it may be possible to analyze C# projects from a Mac. It was also suggested by someone on the open JIRA ticket (can't find the link now). i'd like to have this support, even as an "experimental", "beta" or whatever other title it is you want to call that. alternatively, i can just comment out the code you added that tests for Windows OS, but i was unable to rebuild the plugin so i can't replace my version with a locally built version for testing purposes. |
@jannylund @FastNinja @lextm @liortal53 Watch our for the release announcement. All feedback will be very appreciated and would help us to deliver the product to a highest quality. |
Fixed by #944 |
Just to make it clear, since we are not using .net core - can we still use
this new support ? Or do you mean the scanner and plugins will be built on
top of .net core?
We are using c# (mono, with the unity3d engine).
…On Nov 17, 2017 14:59, "michalb-sonar" ***@***.***> wrote:
@jannylund <https://github.com/jannylund> @FastNinja
<https://github.com/fastninja> @lextm <https://github.com/lextm>
@liortal53 <https://github.com/liortal53>
Good news!
Early next week, we're going to release RC of the Scanner, SonarC# and
SonarVB plugins that support scanning .NET Core project, not only on
Windows but also on Linux and Mac.
Watch our for the release announcement. All feedback will be very
appreciated and would help us to deliver the product to a highest quality.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#535 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAxVl7d2RwB6YIQzo44Ki_-9eJvbB4Sbks5s3YM6gaJpZM4OOUG3>
.
|
@liortal53 We haven't tested unity3d specifically, so feedback here would be good. |
Awesome. I will definitely play with it and give you feedback.
I already something when analyzing unity3d projects (even on windows).
What would be the best way to raise these issues? Via github issues or some
place else ?
…On Nov 17, 2017 15:52, "michalb-sonar" ***@***.***> wrote:
@liortal53 <https://github.com/liortal53>
Yes! You can analyze the .NET framework solutions with Mono.
We haven't tested unity3d specifically, so feedback here would be good.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#535 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAxVly82JwxQfOkkS2Wp1KaEZVHXN3rYks5s3Y-OgaJpZM4OOUG3>
.
|
Thanks! Yes, github issues would be the most convenient place. |
But please open new issues (easier for us to handle) :) |
Running into a similar issue... Any suggestions to fix this? script listed below image
|
Disregard, this is already taken care of in another thread. |
Description
If a build server accidentally pushes a csharp analysis to a non-windows system, the c# files are ignored in analysis (without warning) and sonar history deletes them. It's not possible to delete the latest analysis in Sonar, so this is breaking the history until rescan on Windows has happened.
When running in debug mode, there is a warning about OS Incompatibility.
Repro steps
Expected behavior
Sonar C# should either:
Actual behavior
Known workarounds
The text was updated successfully, but these errors were encountered: