Skip to content

Modify csproj generation to handle RoslynAnalyzers#577

Closed
van800 wants to merge 1 commit into182from
182-analysers
Closed

Modify csproj generation to handle RoslynAnalyzers#577
van800 wants to merge 1 commit into182from
182-analysers

Conversation

@van800
Copy link
Copy Markdown
Member

@van800 van800 commented May 31, 2018

Howto:

  1. Create "RoslynAnalyzers" folder near sln file
  2. Install nuget or Copy dll with custom Roslyn Analyser. Good examble is
    https://www.nuget.org/packages/UnityEngineAnalyzer/
  3. Call Assets -> Sync C# Project in Unity
    Rider will show custom analysis results
    image
    Example from https://github.com/meng-hui/UnityEngineAnalyzer

@citizenmatt
Copy link
Copy Markdown
Member

I have reservations about this - I don't think Rider should be responsible for creating procedures such as this. If there's an existing standard way for adding Analysers, then we should support it, but if there isn't, we shouldn't invent one.

@van800
Copy link
Copy Markdown
Member Author

van800 commented May 31, 2018

@citizenmatt @kskrygan
I haven't got any response in Unity slack about this.
If we don't want to include it directly to our package, I will publish it as a separate gist useful for anybody interested. Rider/VS/Any_other_editor.

@SugoiDev
Copy link
Copy Markdown

SugoiDev commented Jun 1, 2018

With the new Incremental Compiler, there is some support for analyzers, but it isn't documented (and probably not even working yet). I'm not sure what direction they'll take on this, since they've gone kinda silent on the entire Incremental Compiler thing. You might want to try asking Dom_Laflamme about this.

In any case, I think that, even if there is no standard way of adding Roslyn analyzers right now, extending the project generation to be able to have then included is great and might open this path to many.

@van800
Copy link
Copy Markdown
Member Author

van800 commented Jun 24, 2018

Separate cs file vad710/UnityEngineAnalyzer#27 (comment)

@van800 van800 closed this Jun 24, 2018
@citizenmatt citizenmatt deleted the 182-analysers branch September 3, 2018 09:41
@van800
Copy link
Copy Markdown
Member Author

van800 commented Oct 21, 2019

New and better aproach vad710/UnityEngineAnalyzer#43
Works for Unity 2019.2+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants