question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Updating CONTRIBUTING.md with more developer guidelines

See original GitHub issue

Background

The current CONTRIBUTING document is in draft state and needs to be updated.

Also I’ve noticed a discrepancy in code-style across all the modules. There is a wide mix of tabs and space. The import order varies wildly. There are some other few discrepancies as well.

These discrepancies will only continue to grow the more developers we add to the project. The primary reason to use a single code style is to reduce change noise.

Without a single codestyle pull requests by default will have lots of noise in the form of import order changes, whitespace changes, etc. Fixing this noise is difficult as it involves fighting your IDE’s settings.

Proposal

This can all be nipped in the bud by specifying an official Katharsis project formatter for Eclipse and IntelliJ.

Most of the developers are already using the same style, in theory, so there is no reason to change. The only settings that need tweaking or whitespace and import order.

While at it we can spruce of the Contribution guidelines and specify default ISSUE and PR templates to encourage correct and useful contributes from the community.

Tabs or Spaces

According to the Intellij “Problematic whitespace” checker, there are:

If we use tabs: 628 files that must be changed. If we use spaces: 506 files that must be changed.

I hope we can make a decision here that is fast and friendly.

Import order

I propose the following import order: preferences

This will keep the imports organized and clean.

Hosting the formatters

  • Do we put the formatters in the katharsis-framework/katharsis-framework repo or in a separate repo such as katharsis-framework/katharsis-etc?

TODO

If everyon is in agreement then we can:

  • Update Contribution guidelines and add project issue and PR templates (see PR #244 )
  • Decide on tabs vs spaces.
  • Provide importable formatter settings for Eclipse and Intellij, and where to put them for download
  • Apply the new formatter across the entire project to normalize our still from here on out

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:16 (16 by maintainers)

github_iconTop GitHub Comments

2reactions
remmeiercommented, Dec 1, 2016

I prefer tabs. But I’m also able to sleep at nights if spaces are used.

1reaction
Ramblurrcommented, Jan 10, 2017

Yes, like @masterspambot said the main problem with not having a project standard is that the PRs and commits are very very noisy as the different IDEs apply formatting to a file when changing only a few lines.

In the slightly worse case the dev might have the IDE to only apply formatting rules to lines they actually change, but this ends up with inconsistent styles as some lines are 80 chars with spaces and others are 100 with tabs and all { on new lines.

I’ll setup that maven plugin and see if it behaves sanely.

(also, I’m for longer lines too.)

Read more comments on GitHub >

github_iconTop Results From Across the Web

developer-website/CONTRIBUTING.md - GitHub
Editing existing guides · To edit an existing guide you can view the guide's source code by clicking on the Edit icon in...
Read more >
Contributing Guidelines | The GitHub Blog
As a maintainer, all you have to do is add a CONTRIBUTING file (or CONTRIBUTING.md if you're using Markdown) to the root of...
Read more >
Chromium OS Contributing Guide
Updating CLs after Code-Review+2 ... Whenever non-trivial changes are made to a CL, all labels are cleared. This means a Code-Review+2 label must...
Read more >
CONTRIBUTING.md · master · GitLab.org / omnibus-gitlab
This notice should stay as the first item in the CONTRIBUTING.md file. ... We haven't received an update for more than 14 days...
Read more >
Contributing to Beats | Beats Developer Guide [7.17] - Elastic
Send a pull request! Push your changes to your fork of the repository and submit a pull request using our pull request guidelines....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found