godot/scene/resources
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
..
default_theme Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
SCsub SCons: Format buildsystem files with psf/black 2020-03-30 09:05:53 +02:00
animation.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
animation.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
audio_stream_sample.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
audio_stream_sample.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
bit_map.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
bit_map.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
box_shape_3d.cpp Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
box_shape_3d.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
capsule_shape_2d.cpp Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
capsule_shape_2d.h - Integrated NavigationServer and Navigation2DServer. 2020-02-10 14:38:52 +01:00
capsule_shape_3d.cpp Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
capsule_shape_3d.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
circle_shape_2d.cpp Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
circle_shape_2d.h - Integrated NavigationServer and Navigation2DServer. 2020-02-10 14:38:52 +01:00
concave_polygon_shape_2d.cpp Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
concave_polygon_shape_2d.h PoolVector is gone, replaced by Vector 2020-02-18 10:10:36 +01:00
concave_polygon_shape_3d.cpp Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
concave_polygon_shape_3d.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
convex_polygon_shape_2d.cpp Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
convex_polygon_shape_2d.h - Integrated NavigationServer and Navigation2DServer. 2020-02-10 14:38:52 +01:00
convex_polygon_shape_3d.cpp Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
convex_polygon_shape_3d.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
curve.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
curve.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
cylinder_shape_3d.cpp Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
cylinder_shape_3d.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
dynamic_font.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
dynamic_font.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
environment.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
environment.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
font.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
font.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
gradient.cpp Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
gradient.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
height_map_shape_3d.cpp Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
height_map_shape_3d.h Rename more 2D and 3D nodes to follow convention 2020-03-27 16:26:34 +01:00
line_shape_2d.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
line_shape_2d.h Rename Lineshapes d to distance 2020-05-09 15:10:00 +02:00
material.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
material.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
mesh.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
mesh.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
mesh_data_tool.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
mesh_data_tool.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
mesh_library.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
mesh_library.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
multimesh.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
multimesh.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
navigation_mesh.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
navigation_mesh.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
packed_scene.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
packed_scene.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
particles_material.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
particles_material.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
physics_material.cpp Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
physics_material.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
polygon_path_finder.cpp Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
polygon_path_finder.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
primitive_meshes.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
primitive_meshes.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
ray_shape_3d.cpp Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
ray_shape_3d.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
rectangle_shape_2d.cpp Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
rectangle_shape_2d.h - Integrated NavigationServer and Navigation2DServer. 2020-02-10 14:38:52 +01:00
resource_format_text.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
resource_format_text.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
segment_shape_2d.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
segment_shape_2d.h - Integrated NavigationServer and Navigation2DServer. 2020-02-10 14:38:52 +01:00
shader.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
shader.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
shape_2d.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
shape_2d.h - Integrated NavigationServer and Navigation2DServer. 2020-02-10 14:38:52 +01:00
shape_3d.cpp Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
shape_3d.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
skin.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
skin.h Add support for named binds in Skin. 2020-02-21 09:40:29 -03:00
sky.cpp Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
sky.h Working sky shader implementation 2020-03-21 20:43:44 -07:00
sky_material.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
sky_material.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
sphere_shape_3d.cpp Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
sphere_shape_3d.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
style_box.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
style_box.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
surface_tool.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
surface_tool.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
text_file.cpp Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
text_file.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
texture.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
texture.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
theme.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
theme.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
tile_set.cpp Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
tile_set.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
video_stream.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
visual_shader.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
visual_shader.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
visual_shader_nodes.cpp Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
visual_shader_nodes.h Added uniform qualifiers to visual shaders 2020-05-05 11:25:48 +03:00
world_2d.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
world_2d.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
world_3d.cpp Style: Enforce separation line between function definitions 2020-05-14 16:54:55 +02:00
world_3d.h Renaming of servers for coherency. 2020-03-27 15:21:27 -03:00
world_margin_shape_3d.cpp Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
world_margin_shape_3d.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00