When contributing to SerenityOS, make sure that the changes you wish to make are in line with the project direction. If you are not sure about this, open an issue first, so we can discuss it.
For your first couple of PRs, start with something small to get familiar with the project and its development processes. Please do not start by adding a new application, library or other large component.
Everyone is welcome to work on the project, and while we have lots of fun, it's a serious kind of fun. :^)
Join our Discord server: SerenityOS Discord
Unlike many other software projects, SerenityOS is not concerned with gaining the largest possible userbase. Its target audience is its own developers. As such, we have limited interest in feature requests from non-contributors.
That said, please do file any bugs you find, keeping the following in mind:
#build-problems
channel on Discord.In SerenityOS, we treat human language as seriously as we do programming language.
The following applies to all user-facing strings, code, comments, and commit messages:
Everyone is encouraged to make use of tooling (spell checkers, etc) to make this easier.
When possible, please include tests when fixing bugs or adding new features.
Nobody is perfect, and sometimes we mess things up. That said, here are some good dos & don'ts to try and stick to:
Do:
AK
containers in all code.clang-format
(version 18 or later) to automatically format C++ files. See AdvancedBuildInstructions.md for instructions on how to get an up-to-date version if your OS distribution does not ship clang-format-18.LibAudio
, HackStudio
, Base
, Kernel
, ConfigServer
, cat
Userland
" or "Utilities
", except for generic changes that affect a large portion of code within these directories.LibGUI: Brief description of what's being changed in FooWidget
rather than FooWidget: Brief description of what's being changed
+
, e.g. LibJS+LibWeb+Browser: ...
optipng -strip all
on them to optimize and strip away useless metadata - this can reduce file size from multiple kilobytes to a couple hundred bytes.Don't:
While unadvertised PRs may get randomly merged by curious maintainers, you will have a much smoother time if you engage with the community on Discord.
Ping them right away if it's something urgent! If it's less urgent, advertise your PR on Discord (#code-review
) and ask if someone could review it.
Maintainership is by invitation only and does not correlate with any particular metric.
Yes, we have a "stalebot" that will mark untouched PRs as "stale" after 21 days, and close them after another 7 days if nothing happens.
In theory, the best person to speak with is whoever wrote most code adjacent to what you're working on. In practice, asking in one of the development channels on Discord is usually easier/better, since that allows many people to join the discussion.
It's definitely better to ask on Discord. Due to the volume of GitHub notifications, many of us turn them off and rely on Discord for learning about review requests.
The repository contains a file called .pre-commit-config.yaml
that defines several 'commit hooks' that can be run automatically just before and after creating a new commit. These hooks lint your commit message, and the changes it contains to ensure they will pass the automated CI for pull requests.
To enable these hooks firstly follow the installation instructions available at https://pre-commit.com/#install and then enable one or both of the following hooks:
pre-commit install
pre-commit install --hook-type commit-msg
Sometimes good PRs get abandoned by the author for one reason or another. If the PR is fundamentally good, but the author is not responding to requests, the PR may be manually integrated with minor changes to code and commit messages.
To make this easier, we do appreciate it if folks enable the "Allow edits from maintainers" flag on their pull requests.
This is a purely technical project. As such, it is not an appropriate arena to advertise your personal politics or religious beliefs. Any changes that appear ideologically motivated will be rejected.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。