best_practices.md
(Please talk to people on the mailing list before you change this page, see our section on how to get in touch)
We have decided that LLM/Agent/AI contributions are fine as long as they are within the instructions set out by this document.
submodule: description
longer description of the change you have made, eventually mentioning the
number of the issue that is being fixed, in the form: Fixes #someIssueNumber
Fixes #xxx" so that the bug report is auto-closed when the PR is
merged. It is less useful to say the same thing in a commit message because
GitHub will spam the bug report every time the commit is rebased, and
because a bug number alone becomes meaningless in forks. (A full URL would
be better, but ideally each commit is readable on its own without the need
to examine an external reference to understand motivation or context.)WARN in the log informing that the feature is going to be removedIf you send logfiles, please set the loglevel switch DEBUG in your settings.json file:
/* The log level we are using, can be: DEBUG, INFO, WARN, ERROR */
"loglevel": "DEBUG",
The logfile location is defined in startup script or the log is directly shown in the commandline after you have started etherpad.
To make sure everybody is going in the same direction:
see git flow http://nvie.com/posts/a-successful-git-branching-model/
master branchdevelopbranchOver the time we pull features from feature branches into the develop branch. Every month we pull from develop into master. Bugs in master get fixed in hotfix branches. These branches will get merged into master AND develop. There should never be commits in master that aren't in develop
The docs are in the doc/ folder in the git repository, so people can easily find the suitable docs for the current git revision.
Documentation should be kept up-to-date. This means, whenever you add a new API method, add a new hook or change the database model, pack the relevant changes to the docs in the same pull request.
You can build the docs e.g. produce html, using make docs. At some point in the future we will provide an online documentation. The current documentation in the github wiki should always reflect the state of master (!), since there are no docs in master, yet.
Front-end tests are found in the tests/frontend/ folder in the repository. Run them by pointing your browser to <yourdomainhere>/tests/frontend.
Back-end tests can be run from the src directory, via npm test.
You can use npm test -- --inspect-brk and navigate to edge://inspect or chrome://inspect to debug the tests.