Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How many lines of code?
Message
De
28/03/2019 10:21:24
 
 
À
28/03/2019 08:06:37
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
01667626
Message ID:
01667633
Vues:
48
>If it's in Visual Studio 2012 or later, there's an RegEx you can use. Copy-and-paste this into your Ctrl+Shift+F (Find Solution) and it will search all source code:
>
^(?!(\s*\*))(?!(\s*\-\-\>))(?!(\s*\<\!\-\-))(?!(\s*\n))(?!(\s*\*\/))(?!(\s*\/\*))(?!(\s*\/\/\/))(?!(\s*\/\/))(?!(\s*\}))(?!(\s*\{))(?!(\s(using))).*$
>
>Here's one that counts all except blank lines and { and }:
>
(^(?!(\s*//.+)))+(^(?!(#.+)))+(^(?!(\s*\{.+)))+(^(?!(\s*\}.+)))+(^(?!(\s*\r?$)))+
>
>In Visual Studio 2010 or earlier, use this one:
>
^~(:Wh@//.+)~(:Wh@\{:Wh@)~(:Wh@\}:Wh@)~(:Wh@/#).+
>
>Also, modern Visual Studio versions have a built-in "Code Metrics" which will tell you things about your code:
>https://docs.microsoft.com/en-us/visualstudio/code-quality/code-metrics-values?view=vs-2017

Thanks

This works.

It is very interesting.

For the line of codes, this is in Analyze\Calculate Code Metrics. It provides additional useful information.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform