Skip to content

Commit

Permalink
scripts: enable formatting of tools' sources, with some exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
dbartolini committed Nov 18, 2023
1 parent 430c012 commit 67babc0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion makefile
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ cppcheck:

.PHONY: format-sources
format-sources:
@scripts/uncrustify/format-all.sh -j $(MAKE_JOBS)
@scripts/uncrustify/format-all.sh -j $(MAKE_JOBS) --enable-tools

.PHONY: create-meson-build
create-meson-build:
Expand Down
15 changes: 13 additions & 2 deletions scripts/uncrustify/format-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,19 @@ format_tools_c () {
}

format_tools_vala () {
find tools/ -iname '*.vala' \
| tr '\n' '\0' \
find tools/ -iname '*.vala' \
| grep -v 'data_compiler.vala' \
| grep -v 'deploy_dialog.vala' \
| grep -v 'font_import_dialog.vala' \
| grep -v 'launcher.vala' \
| grep -v 'level.vala' \
| grep -v 'level_editor.vala' \
| grep -v 'level_tree_view.vala' \
| grep -v 'project.vala' \
| grep -v 'project_browser.vala' \
| grep -v 'resource_chooser.vala' \
| grep -v 'user.vala' \
| tr '\n' '\0' \
| xargs -0 -n1 -P"$1" ./scripts/uncrustify/uncrustify-wrapper.sh scripts/uncrustify/vala.cfg
}

Expand Down

0 comments on commit 67babc0

Please sign in to comment.