Skip to content

Commit c9bbb25

Browse files
committed
Initial Outline
1 parent 77932bb commit c9bbb25

26 files changed

+674
-0
lines changed

.clang-format

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
Language: Cpp
3+
BasedOnStyle: WebKit
4+
---
5+
Language: C
6+
BasedOnStyle: WebKit
7+
---
8+
Language: ObjC
9+
BasedOnStyle: WebKit
10+
...

.github/workflows/build-main.yml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: World Build
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/checkout@v2
12+
# - name: Run Build
13+
# run: make

.github/workflows/clang-tidy.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Tidy
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- uses: actions/checkout@v2
11+
- name: Get changed files
12+
id: get-changed-files
13+
uses: futuratrepadeira/changed-files@v3.0.0
14+
with:
15+
repo-token: ${{ github.token }}
16+
- name: clang-tidy
17+
uses: ./actions/clang-tidy
18+
id: clang-tidy
19+
env:
20+
GITHUB_TOKEN: ${{ github.token }}
21+
CLANG_ARGUMENTS: "-checks=-*,clang-analyzer-*,-clang-analyzer-cplusplus* -- -Isrc/includes"
22+
FILES_MODIFIED: ${{ steps.get-changed-files.outputs.files_updated }}
23+
FILES_ADDED: ${{ steps.get-changed-files.outputs.files_created }}

.gitignore

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Prerequisites
2+
*.d
3+
4+
# Compiled Object files
5+
*.slo
6+
*.lo
7+
*.o
8+
*.obj
9+
10+
# Precompiled Headers
11+
*.gch
12+
*.pch
13+
14+
# Compiled Dynamic libraries
15+
*.so
16+
*.dylib
17+
*.dll
18+
19+
# Fortran module files
20+
*.mod
21+
*.smod
22+
23+
# Compiled Static libraries
24+
*.lai
25+
*.la
26+
*.a
27+
*.lib
28+
29+
# Executables
30+
*.exe
31+
*.out
32+
*.app
33+
34+
# VS Code Configs
35+
*.vscode

.restyled.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
image: restyled/restyler-clang-format:v9.0.0
3+
command:
4+
- clang-format
5+
- "-i"
6+
arguments: []
7+
include:
8+
- "**/*.c"
9+
- "**/*.cc"
10+
- "**/*.cpp"
11+
- "**/*.cxx"
12+
- "**/*.c++"
13+
- "**/*.C"
14+
- "**/*.cs"
15+
- "**/*.h"
16+
- "**/*.hh"
17+
- "**/*.hpp"
18+
- "**/*.hxx"
19+
- "**/*.h++"
20+
- "**/*.H"
21+
- "**/*.java"
22+
- "**/*.js"
23+
- "**/*.m"
24+
interpreters: []

BUILDING.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
## Build Documentation

CODE_OF_CONDUCT.md

