Custom Intellisense rules

Started by
4 comments, last by Deflinek 8 years, 1 month ago
Is it possible to create a custom intellisense rule in visual studio? Not a custom rule set, but actual logic with branching using some sort of scripting and code analysis? A google search would suggest this is not possible, not because I found an answer, but the lack of an answer.
Advertisement

No. IntelliSense is just a compiler that runs constantly in the background.

For .NET languages:
https://blogs.msdn.microsoft.com/codeanalysis/2010/03/26/how-to-write-custom-static-code-analysis-rules-and-integrate-them-into-visual-studio-2010/

Very interesting note on that article...

NOTE: Writing custom FxCop rules, the associated APIs and the process for installing them is not a supported feature of the product. We are providing this information because we get so many questions about how to do it.

Just out of curiousity, what is it that you want to change?
void hurrrrrrrr() {__asm sub [ebp+4],5;}

There are ten kinds of people in this world: those who understand binary and those who don't.

Thank you for the feedback.

Just out of curiousity, what is it that you want to change?

I was looking into implementing a coding standard to help form a paradigm for my project. There are a lot of little nuances that can define the overall quality/performance/correctness of code, and I was looking into experimenting some of my own "ideas" of programming style. Wanted to enforce them via the compiler if possible. More of a side project than anything.


I was looking into implementing a coding standard to help form a paradigm for my project. There are a lot of little nuances that can define the overall quality/performance/correctness of code, and I was looking into experimenting some of my own "ideas" of programming style. Wanted to enforce them via the compiler if possible. More of a side project than anything.

In that case you may want to look at "Code Analysis" under project preferences. It is available at least since VS2012 (I don't have any older one installed to check).

You can fine-tune the rule set to your liking and set any issues to create errors rather than warnings at compilation. Any violations can be suppressed in code with justification message so they are highly visible in any code review process.

This topic is closed to new replies.

Advertisement