Files
qdl/CONTRIBUTING.md
Igor Opaniuk 187c4496a3 CONTRIBUTION: split contribution guide out of README
The README has grown to cover build instructions, a wide range of
usage workflows (EDL, WSL2, VIP, multi-programmer targets, crash
dumps, kickstart, ...) and the contribution policy in a single file,
which makes it long and harder to navigate.

Move the contribution documentation - PR workflow, Linux kernel coding
style, the checkpatch (check-cached/check-range/check) and markdown-lint
targets - into a dedicated CONTRIBUTING.md. GitHub surfaces that file
automatically on the new-PR and issue pages, so contributors find the
guidance without scrolling through the README. The README keeps a short
Contributing section linking to it.

No content was changed in the move; only its location.

Signed-off-by: Igor Opaniuk <igor.opaniuk@oss.qualcomm.com>
2026-06-27 15:59:24 +02:00

2.1 KiB

Contributing

Please submit any patches to the qdl (master branch) by using the GitHub pull request feature. Fork the repo, create a branch, do the work, rebase with upstream, and submit the pull request.

The preferred coding style for this tool is Linux kernel coding style.

Before creating a commit, please ensure that your changes adhere to the coding style by using the meson compile check-cached -C build target, for example:

$ git status
On branch improvements
Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
  modified:   qdl.c
  modified:   qdl.h

$ meson compile check-cached -C build
[0/1] Running external command check-cached (wrapped by meson to set env)
Running checkpatch on staged changes...
ERROR: trailing whitespace
#28: FILE: qdl.h:32:
+^IQDL_DEVICE_USB,   $

total: 1 errors, 0 warnings, 0 checks, 27 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

NOTE: Whitespace errors detected.
      You may wish to use scripts/cleanpatch or scripts/cleanfile

Your patch has style problems, please review.

To verify a series of commits the same way the CI does (per-commit, in patch mode), use the check-range target. It runs checkpatch on every commit in $CHECKPATCH_BASE..$CHECKPATCH_HEAD (defaulting to origin/master..HEAD):

meson compile check-range -C build

To restrict the range explicitly, set the environment variables before invoking meson:

CHECKPATCH_BASE=origin/master CHECKPATCH_HEAD=HEAD \
    meson compile check-range -C build

The full file-mode check (run against every tracked C/H/sh source) is also available:

meson compile check -C build

Markdown sources are linted with mdl. Install it via sudo apt install markdownlint (or gem install mdl) and run:

meson compile markdown-lint -C build

The wrapper script is invoked from the GitHub Actions workflow as well, so a green local run reflects what CI will report.