Skip to content

only process code, ignore strings or comments #7

@maksym-arutyunyan

Description

@maksym-arutyunyan

This code should not be modified, because it's not the actual code, its a string

    config.type_attribute(
        "ic_nervous_system.pb.v1.Percentage",
        "#[derive(PartialOrd, Ord)]",
    );

same for commented code

#[derive(A, B)]  // Don't use #[derive(E, D)]!

It may be even harder for multiline strings & comments.
A workaround for ignoring tricky cases can be keyword, eg sort-derive: ignore-line, sort-derive: ignore-block, sort-derive: ignore-file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions