Skip to content

proposed enhancement: dfmt oneoff #602

@katastic

Description

@katastic

dfmt doesn't support one line exceptions to rules, only multi-line blocks. That is overly verbose for removing single style errors. It also introduces the possibility of ignoring (and missing) multiple errors if users place them at natural boundaries at beginning/ending of blocks (say, start/end of a struct which ignores intended issue but also ignores an additional style violation inside by accident).

struct rect { float x, y, w, h; }  
"Struct name 'rect' does not match style guidelines"

current solution:

// dfmt off
struct rect { float x, y, w, h; } 
// dfmt on

A natural solution would be support for single line rule exceptions:

proposed solution:

struct rect { float x, y, w, h; } // dfmt oneoff

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions