Skip to content

Commit f664bc9

Browse files
authored
Updated search terms and corresponding image for code style settings (#15387)
1 parent 273537a commit f664bc9

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed
309 KB
Loading

docs/contributing-to-airbyte/code-style.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,20 @@ Install it in IntelliJ:
1515
1. `Import Scheme > IntelliJ IDEA code style XML`
1616
2. Select the file we just downloaded
1717
3. Select `GoogleStyle` in the dropdown
18-
4. Change default `Hard wrap at` in `Wrapping and Braces` tab to **150**.
19-
5. We prefer `import foo.bar.ClassName` over `import foo.bar.*`. Even in cases where we import multiple classes from the same package. This can be set by going to `Preferences > Code Style > Java > Imports` and changing `Class count to use import with '*'` to 9999 and \`Names count to use static import with '\*' to 9999.
20-
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.
21-
1. Turn on the inspection. Go into IntelliJ Preferences...
22-
1. Editor > Inspections > Search (with the quotation marks included) "Field may be 'final'" > check the box
23-
2. Editor > Inspections > Search "local variable or parameter can be final" > check the box
24-
3. Apply the changes.
25-
2. Turn on the auto add final. Go into IntelliJ Preferences...
26-
1. Plugins - install Save Actions if not already installed.
27-
2. Go to Save Actions in the preferences left nav (NOT Tools > Actions on Save -- that is a different tool)
28-
1. Activate save actions on save > check the box
29-
2. Active save actions on shortcut > check the box
30-
3. Activate save actions on batch > check the box
31-
4. Add final modifier to field > check the box
32-
5. Add final modifier to local variable or parameter > check the box
33-
6. Apply the changes.
18+
4. Change default `Hard wrap at` in `Wrapping and Braces` tab to **150**
19+
5. Airbyte prefers to have explicit imports (e.g. `import foo.bar.ClassName` over `import foo.bar.*`. This can be set by going to `Preferences > Code Style > Java > Imports` and changing `Class count to use import with '*'` to `9999` and `Names count to use static import with '\*'` to `9999`
20+
6. Add the `final` keyword wherever possible. 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
21+
1. Turn on the inspection. Go into `Preferences > Editor > Inspections`
22+
1. Search `"Field may be 'final'"` > check the box
23+
2. Search `"local variable or parameter can be 'final'"` > check the box
24+
3. Apply the changes
25+
2. Turn on the auto add final. Go into IntelliJ Preferences
26+
1. Plugins - install Save Actions if not already installed
27+
2. Go to Save Actions in the preferences [left navigation column](../assets/docs/save_actions_settings.png) (NOT Tools > Actions on Save -- that is a different tool)
28+
1. `Activate save actions on save` > check the box
29+
2. `Active save actions on shortcut` > check the box
30+
3. `Activate save actions on batch` > check the box
31+
4. `Add final modifier to field` > check the box
32+
5. `Add final modifier to local variable or parameter` > check the box
33+
6. Apply the changes
3434
7. You're done!

0 commit comments

Comments
 (0)