vendredi 30 mai 2014

How can I configure Emacs to highlight C++ that violate a detailed code style?


Vote count:

0




I've been researching existing C++ code style tools and have yet to find any packages which will allow me to highlight sections of a file which break a detailed code style configuration. While there seem to be several options for basic code style settings (what should/shouldn't be indented, line length > some threshold, etc), other issues do not seem to be addressed. For context, I'm hoping to be able to recognize when I do the following:



  • { on same line as function definition (should be next line)

  • { on next line after if statement (should be same line)

  • no space between ) and {

  • no space between comparisons (should be a == b instead of a== b,a==b, etc)

  • consecutive new lines

  • type *var_name or type * var_name instead of type* var_name

  • and so on...


This style is heavily enforced on my team, and I am having difficulty minimizing inconsistencies. I'm looking for either an existing emacs tool which allow me to customize these settings extensively, or suggestions on how to create an emacs package myself identifies these errors.



asked 1 min ago






Aucun commentaire:

Enregistrer un commentaire