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

Format Vala code #41

Merged
merged 13 commits into from
Jan 1, 2024
Merged

Format Vala code #41

merged 13 commits into from
Jan 1, 2024

Conversation

sonnyp
Copy link
Contributor

@sonnyp sonnyp commented Dec 17, 2023

This is using an "experimental" Workbench branch which exposes a CLI (sort of headless Workbench)

workbenchdev/Workbench#858

Formatted with

make setup
./Workbench/build-aux/fun workbench-cli format vala demos/**/*.vala

demos/About Window/main.vala Outdated Show resolved Hide resolved
@sonnyp sonnyp marked this pull request as draft December 17, 2023 01:12
@sonnyp sonnyp mentioned this pull request Dec 17, 2023
@sonnyp sonnyp marked this pull request as ready for review December 29, 2023 23:47
@sonnyp sonnyp requested a review from lw64 December 29, 2023 23:49
Comment on lines +11 to +20
# Vala
# ./Workbench/build-aux/fun workbench-cli ci vala demos/**/*.vala
# Blueprint
find demos/ -type f -name "*blp" -print0 | xargs -0 ./build-aux/fun blueprint-compiler format
# ./Workbench/build-aux/fun workbench-cli ci blueprint demos/**/*.blp
# CSS
# ./Workbench/build-aux/fun workbench-cli ci css demos/**/*.css
# Rust
./Workbench/build-aux/fun rustfmt --check --edition 2021 demos/**/*.rs
# Python
./Workbench/build-aux/fun black --check demos/**/*.py
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I commented those that do not pass yet.

I will fix the demos in a subsequent PR
workbench-cli already uncovered quite a few issues 🎉

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does "do not pass" mean? Isn't all vala code formatted with the formatter, so linting should succeed, or is the linter or formater not 100% doing its job? (So that would mean fixing the linter/formater?)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

look at the code for the context of the comment

Copy link
Contributor

@lw64 lw64 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be alright. I am just going to trust the formatter, from a quick look its mostly indentation anyways.

@sonnyp sonnyp merged commit 503b7f7 into main Jan 1, 2024
1 check passed
@sonnyp sonnyp deleted the format-vala-code branch January 1, 2024 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants