Jump to content

Contribution guidelines: Difference between revisions

From jabara Wiki
add initial guidelines
 
No edit summary
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
This page contains guidelines for contributing code to [[Jabara]].
This page contains guidelines for contributing code to [[jabara]].


== Source access ==
== Source access ==
jabara is developed on a dedicated [https://forgejo.org Forgejo] instance hosted at [https://git.zelda.sr git.zelda.sr]. The primary repository is located under the jabara organization at [https://git.zelda.sr/jabara/jabara jabara/jabara]
jabara is developed on a dedicated [https://forgejo.org Forgejo] instance hosted at [https://git.zelda.sr git.zelda.sr]. The primary repository is located under the [https://git.zelda.sr/jabara jabara] organization at [https://git.zelda.sr/jabara/jabara jabara/jabara].


== Submitting changes ==
== Submitting changes ==
Contributions to jabara should be made as pull requests to the [https://git.zelda.sr/jabara/jabara repository].
Contributions to jabara should be made as pull requests to the repository. (Guidelines TBD)
(TBA more PR guidelines when this becomes relevant)


== Git guidelines ==
== Git guidelines ==
Git commit messages should be formatted as described by [https://www.conventionalcommits.org/en/v1.0.0/ Conventional Commits]. Here are a few well-formed examples:<br>
Git commit messages should follow the [https://www.conventionalcommits.org/en/v1.0.0/ Conventional Commits] conventions. Here are a few well-formed examples:


<code>chore: flatten imports and re-export `Cpu`</code><br>
* <code>chore: flatten imports and re-export `Cpu`</code>
* <code>fix(docs): use `align` instead of `style`</code>


<code>fix(docs): use `align` instead of `style`</code><br>
After the first release, changelogs will be kept as described by [https://keepachangelog.com/en/1.1.0/ Keep a Changelog] in the file `CHANGELOG.md`.


After the first release, changelogs will be kept as described by [https://keepachangelog.com/en/1.1.0/ Keep a Changelog].
== Code guidelines ==
 
All comments should make use of [[wikipedia:Markdown|Markdown]] formatting where applicable.
 
If referencing external sources for <code>jabara_core</code> implementation details (e.g. [https://switchbrew.org/wiki/Main_Page SwitchBrew], source code of emulators such as [https://git.greemdev.net/projects/Ryubing Ryujinx] or [https://git.eden-emu.dev/eden-emu/eden Eden]), include a comment linking to the source referenced.
 
Check for [https://doc.rust-lang.org/stable/clippy/index.html Clippy] lints by running <code>cargo clippy</code> and apply suggested changes, if any. If there is good reason not to apply a suggestion, add an <code>#[allow(clippy::some_lint)]</code> attribute to the smallest possible region (e.g. the function containing the offending code), along with a comment explaining your decision.


== Code guidelines ==
Ensure that all code has been formatted with [https://rust-lang.github.io/rustfmt/ Rustfmt] before committing. This can be done by configuring your editor to autoformat on save or by running <code>cargo fmt</code>.  
Ensure that all code has been formatted with rustfmt before committing. This can be accomplished through configuring your editor to autoformat on save, or running <code>cargo fmt</code>.  


You can disallow local commits with formatting issues by creating a pre-commit hook (create an executable file at <code>.git/hooks/pre-commit</code>) with this content:
You can disallow local commits with clippy lints or formatting issues by creating a pre-commit hook. Create an executable file at <code>.git/hooks/pre-commit</code> with the following content:
<pre>
<pre>#!/bin/sh
#!/bin/sh


cargo clippy -- -Dwarnings
cargo fmt --check
cargo fmt --check
</pre>
</pre>
== Documentation guideines ==
Lint all Markdown documentation with <code>[https://github.com/davidanson/markdownlint markdownlint]</code> before committing.

Latest revision as of 01:54, 3 April 2026

This page contains guidelines for contributing code to jabara.

Source access

jabara is developed on a dedicated Forgejo instance hosted at git.zelda.sr. The primary repository is located under the jabara organization at jabara/jabara.

Submitting changes

Contributions to jabara should be made as pull requests to the repository. (Guidelines TBD)

Git guidelines

Git commit messages should follow the Conventional Commits conventions. Here are a few well-formed examples:

  • chore: flatten imports and re-export `Cpu`
  • fix(docs): use `align` instead of `style`

After the first release, changelogs will be kept as described by Keep a Changelog in the file `CHANGELOG.md`.

Code guidelines

All comments should make use of Markdown formatting where applicable.

If referencing external sources for jabara_core implementation details (e.g. SwitchBrew, source code of emulators such as Ryujinx or Eden), include a comment linking to the source referenced.

Check for Clippy lints by running cargo clippy and apply suggested changes, if any. If there is good reason not to apply a suggestion, add an #[allow(clippy::some_lint)] attribute to the smallest possible region (e.g. the function containing the offending code), along with a comment explaining your decision.

Ensure that all code has been formatted with Rustfmt before committing. This can be done by configuring your editor to autoformat on save or by running cargo fmt.

You can disallow local commits with clippy lints or formatting issues by creating a pre-commit hook. Create an executable file at .git/hooks/pre-commit with the following content:

#!/bin/sh

cargo clippy -- -Dwarnings
cargo fmt --check

Documentation guideines

Lint all Markdown documentation with markdownlint before committing.