Skip to content

Commit 2ef5cdf

Browse files
Repo File Sync: Add AI Policy and check-no-default-features task (#83)
synced local file(s) with [OpenDevicePartnership/patina-devops](https://github.com/OpenDevicePartnership/patina-devops). 🤖: View the [Repo File Sync Configuration File](https://github.com/OpenDevicePartnership/patina-devops/blob/main/.sync/Files.yml) to see how files are synced. --- This PR was created automatically by the [repo-file-sync-action](https://github.com/BetaHuhn/repo-file-sync-action) workflow run [#23235303320](https://github.com/OpenDevicePartnership/patina-devops/actions/runs/23235303320) Signed-off-by: Patina Automation Bot <patina@microsoft.com> Co-authored-by: patina-automation[bot] <196234736+patina-automation[bot]@users.noreply.github.com>
1 parent 43f1447 commit 2ef5cdf

2 files changed

Lines changed: 42 additions & 0 deletions

File tree

CONTRIBUTING.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,30 @@ indicate that clearly in your pull request so that the project team can discuss
2020
* Format the code with `cargo make all`.
2121
* Use meaningful commit messages. See [this blogpost](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html)
2222

23+
## AI Policy
24+
25+
Patina does not accept contributions directly from AI tools (e.g. GitHub Copilot). If you use an AI tool to assist in
26+
the development of a Patina contribution, ensure that:
27+
28+
1. You have the legal right to submit the code generated by an AI tool under Patina's contribution and licensing
29+
guidelines.
30+
2. You fully understand the changes being made to the codebase and can explain the changes to other contributors.
31+
3. You have thoroughly reviewed the code to ensure it meets Patina contribution guidelines.
32+
4. You have thoroughly tested the code. Firmware changes must be tested on QEMU and a physical platform.
33+
34+
If you do not fully understand the changes being made to the codebase, please ask for help from the Patina
35+
community before submitting a pull request. You can start a GitHub discussion to get more background on a topic or
36+
submit a GitHub issue to report a bug or request.
37+
38+
At a minimum, contributors submitting firmware changes should have a working understanding of the Rust programming
39+
language and UEFI firmware development. If you are new to either topic, the Patina community is happy to help you
40+
and there are many existing resources available for both subjects on the Internet.
41+
42+
Patina maintainers reserve the right to reject or close a pull request at any time if it is determined to violate this
43+
policy, including cases where AI‑assisted contributions lack sufficient human understanding, review, testing, or legal
44+
clarity. If a user repeatedly violates this policy, they may be temporarily or permanently banned from contributing to
45+
the Patina project.
46+
2347
## PR Etiquette
2448

2549
* Make sure that GitHub status checks ("PR gates") pass in your PR.

Makefile.toml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,23 @@ description = "Checks rust code for errors. Example `cargo make check`"
9797
clear = true
9898
run_task = [{ name = ["check_no_std", "check_std", "check_tests"], parallel = true }]
9999

100+
[tasks.check-no-default-features-code]
101+
description = "Checks rust code compiles without default features."
102+
private = true
103+
command = "cargo"
104+
args = ["check", "--no-default-features", "@@split(CARGO_MAKE_TASK_ARGS, )"]
105+
106+
[tasks.check-no-default-features-tests]
107+
description = "Checks rust test code compiles without default features."
108+
private = true
109+
command = "cargo"
110+
args = ["test", "--no-run", "--no-default-features", "@@split(CARGO_MAKE_TASK_ARGS, )"]
111+
112+
[tasks.check-no-default-features]
113+
description = "Checks rust code and tests compile without default features to catch feature-gate regressions."
114+
clear = true
115+
run_task = [{ name = ["check-no-default-features-code", "check-no-default-features-tests"], parallel = true }]
116+
100117
[tasks.llvm-cov-clean]
101118
description = "Clean coverage data"
102119
private = true
@@ -237,6 +254,7 @@ dependencies = [
237254
"deny",
238255
"clippy",
239256
"cspell",
257+
"check-no-default-features",
240258
"build",
241259
"build-x64",
242260
"build-aarch64",

0 commit comments

Comments
 (0)