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

add docs on how to set up ide to automatically add final #7083

Merged
merged 2 commits into from
Oct 15, 2021

Conversation

cgardens
Copy link
Contributor

@cgardens cgardens commented Oct 15, 2021

What

  • We would like add the final keyword where possible but we don't want to have developers fiddling around adding it themselves. This PR documents how to setup intellij to do it all for us.

Pre-Merge Checklist

@github-actions github-actions bot added the area/documentation Improvements or additions to documentation label Oct 15, 2021
6. You're done!
6. We add the `final` keyword wherever possible. It's a drag to have to do it manually, however, so we set up the IDE to do it for us. You can either set this as the default for your IDE or you can set it just for the Airbyte project(s) that you are using.
1. Turn on the inspection. Go into project settings...
1. Editor > Inspections > Search "Field may be 'final'" > check the box
Copy link
Contributor

Choose a reason for hiding this comment

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

I think that the search result are too large. It may be better to explicitly git the path in the tree (java > coding style issues > [The 2 suggested search])

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i'll add a note to search with the double quotes included. if you include the double quotes in the search then it should only return one result.

3. Apply the changes.
2. Turn on the auto add final. Go into project settings...
1. Plugins - install Save Actions if not already installed.
2. Go to Save Actions
Copy link
Contributor

Choose a reason for hiding this comment

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

This is pretty clear to me. First I was confused by the fact that I am using the build in IntelliJ tool (Tools > Actions on Save). I disabled the build in order to use the functionalities provided by save on Actions. I have also checked the optimize import and reformat file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added an explanation differentiating the 2.

@cgardens cgardens requested a review from jrhizor October 15, 2021 21:25
@cgardens cgardens merged commit 8ddfd90 into master Oct 15, 2021
@cgardens cgardens deleted the cgardens/add_docs_on_final branch October 15, 2021 23:42
@cgardens cgardens temporarily deployed to more-secrets October 15, 2021 23:43 Inactive
schlattk pushed a commit to schlattk/airbyte that referenced this pull request Jan 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants