Skip to content

Conversation

Yarwin
Copy link
Contributor

@Yarwin Yarwin commented Sep 25, 2025

add #[allow(clippy::suspicious_else_formatting)] in generated code in itest, since file can be generated as one big line.

See failing job: https://github.com/godot-rust/gdext/actions/runs/18001547399/job/51211796501?pr=1334

As explanation, such code:

    if a {
        println!("a");
        godot_error = true;
    }
    if b {
        println!("b");
        godot_error = true;
    }

is fine, while

    if a {
        println!("a");
        godot_error = true;
    } if b {
        println!("b");
        godot_error = true;
    }

triggers following warning:

warning: this looks like an `else if` but the `else` is missing
 --> src/main.rs:6:6
  |
6 |     } if b {
  |      ^
  |
  = note: to remove this lint, add the missing `else` or add a new line before the second `if`
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_else_formatting
  = note: `#[warn(clippy::suspicious_else_formatting)]` on by default

…in itest, since file can be generated as one big line.
@Yarwin Yarwin added the c: tooling CI, automation, tools label Sep 25, 2025
@GodotRust
Copy link

API docs are being generated and will be shortly available at: https://godot-rust.github.io/docs/gdext/pr-1336

Copy link
Member

@Bromeon Bromeon left a comment

Choose a reason for hiding this comment

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

Thanks!

@Bromeon Bromeon changed the title Add workaround for clippy denying itest in case if parts of its code would be generated as one big line. itest: work around clippy errors when quote! generates one big line Sep 25, 2025
@Bromeon Bromeon added this pull request to the merge queue Sep 25, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 25, 2025
@Bromeon Bromeon added this pull request to the merge queue Sep 25, 2025
Merged via the queue into godot-rust:master with commit 8cc51a0 Sep 25, 2025
17 checks passed
@Bromeon Bromeon added this to the 0.4 milestone Sep 27, 2025
@Bromeon Bromeon added the bug label Sep 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug c: tooling CI, automation, tools
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants