Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Code Analysis

Code Analysis

Scheduled Pinned Locked Moved The Lounge
csharpcomhelpquestion
7 Posts 6 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Super Lloyd
    wrote on last edited by
    #1

    What if I want to do some custom code analysis.. is there anyway to do it? I didn't really look at anything roselyn, and default MS analysis is useless... But I got a particular problem in an old code base have I have (some? many? a few?) tasks that are not awaited... (or .Wait()ed in non async method) which call all sort of resources to be disposed at the most inconvenient times.. And.. I'd like to find them all! Any tip?

    A new .NET Serializer All in one Menu-Ribbon Bar Taking over the world since 1371!

    P J J M honey the codewitchH 5 Replies Last reply
    0
    • S Super Lloyd

      What if I want to do some custom code analysis.. is there anyway to do it? I didn't really look at anything roselyn, and default MS analysis is useless... But I got a particular problem in an old code base have I have (some? many? a few?) tasks that are not awaited... (or .Wait()ed in non async method) which call all sort of resources to be disposed at the most inconvenient times.. And.. I'd like to find them all! Any tip?

      A new .NET Serializer All in one Menu-Ribbon Bar Taking over the world since 1371!

      P Offline
      P Offline
      PIEBALDconsult
      wrote on last edited by
      #2

      Roll your own? No one can do it for you.

      1 Reply Last reply
      0
      • S Super Lloyd

        What if I want to do some custom code analysis.. is there anyway to do it? I didn't really look at anything roselyn, and default MS analysis is useless... But I got a particular problem in an old code base have I have (some? many? a few?) tasks that are not awaited... (or .Wait()ed in non async method) which call all sort of resources to be disposed at the most inconvenient times.. And.. I'd like to find them all! Any tip?

        A new .NET Serializer All in one Menu-Ribbon Bar Taking over the world since 1371!

        J Offline
        J Offline
        Jon McKee
        wrote on last edited by
        #3

        When I was looking into making a VSIX analyzer project I started [here](https://docs.microsoft.com/en-us/dotnet/csharp/roslyn-sdk/tutorials/how-to-write-csharp-analyzer-code-fix).

        1 Reply Last reply
        0
        • S Super Lloyd

          What if I want to do some custom code analysis.. is there anyway to do it? I didn't really look at anything roselyn, and default MS analysis is useless... But I got a particular problem in an old code base have I have (some? many? a few?) tasks that are not awaited... (or .Wait()ed in non async method) which call all sort of resources to be disposed at the most inconvenient times.. And.. I'd like to find them all! Any tip?

          A new .NET Serializer All in one Menu-Ribbon Bar Taking over the world since 1371!

          J Offline
          J Offline
          Jacquers
          wrote on last edited by
          #4

          Write an article and upload your code and wait for the comments :P

          1 Reply Last reply
          0
          • S Super Lloyd

            What if I want to do some custom code analysis.. is there anyway to do it? I didn't really look at anything roselyn, and default MS analysis is useless... But I got a particular problem in an old code base have I have (some? many? a few?) tasks that are not awaited... (or .Wait()ed in non async method) which call all sort of resources to be disposed at the most inconvenient times.. And.. I'd like to find them all! Any tip?

            A new .NET Serializer All in one Menu-Ribbon Bar Taking over the world since 1371!

            M Offline
            M Offline
            Marco Bertschi
            wrote on last edited by
            #5

            Roslyn. There's no way around it - As it's tightly integrated with the Compiler (and runs continously while you write code) you have the best access to syntax and the best experience using it. We have a few self-written ones at our company. Have a look here, should be a good start: Getting Started Writing a Custom Analyzer & Code Fix[^]

            I only have a signature in order to let @DalekDave follow my posts.

            S 1 Reply Last reply
            0
            • M Marco Bertschi

              Roslyn. There's no way around it - As it's tightly integrated with the Compiler (and runs continously while you write code) you have the best access to syntax and the best experience using it. We have a few self-written ones at our company. Have a look here, should be a good start: Getting Started Writing a Custom Analyzer & Code Fix[^]

              I only have a signature in order to let @DalekDave follow my posts.

              S Offline
              S Offline
              Super Lloyd
              wrote on last edited by
              #6

              Thanks for the link, I'll have a look! :) I just hope it's going to be easy to integrate with my VS solution! ;P

              A new .NET Serializer All in one Menu-Ribbon Bar Taking over the world since 1371!

              1 Reply Last reply
              0
              • S Super Lloyd

                What if I want to do some custom code analysis.. is there anyway to do it? I didn't really look at anything roselyn, and default MS analysis is useless... But I got a particular problem in an old code base have I have (some? many? a few?) tasks that are not awaited... (or .Wait()ed in non async method) which call all sort of resources to be disposed at the most inconvenient times.. And.. I'd like to find them all! Any tip?

                A new .NET Serializer All in one Menu-Ribbon Bar Taking over the world since 1371!

                honey the codewitchH Offline
                honey the codewitchH Offline
                honey the codewitch
                wrote on last edited by
                #7

                I've gotten really good at using regex search in visual studio for this stuff. It's low tech but if you can find one instance and you're clever, you can usually Ctrl-Shift-F to find them all. :java: :cool:

                When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups