Skip to content

Commit da4f50e

Browse files
committed
website: Added editorconfig-setup page to configure .editorconfig support in common IDEs and other text editors. Added step to CONTRIBUTING.md to review that section before contributing.
1 parent 5715ad1 commit da4f50e

3 files changed

Lines changed: 53 additions & 2 deletions

File tree

CONTRIBUTING.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Lucene.NET Contributor's Guide
1+
# Lucene.NET Contributor's Guide
22

33
Have you found a bug or do you have an idea for a cool new enhancement? Contributing code is a great way to give something back to the open-source community. Before you dig right into the code there are a few guidelines that we need contributors to follow so that we can have a chance of keeping on top of things.
44

@@ -7,6 +7,7 @@ Have you found a bug or do you have an idea for a cool new enhancement? Contribu
77
- Read [Open Source Contribution Etiquette](http://tirania.org/blog/archive/2010/Dec-31.html) and [Don't "Push" Your Pull Requests](http://www.igvita.com/2011/12/19/dont-push-your-pull-requests/).
88
- Make sure you have a [GitHub account](https://github.com/signup/free). NOTE: Although this is a mirror of our Git repository, pull requests are accepted through GitHub.
99
- If you are thinking of adding a feature, we would appreciate you opening a discussion on our [developer mailing list](https://cwiki.apache.org/confluence/display/LUCENENET/Mailing+Lists) before you start writing. It could save both you and our team quite a bit of work if the code doesn't have to be rewritten to fit in with our overall objectives.
10+
- [Set Up .editorconfig support](https://lucenenet.apache.org/contributing/editorconfig-setup.html) in your editor to ensure common styles (such as whitespace handling) are respected.
1011
- Submit a [new issue on GitHub](https://github.com/apache/lucenenet/issues), assuming one doesn't exist already.
1112
- If reporting a bug, clearly describe the issue including steps to reproduce, observed behavior, and expected behavior.
1213
- If reporting a bug, provide source code that we can run without any alteration demonstrating the issue. Issues submitted with runnable code will be given a higher priority than those submitted without.
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
uid: contributing/editorconfig-setup
3+
---
4+
5+
# EditorConfig Setup
6+
7+
This project uses style rules setup in .editorconfig files. This allows us to manage style rules such as whitespace and indent style so they are consistent between different contributors and will create smaller diffs to review. To make pull requests go smoothly, it is important that each contributor ensure that these rules are respected. The best way is to use an editor that supports .editorconfig styles and to configure it to detect these files automatically.
8+
9+
### 🧠 Visual Studio
10+
- Go to: **Tools > Options > Text Editor > [Language] > Code Style > General**
11+
- Enable: **"Detect EditorConfig settings"**
12+
- Optionally enable: **"Reformat on save"** (under Code Cleanup)
13+
14+
### 🧰 JetBrains Rider
15+
- Go to: **Preferences > Editor > Code Style**
16+
- Enable: **"Enable EditorConfig support"**
17+
- Re-save the affected files to apply the formatting
18+
19+
### 💡 Visual Studio Code
20+
- Install the **EditorConfig for VS Code** extension
21+
- In your `settings.json`, enable:
22+
- `"files.insertFinalNewline": true`
23+
- `"files.trimTrailingWhitespace": true`
24+
25+
### 📝 Notepad++
26+
- Go to: **Settings > Preferences > MISC**
27+
- Enable: **"Final line ending"**
28+
- Go to: **Settings > Preferences > Language > Tab Settings**
29+
- Enable: **"Replace by space"** and configure indentation properly
30+
31+
### 🔧 Other Common Editors for .NET
32+
- **JetBrains ReSharper** (for Visual Studio)
33+
- **OmniSharp**-based editors (NeoVim, Sublime Text, etc.)
34+
- **Vim** with [`editorconfig-vim`](https://github.com/editorconfig/editorconfig-vim)
35+
- **Emacs** with [`editorconfig-emacs`](https://github.com/editorconfig/editorconfig-emacs)
36+
37+
### 🌍 Not Sure If Your Editor Supports It?
38+
Check these official lists:
39+
- Editors with built-in support: https://editorconfig.org/#pre-installed
40+
- Editors with plugin support: https://editorconfig.org/#download
41+
42+
---
43+
44+
✅ After configuring your editor, **open each file with errors, make a whitespace-only change, and save**. This will apply your formatting settings and fix the rule violations.
45+
46+
## Pull Request Workflow
47+
48+
We highly recommend using an editor that supports .editorconfig and configure it to respect the formatting rules. However, when submitting pull request, there is an EditorConfig Rules Check workflow that will compare the styles in the PR against the .editorconfig and report any violations. This uses the [editorconfig-checker tool](https://github.com/editorconfig-checker/editorconfig-checker), which reports the file path and line number of each violation. If any of these checks fail, it will allow contributors to fix any style violations prior to requesting a PR review even if the editor used doesn't support .editorconfig.

websites/site/contributing/toc.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
- name: Community Links
1+
- name: Community Links
22
href: community-links.md
33
- name: Mailing Lists
44
href: mailing-lists.md
@@ -8,6 +8,8 @@
88
href: issue-tracker.md
99
- name: Website & Docs
1010
href: documentation.md
11+
- name: EditorConfig Setup
12+
href: editorconfig-setup.md
1113
- name: Current status
1214
href: current-status.md
1315
- name: Making a release

0 commit comments

Comments
 (0)