From 0d0a904fa883817d1a683962ebcb88f319758357 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonatan=20M=C3=A4nnchen?= Date: Tue, 18 Mar 2025 10:55:09 +0000 Subject: [PATCH 1/2] Add test policy to CONTRIBUTING.md Fulfills the test_policy and tests_documented_added OpenSSF Best Practices Badge requirements. --- CONTRIBUTING.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2e6f0e6adb9..3f828311f47 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -71,6 +71,18 @@ updating an existing checkout, run `make clean compile`. You can check [the official build status](https://github.com/elixir-lang/elixir/actions/workflows/ci.yml). More tasks can be found by reading the [Makefile](Makefile). +We encourage contributors to write tests that capture both existing and newly +introduced behavior, especially for bug fixes and major changes: + + * **Bug Fixes:** If you are fixing a bug, please try to include a test that + *fails* before your change and *passes* afterward. This makes it easier to + confirm that the fix addresses the underlying issue and helps prevent + regressions in the future. + * **New Features or Major Changes:** If you are adding a new feature or making + major changes to existing functionality, please add tests that cover the + major parts of that functionality. Perfect coverage isn’t required, but we + do ask that you exercise the main use cases and scenarios. + With tests running and passing, you are ready to contribute to Elixir and [send a pull request](https://help.github.com/articles/using-pull-requests/). We have saved some excellent pull requests we have received in the past in From cd80facc139a908e8d46ac13e3060d650584e5a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonatan=20M=C3=A4nnchen?= Date: Tue, 18 Mar 2025 14:39:12 +0100 Subject: [PATCH 2/2] Update CONTRIBUTING.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: José Valim --- CONTRIBUTING.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3f828311f47..48d9ad45d5c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -80,8 +80,7 @@ introduced behavior, especially for bug fixes and major changes: regressions in the future. * **New Features or Major Changes:** If you are adding a new feature or making major changes to existing functionality, please add tests that cover the - major parts of that functionality. Perfect coverage isn’t required, but we - do ask that you exercise the main use cases and scenarios. + major parts of that functionality. Aim to have the best code coverage possible. With tests running and passing, you are ready to contribute to Elixir and [send a pull request](https://help.github.com/articles/using-pull-requests/).