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

SwayFmt removes comment in configuration block #4966

Open
Braqzen opened this issue Aug 16, 2023 · 2 comments · May be fixed by #5297 or #6185
Open

SwayFmt removes comment in configuration block #4966

Braqzen opened this issue Aug 16, 2023 · 2 comments · May be fixed by #5297 or #6185
Assignees
Labels
bug Something isn't working formatter

Comments

@Braqzen
Copy link
Contributor

Braqzen commented Aug 16, 2023

Version 0.44.0

script;

use std::{constants::ZERO_B256, vm::evm::evm_address::EvmAddress};

configurable {
    // SIGNER: EvmAddress = EvmAddress::from(ZERO_B256),
    SIGNER: EvmAddress = EvmAddress {
        value: ZERO_B256,
    },
}

fn main() {}

Run forc fmt and the commented out SINGER will be removed.

Note: If you change the comment // into a doc comment /// then the doc comment will not be removed.

Unsure if bug or some new design decision has taken place that I am unaware of.

@brandonsurh
Copy link
Contributor

Is there any word on what the desired behavior of this is?

@Braqzen
Copy link
Contributor Author

Braqzen commented Nov 16, 2023

Is there any word on what the desired behavior of this is?

Formatting should not remove comments. Unsure if this is still an issue in the latest releases.

@brandonsurh brandonsurh linked a pull request Nov 21, 2023 that will close this issue
7 tasks
@JoshuaBatty JoshuaBatty added the bug Something isn't working label Jun 20, 2024
@rvcas rvcas linked a pull request Jun 25, 2024 that will close this issue
8 tasks
@JoshuaBatty JoshuaBatty assigned alfiedotwtf and unassigned rvcas Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working formatter
Projects
None yet
5 participants