segmentio / golines

A golang formatter that fixes long lines
MIT License
903 stars 56 forks source link

Use .editorconfig file to set line length #138

Open heygarrett opened 1 month ago

heygarrett commented 1 month ago

EditorConfig can be used to ensure consistent editor settings in a project with a .editorconfig file. But some formatting tools without complex configuration needs (eg, shfmt) also use .editorconfig as a configuration file.

golines could use the max_line_length property in a .editorconfig file to set the line length. This would make it easy for anyone using golines as a formatter in their editor to maintain formatting consistency with others working on the same project.

ccoVeille commented 1 month ago

Good idea