godot/scene/3d
Rémi Verschelde 07bc4e2f96 Style: Enforce separation line between function definitions
I couldn't find a tool that enforces it, so I went the manual route:
```
find -name "thirdparty" -prune \
  -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \
  -o -name "*.glsl" > files
perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files)
misc/scripts/fix_style.sh -c
```

This adds a newline after all `}` on the first column, unless they
are followed by `#` (typically `#endif`). This leads to having lots
of places with two lines between function/class definitions, but
clang-format then fixes it as we enforce max one line of separation.

This doesn't fix potential occurrences of function definitions which
are indented (e.g. for a helper class defined in a .cpp), but it's
better than nothing. Also can't be made to run easily on CI/hooks so
we'll have to be careful with new code.

Part of #33027.
2020-05-14 16:54:55 +02:00
..
area_3d.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
area_3d.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
audio_stream_player_3d.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
audio_stream_player_3d.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
baked_lightmap.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
baked_lightmap.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
bone_attachment_3d.cpp Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
bone_attachment_3d.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
camera_3d.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
camera_3d.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
collision_object_3d.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
collision_object_3d.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
collision_polygon_3d.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
collision_polygon_3d.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
collision_shape_3d.cpp Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
collision_shape_3d.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
cpu_particles_3d.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
cpu_particles_3d.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
decal.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
decal.h Fix texture check in decal setup 2020-04-15 12:06:02 -07:00
gi_probe.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
gi_probe.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
gpu_particles_3d.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
gpu_particles_3d.h Renamed 2D and 3D nodes to make their types explicit 2020-03-27 14:54:04 +01:00
immediate_geometry_3d.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
immediate_geometry_3d.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
light_3d.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
light_3d.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
lightmap_probe.cpp Style: Fix missing/invalid copyright headers 2020-05-14 16:54:54 +02:00
lightmap_probe.h Style: Fix missing/invalid copyright headers 2020-05-14 16:54:54 +02:00
lightmapper.cpp Style: Fix missing/invalid copyright headers 2020-05-14 16:54:54 +02:00
lightmapper.h Style: Fix missing/invalid copyright headers 2020-05-14 16:54:54 +02:00
listener_3d.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
listener_3d.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
mesh_instance_3d.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
mesh_instance_3d.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
multimesh_instance_3d.cpp Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
multimesh_instance_3d.h Renamed 2D and 3D nodes to make their types explicit 2020-03-27 14:54:04 +01:00
navigation_3d.cpp Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
navigation_3d.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
navigation_agent_3d.cpp Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
navigation_agent_3d.h Port member initialization from constructor to declaration (C++11) 2020-05-14 10:01:56 +02:00
navigation_obstacle_3d.cpp Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
navigation_obstacle_3d.h Port member initialization from constructor to declaration (C++11) 2020-05-14 10:01:56 +02:00
navigation_region_3d.cpp Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
navigation_region_3d.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
node_3d.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
node_3d.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
path_3d.cpp Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
path_3d.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
physics_body_3d.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
physics_body_3d.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
physics_joint_3d.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
physics_joint_3d.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
position_3d.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
position_3d.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
proximity_group_3d.cpp Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
proximity_group_3d.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
ray_cast_3d.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
ray_cast_3d.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
reflection_probe.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
reflection_probe.h Renaming of servers for coherency. 2020-03-27 15:21:27 -03:00
remote_transform_3d.cpp Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
remote_transform_3d.h Renamed 2D and 3D nodes to make their types explicit 2020-03-27 14:54:04 +01:00
SCsub SCons: Format buildsystem files with psf/black 2020-03-30 09:05:53 +02:00
skeleton_3d.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
skeleton_3d.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
skeleton_ik_3d.cpp Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
skeleton_ik_3d.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
soft_body_3d.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
soft_body_3d.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
spring_arm_3d.cpp Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
spring_arm_3d.h Port member initialization from constructor to declaration (C++11) 2020-05-14 10:01:56 +02:00
sprite_3d.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
sprite_3d.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
vehicle_body_3d.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
vehicle_body_3d.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
velocity_tracker_3d.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
velocity_tracker_3d.h Renamed 2D and 3D nodes to make their types explicit 2020-03-27 14:54:04 +01:00
visibility_notifier_3d.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
visibility_notifier_3d.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
visual_instance_3d.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
visual_instance_3d.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
voxelizer.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
voxelizer.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
world_environment.cpp Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
world_environment.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
xr_nodes.cpp Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
xr_nodes.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00