Skip to content

Commit f73b55f

Browse files
authored
Update some documents (SkriptLang#2832)
1 parent deb75ac commit f73b55f

13 files changed

+128
-131
lines changed

.github/ISSUE_TEMPLATE/bug-report.md

-31
This file was deleted.

.github/ISSUE_TEMPLATE/question.md

-9
This file was deleted.

.github/ISSUE_TEMPLATE/suggestion.md

-8
This file was deleted.

.github/CONTRIBUTING.md .github/contributing.md

+32-30
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
11
# Contributing to Skript
2-
Skript is an open source project. That basically means that you are
3-
encouraged to contribute by reporting issues and writing code. Basic
4-
guidelines are posted below to save time from everyone.
2+
Skript is an open source project, and you're encouraged to contribute to it.
3+
Both reporting issues and writing code help us. However, please review the
4+
following guidelines *before* doing either of these. Properly created issues
5+
and pull requests are often resolved faster than those that ignore them.
6+
7+
## Behavior
8+
Please treat others with respect in the issue tracker and comments of pull
9+
requests. We hope that you are a decent person and do this without telling.
10+
Failing that, issues where inappropriate behavior is observed may be ignored
11+
closed or even deleted. Repeated or particularly egregious behavior will get
12+
you banned from issue trackers of SkriptLang organization.
13+
14+
Access to Skript's source code is a right that everyone with a binary release
15+
of it has. Access to our communications platforms is a *privilege* that will
16+
be taken away if misused.
517

618
## Issues
719
Issues are usually used to report bugs and request improvements or new features.
@@ -13,9 +25,6 @@ are SkUnity forums and Discord (see README again).
1325
Don't be scared to report real bugs, though. We won't be angry if we receive
1426
invalid reports; it is just that you're unlikely to get help with those here.
1527

16-
Oh, and one more thing: please avoid being offensive in Skript's issue tracker.
17-
It doesn't help anyone and may also get you banned.
18-
1928
### Reporting Bugs
2029
So, you have found out a potential Skript bug. By reporting it correctly, you
2130
can ensure that it will be correctly categorized as a bug and hopefully, fixed.
@@ -29,21 +38,15 @@ technically stable, they tend to not work reliably with Minecraft 1.9+.
2938
Second, test without addons. No, seriously; unless you're an addon developer,
3039
test without plugins that hook to Skript before reporting anything. We can't
3140
help you with addon issues here, unless we get a lot of technical information
32-
about the addon in question. Usually only developers of them know addons'
33-
Java code well enough.
41+
about the addon in question. Issues that are not tested without addons are
42+
likely to be ignored by the core team.
3443

3544
If the issue still persists, search the issue tracker for similar
3645
errors and check if your issue might have been already reported.
3746
Only if you can't find anything, open a new issue.
3847

39-
Now, what would you fill to the issue report?
40-
* A useful title (tl;dr for us busy and/or lazy developers)
41-
* Description of the issue, aka what does *not* work
42-
* Any error messages in the console (please use a paste service for lenghty errors)
43-
* Whether you tested without addons or not
44-
- *Sometimes* we do not ignore people who are testing with addons
45-
- Testing without is still better, unless you're an addon developer
46-
* Any additional information you think would be helpful
48+
When opening an issue, pick a template for a bug report and fill it.
49+
We may ignore or close issues that are not made with correct templates.
4750

4851
## Pull Requests
4952
Pull requests are a great way to contribute code, but there are still a few
@@ -74,29 +77,28 @@ time to [learn](https://help.github.com/categories/bootcamp/).
7477

7578
### When Programming
7679
We recommend using an IDE; you can find some set up instructions in README.
77-
Also, please follow our CODING_CONVENTIONS.
80+
Please also follow our [code conventions](https://github.com/SkriptLang/Skript/blob/master/.github/code-conventions.md).
7881

7982
### After Programming
8083
Test your changes. Actually, test more than your changes: if you think that you
8184
might have broken something unrelated, better to test that too. Nothing is more
8285
annoying than breaking existing features.
8386

87+
After manually testing, try to write some automated
88+
[test scripts](https://github.com/SkriptLang/Skript/blob/master/src/test/skript/README.md)
89+
if possible. Remember that not everything can be tested this way, though.
90+
8491
When you are ready to submit a pull request, please follow the template. Don't
8592
be scared, usually everything goes well and your pull request will be present
86-
in next Skript release.
93+
in next Skript release, whenever that happens.
8794

8895
Good luck!
8996

90-
### Insight: Pull Request Review
91-
Pull requests will be reviewed before they are merged.
92-
This includes testing the code, but *no* debugging if it doesn't work;
93-
please test your code before submitting a pull request.
94-
95-
The reviews are done by Skript developers with push access, but you're
96-
likely to get others to give feedback too. If you're asked about something,
97-
please answer - even if it is not us asking.
97+
### Pull Request Review
98+
Pull requests require one passing review before they can be merged. In
99+
addition to that, code submitted by people outside of core team must be tested
100+
by core team members. In some cases, this might be as simple as running the
101+
automated tests.
98102

99-
## Code Bounties
100-
Just to let you know, [Bountysource](https://www.bountysource.com/) is a thing.
101-
While it has not ever happened, you could post a bounty on an issue to make
102-
someone potentially do it faster.
103+
In exceptional situations, pull requests may be merged regardless of review
104+
status by @bensku.

.github/issue_template/bug-report.md

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: Bug Report
3+
about: Report a bug in Skript
4+
5+
---
6+
### Description
7+
<!--- What happened? --->
8+
9+
### Steps to Reproduce
10+
<!--- What did you do to make it happen? Provide as accurate instructions as possible! --->
11+
12+
### Expected Behavior
13+
<!--- What should have happened? --->
14+
15+
### Errors / Screenshots
16+
<!--- Console errors and screenshots of visual bugs in game, if you have any --->
17+
18+
<!---
19+
If you have console errors, copy them to a paste service which won't delete them.
20+
DON'T use Hastebin!
21+
--->
22+
23+
<!--
24+
Screenshots of bugs visible in-game can also be attached.
25+
--->
26+
27+
### Server Information
28+
* **Server version/platform:** <!-- /version -->
29+
* **Skript version:** <!-- /version Skript ("latest" is not useful, we need the version number) -->
30+
31+
### Additional Context
32+
<!--- Anything you'd like to add? This can be left empty. --->

.github/issue_template/suggestion.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
name: Suggestion
3+
about: Suggest a new feature or other improvement for Skript
4+
---

.github/pull_request_template.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
### Description
2-
<!--- Add something that describes the pull request here --->
2+
<!--- Describe your changes here. --->
33

44
---
5-
**Target Minecraft Versions:** <!-- 'any' means 1.9+ -->
6-
**Requirements:** <!-- Is Paper required? Are there plugin requirements?... -->
7-
**Related Issues:** <!-- Specify the related issues if any, like #ID -->
5+
**Target Minecraft Versions:** <!-- 'any' means all supported versions -->
6+
**Requirements:** <!-- Required plugins, Minecraft versions, server software... -->
7+
**Related Issues:** <!-- Links to related issues -->

DEVELOPMENT_MODEL.md

-26
This file was deleted.

README.md

-13
Original file line numberDiff line numberDiff line change
@@ -174,19 +174,6 @@ Note that these resources are not maintained by Skript's developers. Don't
174174
contact us about any problems you might have with them.
175175

176176
## Developers
177-
Current team behind Skript:
178-
179-
* [bensku](https://github.com/bensku) (Skript maintainer/developer)
180-
* [FranKusmiruk](https://github.com/FranKusmiruk) (Skript developer)
181-
* [Pikachu920](https://github.com/Pikachu920) (Skript developer)
182-
* [Nicofisi](https://github.com/Nicofisi) (Skript developer)
183-
* [TheBentoBox](https://github.com/TheBentoBox) (issue tracker manager, aliases developer)
184-
185-
We should also thank [Njol](https://github.com/Njol) for creating
186-
Skript and [Mirreski](https://github.com/Mirreski) for maintaining it for a
187-
long time.
188-
189-
And of course, Skript has received lots of pull requests over time.
190177
You can find all contributors [here](https://github.com/SkriptLang/Skript/graphs/contributors).
191178

192179
All code is owned by its writer, licensed for others under GPLv3 (see LICENSE)

branches.md

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Branches
2+
Skript utilizes Git branches to keep development more manageable.
3+
4+
## Feature branches
5+
Anyone with push access can create these. Core developers may use them to work
6+
on code changes that other people would fork Skript for. Pull requests are used
7+
to merge code from feature branches to anywhere else.
8+
9+
## Stable
10+
A branch that contains the last revision current stable release or current
11+
beta release (e.g. 2.4). Only bug fixes should be merged here. This branch is
12+
merged to master every time bugs are fixed.
13+
14+
## Master
15+
A branch that contains the next Skript release, or current alpha release.
16+
Development on new features happens here, but bug fixes should target the
17+
stable branch instead, unless the bugs do not exist there.

CODING_CONVENTIONS.md code-conventions.md

+19-10
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,44 @@
1-
# Coding Conventions
1+
# Code Conventions
22

33
## Security
4-
(this is very important)
4+
Keep in mind that your code will be running on hundreds or thousands of
5+
servers; security matters. Following these guidelines is *vital* for all new
6+
code. Contributors should also see the dedicated
7+
[security document](security.md).
8+
59
* **NO MALICIOUS CODE** - I think you already knew this
610
```java
711
Runtime.getRuntime().exec("rm -rf /"); // Really BAD
812
```
9-
* **DO NOT** submit private information (passwords, etc.) to the Git
13+
* **DO NOT** submit secrets (passwords, etc.) to the Git
1014
```java
1115
String myApiToken = "f6dd0c930676da532136fbef805ef1553ebaca83"; // Really BAD
1216
// Though this is not a real token - can you find what it is?
1317
```
18+
- If this happens and somehow gets past code review, you'll have to change
19+
your secrets; we are generally unwilling to 'force push' anything
1420
* Client or server crashes/freezes shouldn't be easy to create from scripts
1521
```java
1622
if (matchedPattern == 0)
1723
wait(1000); // BAD
1824
```
19-
* Obvious bad ideas (such as MD5 hashing) should not look safe to scripters
25+
- This is not to say that you can't currently crash the client, but avoid
26+
adding any more ways to cause trouble
27+
- Be especially wary of things people might accidentally use
28+
* Obviously bad ideas (such as MD5 hashing) should not look safe to scripters
2029
```java
2130
MessageDigest md5 = MessageDigest.getInstance("MD5"); // BAD
2231
// ... although this is a snippet from Skript source code. Legacy stuff!
2332
```
33+
- Make it clear when scripts are doing something insecure or dangerous
34+
- Exception: consider twice before breaking API exposed to scripts
2435
* File or network IO, for now, should not be accessible from scripts
2536
```java
2637
String fileName = file.getSingle(e); // Bad
2738
```
2839
* Code contributed must be licensed under GPLv3, by *you*
2940
- Third party code under compatible licenses may be accepted in some cases
30-
31-
And, additionally:
32-
* Everyone with direct push access must use two factor authentication
33-
- https://xkcd.com/936/
41+
- We'll forward any complaints about code licensing to people who added it
3442

3543
## Formatting
3644
* Tabs, no spaces (unless in code imported from other projects)
@@ -40,6 +48,7 @@ And, additionally:
4048
- In Javadoc/multiline comments, at most 80 characters per line
4149
* When statements consume multiple lines, all lines but first have two tabs of additional indentation
4250
* Each class begins with an empty line
51+
* No squeezing of multiple lines of code on a single line
4352
* Separate method declarations with empty lines
4453
- Empty line after last method in a class is *not* required
4554
- Otherwise, empty line before and after method is a good rule of thumb
@@ -129,7 +138,7 @@ Your comments should look something like these:
129138
```java
130139
import net.minecraft.server.v1_13_1.*; // BAD
131140
```
132-
* Target Minecraft versions are 1.9, 1.10, 1.11, 1.12 and 1.13 (latest revisions)
141+
* Target Minecraft versions are written in README
133142
- Skript **must** run on these MC versions, in one way or another
134143
* Supported server implementations are Spigot and Paper
135144
- Paper-specific functionality is acceptable
@@ -151,4 +160,4 @@ Your comments should look something like these:
151160
Biome.GIANT_SPRUCE_TAIGA_HILLS // Bad - 1.13 edition
152161
// Yes, these are exactly same biomes. No, I have no idea why this is the case
153162
* Skript must run with assertations enabled; use them in your development environment
154-
- JVM flag <code>-ea</code> is used to enable them
163+
- JVM flag <code>-ea</code> is used to enable them

security.md

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Security Document
2+
See also [code conventions](code-conventions.md); there are a few guidelines
3+
about security of added code there.
4+
5+
## Reporting security issues
6+
Security issues may be reported to core team members privately e.g. on Discord.
7+
Note that this applies *only* to security issues; everything else should still
8+
be posted to issue tracker.
9+
10+
Publicly posting security issues is also allowed, because not everyone has or
11+
wants a Discord account. We may add other channels for private reports in
12+
future.
13+
14+
## Team guidelines
15+
Everyone with push access must use two-factor authentication for their Github
16+
accounts. Should their account still be compromised, other team members should
17+
be immediately notified via Discord.

skript-worldguard6/.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.classpath
2+
.project
3+
.settings

0 commit comments

Comments
 (0)