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

Forced line break → AST mismatch after formatting #16

Closed
anordal opened this issue Mar 4, 2024 · 1 comment
Closed

Forced line break → AST mismatch after formatting #16

anordal opened this issue Mar 4, 2024 · 1 comment

Comments

@anordal
Copy link

anordal commented Mar 4, 2024

In this example, the command line was long, so I tried to break it up using forced line breaks (empty line comments) …

set(SRC
    src/file.c
)

add_custom_command(
    OUTPUT
        src.tar.zst
    DEPENDS
        ${SRC}
    COMMAND
        set -euo pipefail #
        && tar -c src | zstd --ultra -22 > src.tar.zst #
)

… but Gersemi 0.11.0 didn't like that:

CMakeLists.txt: AST mismatch after formatting

@BlankSpruce
Copy link
Owner

Fixed in 0.11.1.

Quite clever usage of line comment to break COMMAND argument.

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

No branches or pull requests

2 participants