Consistent file and code formatting
See original GitHub issueChallenges
File formatting
A lot of our code files do not end with a new line like the unix standard requests.
Code formatting
I have noticed inconsistencies such as opening braces being on the same line vs different lines.
Suggested fixes
File formatting
Would it make sense to add an .editorconfig file to this project to consistently format files across most popular IDEs? I’m thinking that the following rules will probably be minimally disruptive
root = true
[*]
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
Code formatting
Use the IntelliJ formatter across the project to start off. Check for formatting linters to fail PRs if they are inconsistently formatted and have tooling locally that integrates with gradle so people can get early feedback
@MarkusAmshove: What are your thoughts on this? I can turn around a PR pretty quickly if you like this idea. Please let me know.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
How to Write Better Code: The 3 Levels of Code Consistency
At the next level, and here we assume there to be code from other developers or third parties, consistency means to follow the...
Read more >Tools for Consistent JavaScript Code Style - Bits and Pieces
Maintaining a consistent code style is not always easy. ... Making sure all files conform to the project's standards can be tedious and...
Read more >Enforcing a consistent Coding Style across projects and ...
Coding with style is hard. Especially because it is a very personal and opinionated thing – as always when it comes to style....
Read more >How to enforce a consistent coding style in your projects
#Linters / Roslyn Analyzers. Another useful tool to ensure a consistent coding style is to use a linter. A linter is a tool...
Read more >Use A Consistent Code Layout · Java for small teams - ncrcoe
Use a Consistent Code Layout Within Each Project. Summary. Agree and enforce a standard code formatting scheme within each codebase.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Sounds like a good plan. I’ll start the setup process. I happen to know both of the contributors and I’ve spoken to them about what’s missing on their PRs. Hopefully, we should have them merged soon.
I’ll keep my PR ready while they are getting theirs merged 😄
Added with #207 🥳