Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAdditional properties in the emitted diagnostic records #315
Labels
Comments
|
Closing this as there is no discussion happening as to which properties need to be added, why they should be added, and whether adding them is worth the engineering effort. |
|
Perhaps it is too late to answer in this thread... I have a rule to detect the possibles optimizations to the 'for' statement. I must emit a Diagnostic record with the AST of the for statement, then analyze it again. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There is suggestion to for diagnostic records to contain the following fields - ask for rule to emit additional meaningful metadata:
ImpactLevel
Doc Url for rule - provide feedback and learn about the rule author, optional verbose educational content explaining what the rule is about and what the measures are to improve the script, like FeedbackURL and AdviceURL
[Tobias]
Use the ImpactLevel attribute by the rule author to indicate how “expensive” the rule is in terms of time it takes to run.
So ImpactLevel = “Low” would indicate a rule that produces immediate results, whereas ImpactLevel = “High” would indicate a rule that does extensive analysis and may take considerable system resources. This type of info may be important to decide which rules to apply in different environments, i.e. when applied in real-time, no high impact rules would be evaluated or pushed to a separate thread.
[Raghu] Good suggestion. [Severity, Rule documentation, namespace etc] are some of the properties returned by the rule diagnostic record. ImpactLevel is a useful addition. Along with the URL property from your earlier suggestion.
Since there is a significant interest in making the rule metadata more informational, I will start a discussion on our page with the community.
Along with this, one can also use the Profile support in to customize the rules that can be run for a given environment [Dev/Test/Prod..]