My team is developing a C ++ project on Linux. We use vim as an editor. I want to bring some standard code rules in our team in such a way that, if the code does not match it, some warning or error will be generated during assembly or compilation. It doesnβt necessarily build, but at least I can run some kind of plugin or tools for this code to make sure that it complies with the standard. So that before executing svn everyone needs to run the code through some kind of plugin or script and make sure that it meets the requirement, and then only he / she can commit it. Not sure if we can add some rules to vim, if any, let me know.
For example, in our code standards, all member variables and private functions must begin with _
class A{ private: int _count; float _amount; void _increment_count(){ ++_count; } }
Therefore, I want to throw a warning or error or some messages for this class if the variables are declared as follows.
class A{ private: int count; float amount; void increment_count(){ ++_count; } }
Note that the warning and error are not from the compiler. Becoz is still valid. It is from a tool that I want to use so that the code switches to re-factoring, but still works fine on the executable side.
I am looking for some kind of plugin or preliminary parsers or scripts to help me achieve all of this.
We are currently using svn; just to comment on the comment.
source share