sway icon indicating copy to clipboard operation
sway copied to clipboard

SwayFmt removes comment in configuration block

Open Braqzen opened this issue 2 years ago • 2 comments

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.

Braqzen avatar Aug 16 '23 16:08 Braqzen

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

brandonsurh avatar Nov 16 '23 01:11 brandonsurh

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.

Braqzen avatar Nov 16 '23 11:11 Braqzen