+77
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
2+
# Contributor Covenant Code of Conduct
3+
4+
## Our Pledge
5+
6+
In the interest of fostering an open and welcoming environment, we as
7+
contributors and maintainers pledge to make participation in our project and
8+
our community a harassment-free experience for everyone, regardless of age, body
9+
size, disability, ethnicity, sex characteristics, gender identity and expression,
10+
level of experience, education, socio-economic status, nationality, personal
11+
appearance, race, religion, or sexual identity and orientation.
12+
13+
## Our Standards
14+
15+
Examples of behavior that contributes to creating a positive environment
16+
include:
17+
18+
* Using welcoming and inclusive language
19+
* Being respectful of differing viewpoints and experiences
20+
* Gracefully accepting constructive criticism
21+
* Focusing on what is best for the community
22+
* Showing empathy towards other community members
23+
24+
Examples of unacceptable behavior by participants include:
25+
26+
* The use of sexualized language or imagery and unwelcome sexual attention or
27+
advances
28+
* Trolling, insulting/derogatory comments, and personal or political attacks
29+
* Public or private harassment
30+
* Publishing others' private information, such as a physical or electronic
31+
address, without explicit permission
32+
* Other conduct which could reasonably be considered inappropriate in a
33+
professional setting
34+
35+
## Our Responsibilities
36+
37+
Project maintainers are responsible for clarifying the standards of acceptable
38+
behavior and are expected to take appropriate and fair corrective action in
39+
response to any instances of unacceptable behavior.
40+
41+
Project maintainers have the right and responsibility to remove, edit, or
42+
reject comments, commits, code, wiki edits, issues, and other contributions
43+
that are not aligned to this Code of Conduct, or to ban temporarily or
44+
permanently any contributor for other behaviors that they deem inappropriate,
45+
threatening, offensive, or harmful.
46+
47+
## Scope
48+
49+
This Code of Conduct applies within all project spaces, and it also applies when
50+
an individual is representing the project or its community in public spaces.
51+
Examples of representing a project or community include using an official
52+
project e-mail address, posting via an official social media account, or acting
53+
as an appointed representative at an online or offline event. Representation of
54+
a project may be further defined and clarified by project maintainers.
55+
56+
## Enforcement
57+
58+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
59+
reported by contacting the project team at [INSERT EMAIL ADDRESS]. All
60+
complaints will be reviewed and investigated and will result in a response that
61+
is deemed necessary and appropriate to the circumstances. The project team is
62+
obligated to maintain confidentiality with regard to the reporter of an incident.
63+
Further details of specific enforcement policies may be posted separately.
64+
65+
Project maintainers who do not follow or enforce the Code of Conduct in good
66+
faith may face temporary or permanent repercussions as determined by other
67+
members of the project's leadership.
68+
69+
## Attribution
70+
71+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
72+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
73+
74+
[homepage]: https://www.contributor-covenant.org
75+
76+
For answers to common questions about this code of conduct, see
77+
https://www.contributor-covenant.org/faq

CONTRIBUTING.md

