Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: CI
on:
push:
branches: [main, dev]
pull_request:

jobs:
shellcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install shellcheck
run: sudo apt-get update && sudo apt-get install -y shellcheck
- name: Lint (errors)
run: |
shopt -s globstar nullglob
shellcheck -S error \
setup.sh uninstall.sh update.sh \
src/emerger.sh src/lib/*.sh
- name: Lint (warnings, non-blocking)
run: |
shopt -s globstar nullglob
shellcheck -S warning \
setup.sh uninstall.sh update.sh \
src/emerger.sh src/lib/*.sh || true

tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install bats
run: sudo apt-get update && sudo apt-get install -y bats
- name: Run bats
run: bats tests/
111 changes: 52 additions & 59 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,59 +1,52 @@
Contributions to this project are very appreciated, though we require some formalisms:
<ol>
<li>
You are not required to explain everything you did inside code comments. But when you are creating code that spans between multiple files, or it requires more than basic knowledge to be understood, help everyone understand what you are doing by leaving small comments inside your code or by explaining the stream of consciousness inside the pull request.
</li>
<li>
When creating a pull request, point to an issue or explain what you did using few words (this is an extension of what was said in rule 1).
</li>
<li>
Not following step 1 and step 2, will not exclude your contribution but it will slow the development process because we will have to make questions before accepting your request.
</li>
<li>
We will not accept contributions containing <i>shady code</i> or any form of <i>crime</i>.<br>
Examples of <i>shady code</i> is, but not limited to:
<ul>
<li>
References and links to servers we don't own or that are not certified
</li>
<li>
Exposing users to external or internal vulnerabilities
</li>
<li>
Using code tricks to bypass privileges or access reserved memory areas
</li>
</ul>
Examples of <i>crimes</i> are, but not limited to:
<ul>
<li>
Discrimination based on ethnicity, sex, religion, physical aspect, sexual orientation or any other individual right protected by Human Rights or by simple logic and maturity
</li>
<li>
Cybercrimes
</li>
</ul>
</li>
<li>
It's not mandatory, but try to follow the already existing code indentation.
</li>
<li>
Since we believe in a friendly enviroment, memes are permitted in comments. Just don't abuse them and respect rule 4.
</li>
<li>
You can contribute using your licensed code, though we will have to check few things before:
<ol>
<li>
You are the real author
</li>
<li>
The contribution respects rule 4
</li>
<li>
If you propose someone else's code to be integrated, the integration will have to respect the author's needs and will. Basically we have to respect its license.
</li>
</ol>
</li>
<li>
Last but not least, no one on this planet is born knowning everything. If you respect all the rules above but your pull request is rejected because of the nature of your code, your contribution will not be vain. Your help may give someone else ideas, or the possibility to refactor your code and make it more readable. This is the meaning of open source. Also remember that even us, the creators, started all of this knowing almost nothing, so don't be afraid to be judged.
</li>
<ol>
# Contributing

First of all, thanks for being here! Contributions are very appreciated, but we ask you to follow a few simple rules so everyone can enjoy the ride.

## 1. Comment your code (just a little)

You don't need to explain every single line. But if your change spans multiple files, or it takes more than basic knowledge to understand, please leave a few small comments or share your stream of consciousness in the pull request. Future us (and you) will be grateful.

## 2. Write meaningful pull requests

When opening a PR, link to an issue or describe what you did in a few words. Think of it as an extension of rule 1.

## 3. About rules 1 and 2

Skipping them won't get your contribution rejected, but it will slow things down, since we'll have to ask questions before merging.

## 4. No shady code, no crimes

We will not accept contributions containing *shady code* or any form of *crime*.

Examples of *shady code* (not limited to):

- References and links to servers we don't own or that are not certified
- Exposing users to external or internal vulnerabilities
- Code tricks to bypass privileges or access reserved memory areas

Examples of *crimes* (not limited to):

- Discrimination based on ethnicity, sex, religion, physical aspect, sexual orientation, or any other individual right protected by Human Rights or by simple logic and maturity
- Cybercrimes

## 5. Mind the indentation

Not mandatory, but please try to match the existing code style. It keeps the codebase tidy.

## 6. Memes are welcome

We believe in a friendly environment, so memes in comments are totally fine. Just don't overdo it, and always respect rule 4.

## 7. Licensed code

You can contribute with your licensed code, but we'll have to check a few things first:

1. You are the real author.
2. The contribution respects rule 4.
3. If you propose someone else's code, the integration must respect the author's needs and license.

## 8. Don't be afraid

No one on this planet is born knowing everything. If you follow all the rules above but your PR gets rejected because of the nature of your code, your effort won't be in vain: your work may give someone else ideas, or the chance to refactor it into something even better. That's the beauty of open source.

And remember, even us, the creators, started out knowing almost nothing. So really, don't be afraid of being judged. Just jump in.
Loading
Loading