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
29 changes: 15 additions & 14 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,36 @@
This document contains a set of guidelines you need to follow before contributing to vicinae, be it through a bug report or code.
This document contains a set of guidelines you need to follow before contributing to Compass, be it through a bug report or code.

## Raising issues

All issues are tracked using the built-in GitHub issue tracker. If you are not sure your problem justifies creating a new issue, you can create a GitHub discussion or join the Discord server.
All issues are tracked in the [Compass issue tracker](https://github.com/tuna-os/compass/issues). Before opening an issue, do a quick search to make sure you are not creating a duplicate.

Before opening an issue, do a quick search to make sure you are not creating a duplicate.
For a bug, include the full output of `vicinae doctor` (or `flatpak run com.vicinae.Vicinae doctor`), your distribution and desktop, and whether you installed the Flatpak, a CI bundle or a source build. Most reports so far have been resolved from the `doctor` output alone.

Make sure to follow the issue template that is provided. In particular, bug issues should be submitted using the "Report Bug" command from vicinae directly, unless the bug results in the vicinae server not being able to start.
Compass is a fork of [Vicinae](https://github.com/vicinaehq/vicinae). Do not report Compass bugs to Vicinae. A bug in an extension from the Vicinae or Raycast store belongs in that extension's repository, unless it only happens on Compass.

If you want to report a bug relative to an extension published in the official vicinae store, you should open the issue in the [extension repository](https://github.com/vicinaehq/extensions), not in the main vicinae repository.

If you think you've found a severe security issue, you should contact the email address listed as the contact address for the [vicinaehq organization](https://github.com/vicinaehq).
If you think you've found a severe security issue, report it privately through GitHub's [security advisory form](https://github.com/tuna-os/compass/security/advisories/new) rather than in a public issue.

## Contributing code

### General guidelines

Less is more: each new line of code represents additional maintenance for the project and huge PRs have lower odds of being accepted, especially if they involve significant architectural commitments that were not discussed before.
Less is more: each new line of code represents additional maintenance for the project and huge PRs have lower odds of being accepted, especially if they involve significant architectural commitments that were not discussed before. For a big change, open an issue first. The [architecture decisions](docs/rust-engine/adr/README.md) record what has already been settled.

If you want to work on a big change, you should probably join the [discord server](https://vicinae.com/discord) and discuss it in the dev channel beforehand.
All submitted code needs to be locally tested. `make check-rust` runs what Rust CI runs: formatting, Clippy with warnings denied, and the workspace tests. [AGENTS.md](AGENTS.md) has the coding rules, and [RENDER-HARNESSES.md](docs/rust-engine/RENDER-HARNESSES.md) explains how to see the launcher without a desktop.

All submitted code needs to be locally tested. See [this page of the documentation](https://docs.vicinae.com/build) for build instructions and development tips.
Port work should preserve observable behaviour or update the [parity ledger](docs/rust-engine/PARITY.md) with evidence for an intentional difference. A C++ test may only be removed in the same change that adds its Rust replacement.

### Formatting and linting

Formatting is done with `clang-format`, as prescribed by the `.clang-format` file present at the root of the repository. Contributions must respect the format. You can run `make format` to apply formatting to all project files at once, but your IDE should be able to pick up on it and automatically format the code.
Rust code is formatted with `cargo fmt --all` and must pass `cargo clippy --workspace --all-targets -- -D warnings`.

The inherited C++ tree under `src/` is formatted with `clang-format`, as prescribed by the `.clang-format` file at the root of the repository; `make format` applies it. New C++ code must be checked against the `.clang-tidy` rules.

Keep the number of comments to a strict minimum, good code shouldn't need many comments. There are good use cases for comments though: if you feel like your solution to a given problem is not ideal, could be improved, or relies on a weird hack, using a comment to document it is encouraged. We don't use documentation generators at the moment, so such type of comments are not needed.
Keep the number of comments to a strict minimum, good code shouldn't need many comments. There are good use cases for comments though: if you feel like your solution to a given problem is not ideal, could be improved, or relies on a weird hack, using a comment to document it is encouraged.

A `.clang-tidy` configuration file was added very recently to the project, but it's not currently enforced because a lot of code has yet to be migrated. New code **must** be checked against these rules. Most IDEs should be able to automatically provide intellisense based on the presence of the `.clang-tidy` file alone.
### Performance claims

A pull request that claims a speed-up or a memory saving should say how it was measured. For anything the README's comparison covers, rerun `just bench-compare` and update [BENCHMARKS.md](docs/rust-engine/BENCHMARKS.md) with the new numbers.

### AI generated code

Expand All @@ -37,4 +39,3 @@ AI generated code is treated the same as regular code. As such, all the aforemen
AI is **not** a substitute for properly understanding and testing your code: don't be lazy. Lazy AI PRs that do not respect the guidelines will be rejected. In particular, keep your pull request's description as concise as possible: no maintainer will read your novel.

If your contribution was mostly AI generated, it's considered good practice to indicate what model or tool you used for that.

17 changes: 17 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ compass-ui = { path = "crates/compass-ui" }
compass-crypto = { path = "crates/compass-crypto" }
compass-clipboard = { path = "crates/compass-clipboard" }
compass-sqlcipher-sys = { path = "crates/compass-sqlcipher-sys" }
compass-wayland-foreign = { path = "crates/compass-wayland-foreign" }

anyhow = "1"
nucleo-matcher = "0.3.1"
Expand Down
Loading
Loading