8000 Formatting jank with comments at the trailing position in lists · Issue #801 · rune-rs/rune · GitHub
[go: up one dir, main page]

Skip to content

Formatting jank with comments at the trailing position in lists #801

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

Closed
VorpalBlade opened this issue Aug 11, 2024 · 1 comment
Closed
Labels
bug Something isn't working fmt Issues related to formatting

Comments

@VorpalBlade
Copy link
Contributor
VorpalBlade commented Aug 11, 2024
const DOVECOT_UNCHANGED = [
    //("dovecot-core", "dovecot-db.conf.ext"),
    ("dovecot-core", "dovecot-dict-auth.conf.ext"),
    ("dovecot-core", "dovecot-dict-sql.conf.ext"),
    ("dovecot-core", "dovecot-sql.conf.ext"),
    //("dovecot-core", "dovecot.conf"),
];

becomes

const DOVECOT_UNCHANGED = [
    //("dovecot-core", "dovecot-db.conf.ext"),
    ("dovecot-core", "dovecot-dict-auth.conf.ext"),
    ("dovecot-core", "dovecot-dict-sql.conf.ext"),
    ("dovecot-core", "dovecot-sql.conf.ext"),
];
//("dovecot-core", "dovecot.conf"),

The same thing happens with the comment in this:

    patch_file(
        ctx,
        "systemd-resolved",
        "/etc/systemd/resolved.conf",
        [
            (Selector::Regex("^#DNS="), Action::RegexReplace("#DNS=", "DNS=127.0.0.1")),
            (Selector::Regex("^#FallbackDNS="), Action::RegexReplace(
                "#FallbackDNS=",
                "FallbackDNS=1.1.1.1#cloudflare-dns.com 1.0.0.1#cloudflare-dns.com 2606:4700:4700::1111#cloudflare-dns.com 2606:4700:4700::1001#cloudflare-dns.com",
            )),
            (Selector::All, Action::RegexReplace("^#Domains=", `Domains=${fdqn} ~.`)),
            (Selector::All, Action::RegexReplace("^#(LLMNR|MulticastDNS)=yes", "$1=no")),
            // Don't enable DNSSEC, let unbound that we are chaining to handle it, systemd-resolved is not good at it
        ],
    )?;
    // The above comment gets moved down here!

I'm om commit 74c5ef7

@udoprog
Copy link
Collaborator
udoprog commented Aug 11, 2024

Hi! Seems like we're missing a line comment hint right before this line: https://github.com/rune-rs/rune/blob/main/crates%2Frune%2Fsrc%2Ffmt%2Fformat.rs#L807

@udoprog udoprog added bug Something isn't working fmt Issues related to formatting labels Aug 11, 2024
udoprog added a commit that referenced this issue Aug 11, 2024
udoprog added a commit that referenced this issue Aug 11, 2024
udoprog added a commit that referenced this issue Aug 11, 2024
udoprog added a commit that referenced this issue Aug 11, 2024
@udoprog udoprog closed this as completed Aug 11, 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 fmt Issues related to formatting
Projects
None yet
Development

No branches or pull requests

2 participants
0