PX4 / PX4-Autopilot

PX4 Autopilot Software
https://px4.io
BSD 3-Clause "New" or "Revised" License
8.2k stars 13.37k forks source link

Fix code style in remaining apps, enforce code style via Travis #2734

Closed LorenzMeier closed 8 years ago

LorenzMeier commented 9 years ago

@dagar Would you be interested to have another stab at this?

It seems like astyle 2.5.1 fixed this. Which means we need a PPA in Travis or build it from source so we have a good version:

-       _mission_item({0}),
-       _waypoint_position_reached(false),
-       _waypoint_yaw_reached(false),
-       _time_first_inside_orbit(0),
-       _actuators{},
-       _actuator_pub(nullptr)
+       _mission_item( {0}),
+              _waypoint_position_reached(false),
+              _waypoint_yaw_reached(false),
+              _time_first_inside_orbit(0),
+              _actuators{},
+              _actuator_pub(nullptr)

Now when using the correct {} instead of ({0}), which is anyway wrong because it invokes the copy constructor, astyle does not mess up the initialiser list any more.

LorenzMeier commented 9 years ago

I would propose to:

LorenzMeier commented 9 years ago

We have reached a good point to be able to digest a massive code change in general. The only modules to not touch right now are:

The rest of the code could be formatted now file-by-file and then enforced to follow the code style.

dagar commented 9 years ago

I can't find an astyle 2.5.1 2.05.1 ppa so I'll see how badly building it from source hurts the build time.

Edit: I'm assuming we're actually talking about 2.05.1

dagar commented 9 years ago

See PR #2744

dagar commented 8 years ago

Anything else you'd like to do here?