Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strip whitespace? #19

Open
fnoop opened this issue Sep 15, 2015 · 4 comments
Open

Strip whitespace? #19

fnoop opened this issue Sep 15, 2015 · 4 comments
Labels

Comments

@fnoop
Copy link

fnoop commented Sep 15, 2015

Some of the current code (eg. telem1.lua, at least) has quite a lot of trailing whitespace even in empty lines. Default git editor atom strips superfluous whitespace by default so editing files in atom creates diffs /commits with a lot of changes. Do we allow this, or do we ignore it (atom for example you can disable the trailing whitespace plugin), or do we use this issue to sweep through the code and remove all superfluous whitespace?

@wolkstein
Copy link
Collaborator

i like the git default whitespace handling. maybe we have to declare some simple code formatting roles. than it will easy to set-up your preferred editor. also we can format the existing code as soon as possible. currently there are only just a less files in this project.
/g
wolke

fnoop added a commit that referenced this issue Sep 18, 2015
This file has been opened in atom (through github), leading empty line
deleted and resaved.  The atom editor (or more specifically the
whitespace plugin) automatically goes through and strips extraneous
whitespace.
This is re:
#19
@fnoop
Copy link
Author

fnoop commented Sep 18, 2015

1e5a1ea
How does this look?
I don't pretend by any means to be any expert code and I'm not very familiar with git/opensource development, so please let me know if any of the changes I'm making aren't appropriate. I don't get offended easily :)

@fnoop
Copy link
Author

fnoop commented Sep 18, 2015

Maybe using the apm style/contribution guidelines might be a good idea?
http://dev.ardupilot.com/wiki/style-guide/
http://dev.ardupilot.com/wiki/submitting-patches-back-to-master/

@lvale lvale closed this as completed Sep 19, 2015
@fnoop fnoop reopened this Sep 19, 2015
@wolkstein
Copy link
Collaborator

lower cases everywhere? ok, but i am not a friend of them.
underscores in functions make reading with pointers to a pain.
example:
my_class->my_class_function_to_do_something()
my_class.my_class_function_to_do_something()
vs:
MyClass->MyClassFunctionToDoSomething()
MyClass.MyClassFunctionToDoSomething()

for c++ i like this style guide
https://google-styleguide.googlecode.com/svn/trunk/cppguide.html
/g
wolke

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants