-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to do member level analysis? #30
Comments
You should be able to pass in the member as a syntax tree to the CodeMetricsCalculator. See here - https://github.com/jjrdk/ArchiMetrics/blob/master/src/ArchiMetrics.Analysis/CodeMetricsCalculator.cs#L59 |
Thanks for your help.
It give me error s like May I ask what is the correct way to do that? Thanks. |
It's impossible to say from the code snippet you have posted. You don't even tell me which line fails or what the source of the error is. Have a look at the unit test for the code snippet calculator: https://github.com/jjrdk/ArchiMetrics/blob/master/tests/ArchiMetrics.Analysis.Tests/CodeMetricsCalculatorTests.cs#L63 |
It works. I'm wondering if I want to to code complexity analysis at semantic level, what assembly should be put in as second parameter in CodeMetricsCalculator.Calculate(). Suppose I what to analyze a syntax tree
Thank you. |
The second parameter takes in all the assembly dependencies that are needed to correctly analyze the code. Since code snippets don't specify their assembly dependencies themselves, you will have to do it. Otherwise the parser will not understand which types you are using. Can you not simply pass the syntax tree to the metrics calculator along with any references and get a result? |
The example you provide shows how to do project analysis. I'm wondering how to the member level analysis using Archimetrics. I noticed some membermetriccalculator functions, but it seems that they are defined as private and cannot be used directly.
Thank you.
The text was updated successfully, but these errors were encountered: