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

chore(style): add editorconfig for easier configuration #1098

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

aepfli
Copy link
Member

@aepfli aepfli commented Sep 10, 2024

Many people struggle with their code styles when contributing for the first time. With this pull request, we're adding a .editorconfig to manage those settings in a centralized place, making everyone's lives easier.

With this iteration, we're adding IntelliJ Idea configuration.

The first commit contains the configuration, and I applied the second one to the whole code base.

Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.com>
@aepfli aepfli requested a review from a team as a code owner September 10, 2024 07:35
Copy link

codecov bot commented Sep 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.31%. Comparing base (6408261) to head (5fd9b3d).

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1098      +/-   ##
============================================
+ Coverage     95.09%   95.31%   +0.21%     
- Complexity      400      401       +1     
============================================
  Files            39       39              
  Lines           917      917              
  Branches         56       56              
============================================
+ Hits            872      874       +2     
+ Misses           24       23       -1     
+ Partials         21       20       -1     
Flag Coverage Δ
unittests 95.31% <100.00%> (+0.21%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


# Following the rules of the Google Java Style Guide.
# See https://google.github.io/styleguide/javaguide.html
[*.java]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to get a linter in CI which applies these same requirements? I'd prefer to not rely on someone's editor obeying this config for style correctness.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is still checkstyle in place, which enforces proper styling, but it reduces the pain for new contributors if they have a different code style setup in IntelliJ. For example I see regular people changing to star imports with auto-formatting - which does not need to be the case.

Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.com>
Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.com>
Copy link

sonarcloud bot commented Oct 7, 2024

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

Successfully merging this pull request may close these issues.

3 participants