+192
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,192 @@
1+
Contributing to CHIP
2+
========================
3+
4+
Want to contribute? Great! First, read this page (including the small
5+
print at the end).
6+
By submitting a pull request, you represent that you have the right to license your contribution to Zigbee and the
7+
community, and agree by submitting the patch that your contributions are licensed under the
8+
[Apache 2.0 license](./LICENSE.md).
9+
10+
Before submitting the pull request, please make sure you have tested your changes and that they follow the project
11+
[guidelines for contributing code](./docs/contribution_guidelines.md).
12+
13+
14+
## Bugs
15+
16+
If you find a bug in the source code, you can help us by [submitting a GitHub Issue](https://github.com/project-chip/connectedhomeip/issues/new). The best bug reports provide a detailed description of the issue and step-by-step instructions for predictably reproducing the issue. Even better, you can [submit a Pull Request](#submitting-a-pull-request) with a fix.
17+
18+
## New Features
19+
20+
You can request a new feature by [submitting a GitHub Issue](https://github.com/project-chip/connectedhomeip/issues/new).
21+
22+
If you would like to implement a new feature, please consider the scope of the new feature:
23+
24+
* *Large feature*: first [submit a GitHub
25+
Issue](https://github.com/project-chip/connectedhomeip/issues/new) and communicate
26+
your proposal so that the community can review and provide feedback. Getting
27+
early feedback will help ensure your implementation work is accepted by the
28+
community. This will also allow us to better coordinate our efforts and
29+
minimize duplicated effort.
30+
31+
* *Small feature*: can be implemented and directly [submitted as a Pull
32+
Request](#submitting-a-pull-request).
33+
34+
## Contributing Code
35+
36+
CHIP follows the "Fork-and-Pull" model for accepting contributions.
37+
38+
### Initial Setup
39+
40+
Setup your GitHub fork and continuous-integration services:
41+
42+
1. Fork the [CHIP
43+
repository](https://github.com/project-chip/connectedhomeip) by clicking "Fork"
44+
on the web UI.
45+
46+
2. All contributions must pass all checks and reviews to be accepted.
47+
48+
Setup your local development environment:
49+
50+
```bash
51+
# Clone your fork
52+
git clone git@github.com:<username>/connectedhomeip.git
53+
54+
# Configure upstream alias
55+
git remote add upstream git@github.com:project-chip/connectedhomeip.git
56+
```
57+
58+
### Submitting a Pull Request
59+
60+
#### Branch
61+
62+
For each new feature, create a working branch:
63+
64+
```bash
65+
# Create a working branch for your new feature
66+
git branch --track <branch-name> origin/master
67+
68+
# Checkout the branch
69+
git checkout <branch-name>
70+
```
71+
72+
#### Create Commits
73+
74+
```bash
75+
# Add each modified file you'd like to include in the commit
76+
git add <file1> <file2>
77+
78+
# Create a commit
79+
git commit
80+
```
81+
82+
This will open up a text editor where you can craft your commit message.
83+
84+
#### Upstream Sync and Clean Up
85+
86+
Prior to submitting your pull request, you might want to do a few things to
87+
clean up your branch and make it as simple as possible for the original
88+
repository's maintainer to test, accept, and merge your work.
89+
90+
If any commits have been made to the upstream master branch, you should rebase
91+
your development branch so that merging it will be a simple fast-forward that
92+
won't require any conflict resolution work.
93+
94+
```bash
95+
# Fetch upstream master and merge with your repository's master branch
96+
git checkout master
97+
git pull upstream master
98+
99+
# If there were any new commits, rebase your development branch
100+
git checkout <branch-name>
101+
git rebase master
102+
```
103+
104+
Now, it may be desirable to squash some of your smaller commits down into a
105+
small number of larger more cohesive commits. You can do this with an
106+
interactive rebase:
107+
108+
```bash
109+
# Rebase all commits on your development branch
110+
git checkout
111+
git rebase -i master
112+
```
113+
114+
This will open up a text editor where you can specify which commits to squash.
115+
116+
117+
#### Push and Test
118+
119+
```bash
120+
# Checkout your branch
121+
git checkout <branch-name>
122+
123+
# Push to your GitHub fork:
124+
git push origin <branch-name>
125+
```
126+
127+
This will trigger the continuous-integration checks. You
128+
can view the results in the respective services. Note that the integration
129+
checks will report failures on occasion.
130+
131+
#### Pull Request Requirements
132+
133+
CHIP considers there to be a few different types of pull requests:
134+
- Trivial bug fix
135+
- - Decription 1
136+
- - Decription 2
137+
- Small Bug fix
138+
- - Decription 1
139+
- - Decription 2
140+
- Bug Fix
141+
- - Decription 1
142+
- - Decription 2
143+
- Significiant Change
144+
- - Decription 1
145+
- - Decription 2
146+
- Feature
147+
- - Decription 1
148+
- - Decription 2
149+
- Architecture Change
150+
- - Decription 1
151+
- - Decription 2
152+
153+
### Prior to review, all changes require:
154+
- [GitHub Workflows](../.github/workflows) pass
155+
- [Certification Tests](tests/certification/README.md) pass
156+
- [Unit Tests](tests/unit/README.md) pass
157+
- [Fuzz Tests](tests/fuzz/README.md) pass
158+
- [Integration Tests](tests/integration/README.md) pass
159+
- Linting passes
160+
- Code style passes
161+
162+
Each type of change has unique additional requirements, here's a table of those:
163+
| Type | Reviewer Requirements | New Unit Tests | New Certification Tests | New Fuzz Tests | New Integration Tests |
164+
|----|----|----|----|----|----|
165+
| Trivial bug fix | | | | | |
166+
| Small Bug fix | | | | | | |
167+
| Bug Fix | | | | | | |
168+
| Significiant Change | | | | | | |
169+
| Feature | | | | | | |
170+
| Architecture Change | | | | | | |
171+
172+
173+
174+
#### Submit Pull Request
175+
176+
Once you've validated the CI results, go to the page for
177+
your fork on GitHub, select your development branch, and click the pull request
178+
button. If you need to make any adjustments to your pull request, just push the
179+
updates to GitHub. Your pull request will automatically track the changes on
180+
your development branch and update.
181+
182+
#### Code reviews
183+
184+
All submissions, including submissions by project members, require review.
185+
186+
### Documentation
187+
188+
Documentation undergoes the same review process as code
189+
190+
See the [Documentation Style Guide][doc-style] for more information on
191+
how to author and format documentation for contribution.
192+

CONTRIBUTORS.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
The following organizations and individuals have contributed to the CHIP SDK:
2+
* Apple Inc
3+
* Google Inc

0 commit comments

Comments
 (0)