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

Consider adding max line length to .editorconfig #12804

Open
ErlingHauan opened this issue May 14, 2024 · 0 comments
Open

Consider adding max line length to .editorconfig #12804

ErlingHauan opened this issue May 14, 2024 · 0 comments
Labels
kind/chore status/for-consideration Issues that need consideration by team

Comments

@ErlingHauan
Copy link
Contributor

ErlingHauan commented May 14, 2024

Description

Currently, maximum line length is not set in /backend/.editorconfig
If the developer accidentally has triggered autoformatting in their IDE, this can trigger unintended line breaks.

Issues with this:

  • Can waste time if the developer has to revert the unintended line breaks
  • Can make existing code harder to read
  • Can make the diff on GitHub hard to read

Suggestions:

  • Set max_line_length = off. The developers can then decide the line width themself, without worrying about autoformatting
  • Set max_line_lenght = 200 This will enforce a collective maximum linewidth, while still leaving ample room for the developer regarding where to put the line breaks

Potential cons:

  • If the developer has their preferred line length set in the IDE, it will be overrun by the .editorconfig file
@ErlingHauan ErlingHauan added status/draft Status: When you create an issue before you have enough info to properly describe the issue. kind/chore kind/analysis Used when an issue needs to be analysed before it becomes a user story. status/for-consideration Issues that need consideration by team and removed kind/analysis Used when an issue needs to be analysed before it becomes a user story. status/draft Status: When you create an issue before you have enough info to properly describe the issue. labels May 14, 2024
@ErlingHauan ErlingHauan changed the title Add max line length to .editorconfig Consider adding max line length to .editorconfig May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/chore status/for-consideration Issues that need consideration by team
Projects
Status: No status
Development

No branches or pull requests

1 participant