Skip to content

Commit e70475a

Browse files
committed
Update readme and contributing for StyLua advice
1 parent dcb2fe9 commit e70475a

2 files changed

Lines changed: 17 additions & 15 deletions

File tree

CONTRIBUTING.md

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,10 @@ There are a few things which we require in any contribution:
77
- This repository comes with a `.editorconfig` file, so the following requirements will be taken care of if you have [EditorConfig](https://editorconfig.org/) installed:
88
- Tabs consist of 2 spaces.
99
- 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.
1110
- 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.
1212
- All user-facing strings (`names` and `desc` fields in AceConfig tables, mostly) must be localized:
1313
- 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.
1514
- 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.
1615

1716
## Pull Requests
@@ -24,19 +23,19 @@ If you want to help, here's what you need to do:
2423
1. Create a new topic branch (based on the `main` branch) to contain your feature, change, or fix.
2524

2625
```bash
27-
> git checkout -b my-topic-branch
26+
git checkout -b my-topic-branch
2827
```
2928

3029
1. Set `core.autocrlf` to true.
3130

3231
```bash
33-
> git config core.autocrlf true
32+
git config core.autocrlf true
3433
```
3534

3635
1. Set `pull.rebase`to true.
3736

3837
```bash
39-
> git config pull.rebase true
38+
git config pull.rebase true
4039
```
4140

4241
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:
4544

4645
1. Install an [EditorConfig](https://editorconfig.org/) plugin for your text editor to automatically follow our indenting rules.
4746

47+
1. Install and run [StyLua](https://github.com/JohnnyMorganz/StyLua).
48+
4849
1. Commit and push your changes to your new branch.
4950

5051
```bash
51-
> git commit -a -m "commit-description"
52-
> git push
52+
git commit -a -m "commit-description"
53+
git push
5354
```
5455

5556
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:
6566
- In order to sync your fork with the upstream WeakAuras repository you would do
6667

6768
```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
7172
```
7273

7374
- You are now all synced up.
@@ -77,16 +78,16 @@ If you want to help, here's what you need to do:
7778
- In order to sync your pull request with the upstream WeakAuras repository in case there are any conflicts you would do
7879

7980
```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
8384
```
8485

8586
- 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/).
8687
- After you're done with that, you are ready to force-push your changes.
8788
8889
```bash
89-
> git push --force
90+
git push --force
9091
```
9192
9293
- Note: Force-pushing is a destructive operation, so make sure you don't lose something in the progress.

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
# WeakAuras
44

5-
[![Build Status](https://github.com/WeakAuras/WeakAuras2/workflows/CI/badge.svg)](https://github.com/WeakAuras/WeakAuras2/actions?workflow=CI)
5+
[![Build Status](https://github.com/WeakAuras/WeakAuras2/workflows/CI/badge.svg)](https://github.com/WeakAuras/WeakAuras2/actions?workflow=CI) [![Code Style: StyLua](https://img.shields.io/badge/code%20style-stylua-brightgreen.svg)](https://github.com/JohnnyMorganz/StyLua "StyLua")
6+
67
[![WeakAuras on Discord](https://img.shields.io/badge/discord-weakauras-738bd7.svg?style=flat)](https://discord.gg/weakauras) [![Patreon](https://img.shields.io/badge/patreon-donate-orange.svg)](https://www.patreon.com/weakauras)
78

89
![Logo](https://i.imgur.com/wwbxeCG.jpeg)

0 commit comments

Comments
 (0)