Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Microsoft Unity Analyzer in Unity

Discussion in 'Testing & Automation' started by Jmangles, Nov 11, 2021.

  1. Jmangles

    Jmangles

    Joined:
    Aug 1, 2015
    Posts:
    53
    I'm trying to set up a linter step in our build pipeline but it appears that the only useful code analyzer for Unity is the one Microsoft made. However attempting to use that inside unity as a RoslynAnalyzer leads to errors since it redefines Vector2.

    I get that the analyzer is made for Visual Studio and runs in there but I want to actually set the suggestions it provides to be errors and ideally automate it so that it runs as a linter before cloud build.

    Having people's code fail to compile because they left in something like
    [SerializeField] public Something something
    would save me a lot of time as I have to request small fixes to things like this multiple times per day in people's pull requests.
     
  2. StephanK

    StephanK

    Joined:
    Jul 10, 2012
    Posts:
    47
    Did you solve this?
     
  3. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562