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

proposed enhancement: dfmt oneoff #602

Open
katastic opened this issue Jul 2, 2024 · 0 comments
Open

proposed enhancement: dfmt oneoff #602

katastic opened this issue Jul 2, 2024 · 0 comments

Comments

@katastic
Copy link

katastic commented Jul 2, 2024

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant