Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document pre-commit checks; update instructions for submitting sample files #71

Merged
merged 2 commits into from
Nov 21, 2023
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
1 change: 1 addition & 0 deletions _includes/links.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
[wiki]: https://github.com/openslide/openslide/wiki
[testdata]: https://openslide.cs.cmu.edu/download/openslide-testdata/
[snapshots]: /builds/
[submit-sample]: /submit/

[doc-dev]: /#development
[doc-debugopts]: /docs/debugopts/
Expand Down
18 changes: 13 additions & 5 deletions docs/devguide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,27 @@ addressing feedback from code review, edit your existing commits with `git
rebase -i` and update the branch with `git push -f`, rather than appending
fixup commits to the branch.

OpenSlide uses Git hooks and the [pre-commit][pre-commit] framework to
check coding style when you commit. To configure the hooks, install
pre-commit from your package manager or with `pip install pre-commit`, then
run `pre-commit install` in your OpenSlide checkout. The pre-commit checks
are also rerun as part of OpenSlide's CI.

Please discuss your changes on the [openslide-users][users-subscribe]
mailing list or in a GitHub issue, *before* you are ready to submit them, so
that we can help you integrate your code into the existing codebase.

When contributing support for a new format, we *strongly* prefer that you
also contribute example slide files for our [openslide-testdata][testdata]
repository. The example files must be data that you are entitled to
contribute, and the OpenSlide project must receive permission to
redistribute them with or without modification. Email the mailing list for
instructions on how to accomplish this.
also [contribute example slide files][submit-sample] for our
[openslide-testdata][testdata] repository. The example files must be data
that you are entitled to contribute, and the OpenSlide project must receive
permission to redistribute them under the [Creative Commons Zero][cc0]
license. See the [submission form][submit-sample] for more details.

[rjones]: https://people.redhat.com/~rjones/how-to-supply-code-to-open-source-projects/
[rjones-splitting-commits]: https://people.redhat.com/~rjones/how-to-supply-code-to-open-source-projects/#split_patches
[pre-commit]: https://pre-commit.com/
[cc0]: https://creativecommons.org/publicdomain/zero/1.0/legalcode


## Original development guide
Expand Down
2 changes: 1 addition & 1 deletion docs/newformat/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ common cleanup label. `g_autoptr()` is suitable for structs with their own
free functions, and `g_autofree` is for arbitrary memory that can be freed
with `g_free()`. Variables declared with `g_auto*` must always be
initialized on the spot (perhaps to `NULL`) to avoid freeing a garbage
pointer; CI has a check for this.
pointer; pre-commit checks include a test for this.

When allocating an object that will be returned from the function, or will
be linked into data structures that outlive the function, prefer using
Expand Down