code-metrics

C# How to exclude generated code from VS2008 code metrics?

此生再无相见时 提交于 2020-02-24 09:16:25
问题 How can I exclude generated code, like Windows Forms Designer related code, from Visual Studio 2008 code metrics? I've been digging around but I didn't found any solution. DebuggerHidden and DebuggerNonUserCode have no effect. 回答1: Try the GeneratedCodeAttribute. 来源: https://stackoverflow.com/questions/725660/c-sharp-how-to-exclude-generated-code-from-vs2008-code-metrics

C# How to exclude generated code from VS2008 code metrics?

邮差的信 提交于 2020-02-24 09:15:23
问题 How can I exclude generated code, like Windows Forms Designer related code, from Visual Studio 2008 code metrics? I've been digging around but I didn't found any solution. DebuggerHidden and DebuggerNonUserCode have no effect. 回答1: Try the GeneratedCodeAttribute. 来源: https://stackoverflow.com/questions/725660/c-sharp-how-to-exclude-generated-code-from-vs2008-code-metrics

Does passing an aggregate object instead of a long argument list of objects reduce data coupling

此生再无相见时 提交于 2020-01-05 20:27:54
问题 I read that data coupling can be reduced by "not passing unnecessary arguments" Say there is a makeCake method which requires many instance variables in the Ingredients class as parameters: makeCake(ingredients.flour, ingredients.egg, ingredients.sugar, ingredients.cheese, ingredients.cream) And instead of this, just pass the whole Ingredients Object makeCake(ingredients) and access the variables within the makeCake method.. Is this counted as reducing coupling between the class which calls

Does passing an aggregate object instead of a long argument list of objects reduce data coupling

ぐ巨炮叔叔 提交于 2020-01-05 20:27:16
问题 I read that data coupling can be reduced by "not passing unnecessary arguments" Say there is a makeCake method which requires many instance variables in the Ingredients class as parameters: makeCake(ingredients.flour, ingredients.egg, ingredients.sugar, ingredients.cheese, ingredients.cream) And instead of this, just pass the whole Ingredients Object makeCake(ingredients) and access the variables within the makeCake method.. Is this counted as reducing coupling between the class which calls

Does passing an aggregate object instead of a long argument list of objects reduce data coupling

笑着哭i 提交于 2020-01-05 20:27:14
问题 I read that data coupling can be reduced by "not passing unnecessary arguments" Say there is a makeCake method which requires many instance variables in the Ingredients class as parameters: makeCake(ingredients.flour, ingredients.egg, ingredients.sugar, ingredients.cheese, ingredients.cream) And instead of this, just pass the whole Ingredients Object makeCake(ingredients) and access the variables within the makeCake method.. Is this counted as reducing coupling between the class which calls

Does passing an aggregate object instead of a long argument list of objects reduce data coupling

梦想与她 提交于 2020-01-05 20:27:07
问题 I read that data coupling can be reduced by "not passing unnecessary arguments" Say there is a makeCake method which requires many instance variables in the Ingredients class as parameters: makeCake(ingredients.flour, ingredients.egg, ingredients.sugar, ingredients.cheese, ingredients.cream) And instead of this, just pass the whole Ingredients Object makeCake(ingredients) and access the variables within the makeCake method.. Is this counted as reducing coupling between the class which calls

Does passing an aggregate object instead of a long argument list of objects reduce data coupling

二次信任 提交于 2020-01-05 20:27:03
问题 I read that data coupling can be reduced by "not passing unnecessary arguments" Say there is a makeCake method which requires many instance variables in the Ingredients class as parameters: makeCake(ingredients.flour, ingredients.egg, ingredients.sugar, ingredients.cheese, ingredients.cream) And instead of this, just pass the whole Ingredients Object makeCake(ingredients) and access the variables within the makeCake method.. Is this counted as reducing coupling between the class which calls

Python: code statistics

非 Y 不嫁゛ 提交于 2020-01-01 02:32:13
问题 Do you know if there's a Python library that generates statistics about code? I'm thinking about pointing to a package and getting number of classes, functions, methods, docblock lines etc. It could eventually include useless stuff like number of lambdas or other crazy statistics, just for fun. 回答1: you can have a look at Pymetrics, or check other tools enumerated there 回答2: People don't generally make packages out of things that can be done in a dozen or two lines of code. The following

How to automate Visual Studio's Code Metrics feature

不羁岁月 提交于 2019-12-31 21:34:30
问题 I want to automate the process of gathering code metrics on a .NET solution. Is there any way of getting msbuild to run the Code Metrics feature included in VS2008 Development Edition? I may end up using SourceMonitor, but I would like to know if there is a way to use the VS code metrics engine from the command line. 回答1: Finally, Microsoft have provided us with a way to automate the Visual Studio code metrics feature using a new "power tool". 回答2: This is how my company has automated FxCop

How do I gather TeamCity code coverage reports from multiple projects into one report?

扶醉桌前 提交于 2019-12-31 21:34:28
问题 We use the build in coverage application in TeamCity 6 (about to upgrade to 7.1) If we wish to see the code coverage (or other metrics) of a particular build it is fine as we can navigate to that build, but it would be great if we could pluck out a few interesting metrics from all/some of the current projects/build configurations and display them all together. For convenience I would expect the new display to be accessible from within TeamCity itself, however if there are solutions that