verivital / hyst

HyST: A Source Transformation and Translation Tool for Hybrid Automaton Models
http://verivital.com/hyst/
Other
15 stars 18 forks source link

Uniform code format for Hyst #34

Open stanleybak opened 8 years ago

stanleybak commented 8 years ago

I think we should setup a uniform code format for Hyst. There is a super-easy way to automate this. We provide an .xml file describing the format which Eclipse's code formatter can parse (this can be version controlled in the repository). This can be exported from Eclipse's code formatter (I already have one I use myself to make code generation closer to what I expect).

  1. You import this file within Eclipse.
  2. You set Eclipse to automatically format your code every time you save.

I've done this type of setup recently for another C++ project I'm working on, and I've found it actually saves me time when coding, since I just save with ctrl+s instead of playing with formatting when I'm editing things.

What do you think Talyor?

ttj commented 8 years ago

That sounds like a great idea! Please also make sure to add your post with the instructions to the developer setup instructions.