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

docs: documentation update #633

Merged
merged 8 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from 7 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
3 changes: 2 additions & 1 deletion .devcontainer/cpp/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"cucumberautocomplete.smartSnippets": true,
"cucumberautocomplete.onTypeFormat": true,
"files.insertFinalNewline": true,
"files.trimTrailingWhitespace": true
"files.trimTrailingWhitespace": true,
"git.alwaysSignOff": true
rjaegers marked this conversation as resolved.
Show resolved Hide resolved
},
"extensions": [
"[email protected]",
Expand Down
3 changes: 2 additions & 1 deletion .devcontainer/rust/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"vscode": {
"settings": {
"files.insertFinalNewline": true,
"files.trimTrailingWhitespace": true
"files.trimTrailingWhitespace": true,
"git.alwaysSignOff": true
},
"extensions": [
"[email protected]",
Expand Down
42 changes: 41 additions & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Use your best judgment, and feel free to propose changes to this document in a p
- [Submission Guidelines](#submission-guidelines)
- [Submitting an Issue](#submitting-an-issue)
- [Naming a Pull Request (PR)](#naming-a-pull-request-pr)
- [Developer Certificate of Origin](#developer-certificate-of-origin)
- [Submitting a Pull Request](#submitting-a-pull-request)
- [Reviewing a Pull Request](#reviewing-a-pull-request)
- [Your First Contribution](#your-first-contribution)
Expand Down Expand Up @@ -124,6 +125,45 @@ Examples:
> [!TIP]
> If your work consists of a single commit, creating a pull request will default to the name of that commit. If you use conventional commit style for that single commit, your pull request already has the correct name.

### Developer Certificate of Origin

This project has adopted a [Developers Certificate of Origin (DCO)](https://developercertificate.org/). A DCO is a lightweight way for a developer to certify that they wrote or otherwise have the right to submit code or documentation to a project.

To certify the code you submit to the repository, you'll need to add a `Signed-off-by` line to your commits.

`$ git commit -s -m 'Awesome commit message'`

Which will look something like the following in the repo;

```text
Awesome commit message

Signed-off-by: Jane Smith <[email protected]>
```

> Note: this assumes you have setup your git name and email, if you have not you can use these commands to set that up:
>
> ```shell
> git config --global user.name "Your Name"
> git config --global user.email "[email protected]"
> ```

- In case you forgot to add it to the most recent commit, use `git commit --amend --signoff`
- In case you forgot to add it to the last N commits in your branch, use `git rebase --signoff HEAD~N` and replace N with the number of new commits you created in your branch.
- If you have a very deep branch with a lot of commits, run `git rebase -i --signoff $(git merge-base -a main HEAD)`, double check to make sense of the commits (keep all lines as `pick`) and save and close the editor. This should sign all the commits in your PR. Be careful though; if you have a complex flow with a lot of branching and re-merging, merge-base may not be the right solution for you.

Note: If you have already pushed your branch to a remote, you might have to force push: `git push -f` after the rebase.

#### Using VS Code?

If you are using VS Code you can enable always signing your commits by setting the following in your `settings.json` file:

```json
"git.alwaysSignOff": true,
```

Or from the Settings UI look for the "Git: Always Sign Off" setting and check the "Controls the signoff flag for all commits" box. This setting is already enabled when using the devcontainer.

richardapeters marked this conversation as resolved.
Show resolved Hide resolved
### Submitting a Pull Request

Before you submit your pull request consider the following guidelines:
Expand All @@ -149,7 +189,7 @@ Before you submit your pull request consider the following guidelines:
1. Commit your changes using a descriptive commit message.

```shell
git commit --all
git commit -s -m 'Awesome commit message'
```

Note: the optional commit `-a` command-line option will automatically "add" and "rm" edited files.
Expand Down
34 changes: 34 additions & 0 deletions .github/DCO
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or

(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or

(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.

(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
6 changes: 3 additions & 3 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# Pull Request
# :rocket: Hey, I have created a Pull Request

## Description of changes

<!-- Fill in a description of what this PR changes/introduces/fixes
Link to GitHub issues using keywords https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests when necessary
-->

## Checklist
## :heavy_check_mark: Checklist

<!-- We follow conventional commit-style PR titles and kebab-case branch names -->

- [ ] I have followed the contribution guidelines for this repository
- [ ] I have followed the [contribution guidelines](https://github.com/philips-software/amp-devcontainer/blob/main/.github/CONTRIBUTING.md) for this repository
- [ ] I have added tests for new behavior, and have not broken any existing tests
- [ ] I have added or updated relevant documentation
rjaegers marked this conversation as resolved.
Show resolved Hide resolved
- [ ] I have verified that all added components are accounted for in the SBOM
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@

## Overview

This repository contains [devcontainers](https://docs.github.com/en/codespaces/setting-up-your-project-for-codespaces/introduction-to-dev-containers) tailored towards modern, embedded, C++ and Rust development.
This repository contains [devcontainers](https://docs.github.com/en/codespaces/setting-up-your-project-for-codespaces/introduction-to-dev-containers) tailored towards modern, embedded, software development.

The containers try to be as ":battery: batteries included" as possible without being overly opinionated, and are useable for both local development and continuous integration.

All containers are multi-platform, and can be used on x64 (x86-64) and arm64 hardware on an operating system that supports an [OCI](https://opencontainers.org/) compatible container engine. This includes Windows and Linux, and macOS on both Intel and Apple silicon.

## State

Expand All @@ -16,7 +20,7 @@ This repository is under active development; see [pulse](https://github.com/phil

### Image variants

Two devcontainers are published towards the [GitHub Container Registry](https://ghcr.io/):
The following devcontainers are published towards the [GitHub Container Registry](https://ghcr.io/):

- [amp-devcontainer-cpp](https://github.com/orgs/philips-software/packages/container/package/amp-devcontainer-cpp); the C++ container
- [amp-devcontainer-rust](https://github.com/orgs/philips-software/packages/container/package/amp-devcontainer-rust); the Rust container
Expand All @@ -43,7 +47,7 @@ For embedded development and flashing and debugging [probe-rs](https://probe.rs/

### Visual Studio Code

Both containers can be used in Visual Studio Code or GitHub Codespaces without any additional configuration. All included tools are set-up and necessary plug-ins will be installed at container start. This behavior is implemented by appending devcontainer metadata to an image label according to the [specifications](https://containers.dev/implementors/reference/#labels). It is possible to override, amend or change the options following this [merge logic](https://containers.dev/implementors/spec/#merge-logic).
Both containers can be used in Visual Studio Code or GitHub Codespaces without any additional configuration. All included tools are set-up and necessary plug-ins will be installed at container start. This behavior is implemented by appending devcontainer metadata to an image label according to these [specifications](https://containers.dev/implementors/reference/#labels). It is possible to override, amend or change the options following this [merge logic](https://containers.dev/implementors/spec/#merge-logic).

## Usage

Expand Down Expand Up @@ -130,4 +134,4 @@ See [security](.github/SECURITY.md) for more information.

## Licenses

See [license](./LICENSE)
See [license](./LICENSE).
4 changes: 2 additions & 2 deletions test/cpp/features/static-dynamic-analysis.feature
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Feature: Analyze source code using static and dynamic analysis

As a software craftsman
As a software craftsperson
To maintain consistent, high-quality and bug-free code
Source code needs to be statically and dynamically analyzed
I want my source code to be statically and dynamically analyzed

@fixme
Scenario: Format source code according to a formatting style
Expand Down
Loading