You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+15-14Lines changed: 15 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,11 +7,10 @@ There are a few things which we require in any contribution:
7
7
- This repository comes with a `.editorconfig` file, so the following requirements will be taken care of if you have [EditorConfig](https://editorconfig.org/) installed:
8
8
- Tabs consist of 2 spaces.
9
9
- Files end with a newline.
10
-
- Line endings in addon files must be Windows-Style (CRLF). This is a WoW AddOn, pretty much everyone is going to be running Windows when using or developing WeakAuras.
11
10
- No trailing whitespace at the end of a line.
11
+
- We use [StyLua](https://github.com/JohnnyMorganz/StyLua) for automatic code formatting. Make sure you apply it to your changes before commiting them. There are extensions for the most common IDEs and editors as well as CLI tools to do that.
12
12
- All user-facing strings (`names` and `desc` fields in AceConfig tables, mostly) must be localized:
13
13
- We use a locale scraper to find translation phrases and automatically export them to CurseForge for translation. This scraper parses the addon files, looking for tokens that look like: `L["some translation phrase"]`. You must use double quoted strings, and name the localization table (found at `WeakAuras.L`) `L` in your code for this to work properly.
14
-
- When writing a new file, avoid using semicolons. When modifying code in an existing file, try to be consistent, but err on the side of no semicolons.
15
14
- New features should be indicated by concatenating `WeakAuras.newFeatureString` onto the associated translation phrase. We will remove the new feature indicator approximately 3 months after the first release.
16
15
17
16
## Pull Requests
@@ -24,19 +23,19 @@ If you want to help, here's what you need to do:
24
23
1. Create a new topic branch (based on the `main` branch) to contain your feature, change, or fix.
25
24
26
25
```bash
27
-
>git checkout -b my-topic-branch
26
+
git checkout -b my-topic-branch
28
27
```
29
28
30
29
1. Set `core.autocrlf` to true.
31
30
32
31
```bash
33
-
>git config core.autocrlf true
32
+
git config core.autocrlf true
34
33
```
35
34
36
35
1. Set `pull.rebase`to true.
37
36
38
37
```bash
39
-
>git config pull.rebase true
38
+
git config pull.rebase true
40
39
```
41
40
42
41
1. Set up your [Git identity](https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup) so your commits are attributed to your name and email address properly.
@@ -45,11 +44,13 @@ If you want to help, here's what you need to do:
45
44
46
45
1. Install an [EditorConfig](https://editorconfig.org/) plugin for your text editor to automatically follow our indenting rules.
47
46
47
+
1. Install and run [StyLua](https://github.com/JohnnyMorganz/StyLua).
48
+
48
49
1. Commit and push your changes to your new branch.
49
50
50
51
```bash
51
-
>git commit -a -m "commit-description"
52
-
>git push
52
+
git commit -a -m "commit-description"
53
+
git push
53
54
```
54
55
55
56
1. [Open a Pull Request](https://github.com/WeakAuras/WeakAuras2/pulls) with a clear title and description.
@@ -65,9 +66,9 @@ If you want to help, here's what you need to do:
65
66
- In order to sync your fork with the upstream WeakAuras repository you would do
66
67
67
68
```bash
68
-
>git fetch upstream
69
-
>git checkout main
70
-
>git rebase upstream/main
69
+
git fetch upstream
70
+
git checkout main
71
+
git rebase upstream/main
71
72
```
72
73
73
74
- You are now all synced up.
@@ -77,16 +78,16 @@ If you want to help, here's what you need to do:
77
78
- In order to sync your pull request with the upstream WeakAuras repository incase there are any conflicts you would do
78
79
79
80
```bash
80
-
>git fetch upstream
81
-
>git checkout my-topic-branch
82
-
>git rebase upstream/main
81
+
git fetch upstream
82
+
git checkout my-topic-branch
83
+
git rebase upstream/main
83
84
```
84
85
85
86
- In case there are any conflicts, you will now have to [fix them manually](https://help.github.com/articles/resolving-merge-conflicts-after-a-git-rebase/).
86
87
- After you're done with that, you are ready to force-push your changes.
87
88
88
89
```bash
89
-
> git push --force
90
+
git push --force
90
91
```
91
92
92
93
- Note: Force-pushing is a destructive operation, so make sure you don't lose something in the progress.
[](https://discord.gg/weakauras)[](https://www.patreon.com/weakauras)
0 commit comments