6 Star 6 Fork 6

Gitee 极速下载 / libvips

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/libvips/libvips
克隆/下载
CONTRIBUTING.md 1.48 KB
一键复制 编辑 原始数据 按行查看 历史
John Cupitt 提交于 2023-09-21 18:56 . Add direct mode to dzsave (#3557)

Contributing to libvips

Thank you for your interest in contributing to libvips! There are many ways to contribute, and we appreciate all contributions.

Code style

This project uses clang-format to maintain a consistent code style throughout the codebase. We recommend using version 14 (as available in Ubuntu 22.04), to avoid any formatting mismatch with our GitHub Actions lint check.

clang-format can be used via the git-clang-format script. On some systems, it may already be installed (or be installable via your package manager). If so, you can simply run it – the following commands will format only the code on the staged changes:

# Stage original changes
$ git add .

# Run clang-format on staged changes
$ git clang-format

# Stage formatting changes and commit
$ git add .
$ git commit -m "My commit message"

Alternatively, you can format only the code changed in the most recent commit:

$ git clang-format HEAD~1

Note that this modifies the files, but doesn't commit them – you'll likely want to run:

$ git commit --amend -a

in order to update the last commit with all pending changes.

In an emergency, reformat the entire project with something like:

find . \
  \( -name "*.[hc]" -o -name "*.cc" -o -name "*.cpp" \) \
  -not \( -path "./libvips/foreign/libnsgif/*" -o \
    -name vips-operators.cpp -o \
    -name StandaloneFuzzTargetMain.c -o \
    -name profiles.c \) | \
  xargs clang-format -i
C/C++
1
https://gitee.com/mirrors/libvips.git
git@gitee.com:mirrors/libvips.git
mirrors
libvips
libvips
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891