Skip to content

Commit

Permalink
Swapping to clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
Skptak committed Aug 3, 2023
1 parent 80b804c commit 944ca9b
Show file tree
Hide file tree
Showing 54 changed files with 820 additions and 801 deletions.
89 changes: 58 additions & 31 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,63 +1,90 @@
# Contributing Guidelines

Thank you for your interest in contributing to our project. Whether it's a bug report, new feature, correction, or additional
documentation, we greatly value feedback and contributions from our community.

Please read through this document before submitting any issues or pull requests to ensure we have all the necessary
information to effectively respond to your bug report or contribution.
Thank you for your interest in contributing to our project. Whether it's a bug
report, new feature, correction, or additional documentation, we greatly value
feedback and contributions from our community.

Please read through this document before submitting any issues or pull requests
to ensure we have all the necessary information to effectively respond to your
bug report or contribution.

## Reporting Bugs/Feature Requests

We welcome you to use the GitHub issue tracker to report bugs or suggest features.

When filing an issue, please check [existing open](https://github.com/FreeRTOS/coreHTTP/issues), or [recently closed](https://github.com/FreeRTOS/coreHTTP/issues?q=is%3Aissue+is%3Aclosed), issues to make sure somebody else hasn't already
reported the issue. Please try to include as much information as you can. Details like these are incredibly useful:
We welcome you to use the GitHub issue tracker to report bugs or suggest
features.

* A reproducible test case or series of steps
* The version of our code being used
* Any modifications you've made relevant to the bug
* Anything unusual about your environment or deployment
When filing an issue, please check
[existing open](https://github.com/FreeRTOS/coreHTTP/issues), or
[recently closed](https://github.com/FreeRTOS/coreHTTP/issues?q=is%3Aissue+is%3Aclosed),
issues to make sure somebody else hasn't already reported the issue. Please try
to include as much information as you can. Details like these are incredibly
useful:

- A reproducible test case or series of steps
- The version of our code being used
- Any modifications you've made relevant to the bug
- Anything unusual about your environment or deployment

## Contributing via Pull Requests
Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that:

1. You are working against the latest source on the *main* branch.
1. You check existing open, and recently merged, pull requests to make sure someone else hasn't addressed the problem already.
1. You open an issue to discuss any significant work - we would hate for your time to be wasted.
Contributions via pull requests are much appreciated. Before sending us a pull
request, please ensure that:

1. You are working against the latest source on the _main_ branch.
1. You check existing open, and recently merged, pull requests to make sure
someone else hasn't addressed the problem already.
1. You open an issue to discuss any significant work - we would hate for your
time to be wasted.

To send us a pull request, please:

1. Fork the repository.
1. Modify the source; please focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change.
1. Ensure that your contributions conform to the [style guide](https://docs.aws.amazon.com/embedded-csdk/202011.00/lib-ref/docs/doxygen/output/html/guide_developer_styleguide.html).
1. Format your code with uncrustify, using the config available in [FreeRTOS/CI-CD-Github-Actions](https://github.com/FreeRTOS/CI-CD-Github-Actions/blob/main/formatting/uncrustify.cfg).
1. Modify the source; please focus on the specific change you are contributing.
If you also reformat all the code, it will be hard for us to focus on your
change.
1. Ensure that your contributions conform to the
[style guide](https://docs.aws.amazon.com/embedded-csdk/202011.00/lib-ref/docs/doxygen/output/html/guide_developer_styleguide.html).
1. Format your code with uncrustify, using the config available in
[FreeRTOS/CI-CD-Github-Actions](https://github.com/FreeRTOS/CI-CD-Github-Actions/blob/main/formatting/uncrustify.cfg).
1. Ensure local tests pass.
1. Commit to your fork using clear commit messages.
1. Send us a pull request, answering any default questions in the pull request interface.
1. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.
1. Send us a pull request, answering any default questions in the pull request
interface.
1. Pay attention to any automated CI failures reported in the pull request, and
stay involved in the conversation.

GitHub provides additional document on [forking a repository](https://help.github.com/articles/fork-a-repo/) and
GitHub provides additional document on
[forking a repository](https://help.github.com/articles/fork-a-repo/) and
[creating a pull request](https://help.github.com/articles/creating-a-pull-request/).


## Finding contributions to work on
Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels ((enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any ['help wanted'](https://github.com/FreeRTOS/coreHTTP/labels?q=help+wanted) issues is a great place to start.

Looking at the existing issues is a great way to find something to contribute
on. As our projects, by default, use the default GitHub issue labels
((enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at
any ['help wanted'](https://github.com/FreeRTOS/coreHTTP/labels?q=help+wanted)
issues is a great place to start.

## Code of Conduct
This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
opensource-codeofconduct@amazon.com with any additional questions or comments.

This project has adopted the
[Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct). For
more information see the
[Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
opensource-codeofconduct@amazon.com with any additional questions or comments.

## Security issue notifications
If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](https://aws.amazon.com/security/vulnerability-reporting/). Please do **not** create a public github issue.

If you discover a potential security issue in this project we ask that you
notify AWS/Amazon Security via our
[vulnerability reporting page](https://aws.amazon.com/security/vulnerability-reporting/).
Please do **not** create a public github issue.

## Licensing

See the [LICENSE](../LICENSE) file for our project's licensing. We will ask you to confirm the licensing of your contribution.
See the [LICENSE](../LICENSE) file for our project's licensing. We will ask you
to confirm the licensing of your contribution.

We may ask you to sign a [Contributor License Agreement (CLA)](https://en.wikipedia.org/wiki/Contributor_License_Agreement) for larger changes.
We may ask you to sign a
[Contributor License Agreement (CLA)](https://en.wikipedia.org/wiki/Contributor_License_Agreement)
for larger changes.
4 changes: 1 addition & 3 deletions .github/memory_statistics_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,5 @@
"source/interface",
"source/dependency/3rdparty/llhttp/include"
],
"compiler_flags": [
"HTTP_DO_NOT_USE_CUSTOM_CONFIG"
]
"compiler_flags": ["HTTP_DO_NOT_USE_CUSTOM_CONFIG"]
}
24 changes: 14 additions & 10 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
<!--- Title -->

Description
-----------
## Description

<!--- Describe your changes in detail. -->

Test Steps
-----------
## Test Steps

<!-- Describe the steps to reproduce. -->

Checklist:
----------
## Checklist:

<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->

- [ ] I have tested my changes. No regression in existing tests.
- [ ] I have modified and/or added unit-tests to cover the code changes in this Pull Request.
- [ ] I have modified and/or added unit-tests to cover the code changes in this
Pull Request.

## Related Issue

Related Issue
-----------
<!-- If any, please provide issue ID. -->
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

By submitting this pull request, I confirm that you can use, modify, copy, and
redistribute this contribution, under the terms of your choice.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,16 +114,16 @@ jobs:
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
submodules: "recursive"
- name: Install Python3
uses: actions/setup-python@v2
with:
python-version: '3.11.0'
python-version: "3.11.0"
- name: Measure sizes
uses: Skptak/CI-CD-Github-Actions/memory_statistics@main
with:
config: .github/memory_statistics_config.json
check_against: docs/doxygen/include/size_table.md
config: .github/memory_statistics_config.json
check_against: docs/doxygen/include/size_table.md
proof_ci:
if: ${{ github.event.pull_request }}
runs-on: cbmc_ubuntu-latest_64-core
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ on:
workflow_dispatch:
inputs:
commit_id:
description: 'Commit ID to tag and create a release for'
description: "Commit ID to tag and create a release for"
required: true
version_number:
description: 'Release Version Number (Eg, v1.0.0)'
description: "Release Version Number (Eg, v1.0.0)"
required: true

jobs:
Expand All @@ -24,7 +24,9 @@ jobs:
git config --global user.name ${{ github.actor }}
git config --global user.email ${{ github.actor }}@users.noreply.github.com
- name: create a new branch that references commit id
run: git checkout -b ${{ github.event.inputs.version_number }} ${{ github.event.inputs.commit_id }}
run:
git checkout -b ${{ github.event.inputs.version_number }} ${{
github.event.inputs.commit_id }}
- name: Generate SBOM
uses: Skptak/CI-CD-Github-Actions/sbom-generator@main
with:
Expand Down Expand Up @@ -119,7 +121,9 @@ jobs:
with:
tag_name: ${{ github.event.inputs.version_number }}
release_name: ${{ github.event.inputs.version_number }}
body: Release ${{ github.event.inputs.version_number }} of the coreHTTP Library.
body:
Release ${{ github.event.inputs.version_number }} of the coreHTTP
Library.
draft: false
prerelease: false
- name: Download ZIP artifact
Expand Down
72 changes: 52 additions & 20 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,52 +1,84 @@
# Changelog for coreHTTP Client Library


## v3.0.0 (October 2022)

### Updates

- [#134](https://github.com/FreeRTOS/coreHTTP/pull/134), [#138](https://github.com/FreeRTOS/coreHTTP/pull/138) Replace strncpy with memcpy to remove warnings
- [#132](https://github.com/FreeRTOS/coreHTTP/pull/132), [#142](https://github.com/FreeRTOS/coreHTTP/pull/142), [#144](https://github.com/FreeRTOS/coreHTTP/pull/144) MISRA C:2012 compliance update
- [#129](https://github.com/FreeRTOS/coreHTTP/pull/129) Update http-parser to use llhttp
- [#127](https://github.com/FreeRTOS/coreHTTP/pull/127) CBMC proof changes, and updates to use llhttp
- [#126](https://github.com/FreeRTOS/coreHTTP/pull/126) Replace http-parser with llhttp. Using llhttp requires C99, so this library will need to use C99 at minimum as well. The swap to llhttp impacts the HTTPParsingContext_t struct, as well as many of the functions in coreHTTP. coreHTTP APIs preserve backwards compatibility by usage, however any use of the internal structures or dependency on http parser directly can cause compatibility issues.
- [#125](https://github.com/FreeRTOS/coreHTTP/pull/125) Add response buffer len check
- [#134](https://github.com/FreeRTOS/coreHTTP/pull/134),
[#138](https://github.com/FreeRTOS/coreHTTP/pull/138) Replace strncpy with
memcpy to remove warnings
- [#132](https://github.com/FreeRTOS/coreHTTP/pull/132),
[#142](https://github.com/FreeRTOS/coreHTTP/pull/142),
[#144](https://github.com/FreeRTOS/coreHTTP/pull/144) MISRA C:2012 compliance
update
- [#129](https://github.com/FreeRTOS/coreHTTP/pull/129) Update http-parser to
use llhttp
- [#127](https://github.com/FreeRTOS/coreHTTP/pull/127) CBMC proof changes, and
updates to use llhttp
- [#126](https://github.com/FreeRTOS/coreHTTP/pull/126) Replace http-parser with
llhttp. Using llhttp requires C99, so this library will need to use C99 at
minimum as well. The swap to llhttp impacts the HTTPParsingContext_t struct,
as well as many of the functions in coreHTTP. coreHTTP APIs preserve backwards
compatibility by usage, however any use of the internal structures or
dependency on http parser directly can cause compatibility issues.
- [#125](https://github.com/FreeRTOS/coreHTTP/pull/125) Add response buffer len
check

## v2.1.0 (Nov 2021)

### Updates

- [#114](https://github.com/FreeRTOS/coreHTTP/pull/114) Update http-parser version in manifest to reflect commit
- [#112](https://github.com/FreeRTOS/coreHTTP/pull/112) Add function prototypes for exported functions to CBMC proof harnesses
- [#111](https://github.com/FreeRTOS/coreHTTP/pull/111) Update Doxygen version to 1.9.2
- [#114](https://github.com/FreeRTOS/coreHTTP/pull/114) Update http-parser
version in manifest to reflect commit
- [#112](https://github.com/FreeRTOS/coreHTTP/pull/112) Add function prototypes
for exported functions to CBMC proof harnesses
- [#111](https://github.com/FreeRTOS/coreHTTP/pull/111) Update Doxygen version
to 1.9.2

## v2.0.2 (July 2021)

### Updates

- [#109](https://github.com/FreeRTOS/coreHTTP/pull/109) Add C++ header guards
- [#106](https://github.com/FreeRTOS/coreHTTP/pull/106) Update case-insensitive compare function for header-field parser
- [#104](https://github.com/FreeRTOS/coreHTTP/pull/104) Update CBMC proofs to work with the latest version of CBMC
- [#106](https://github.com/FreeRTOS/coreHTTP/pull/106) Update case-insensitive
compare function for header-field parser
- [#104](https://github.com/FreeRTOS/coreHTTP/pull/104) Update CBMC proofs to
work with the latest version of CBMC

## v2.0.1 (February 2021)

### Other

- [#89](https://github.com/FreeRTOS/coreHTTP/pull/89) Fix documentation of memory size estimates of the library.
- [#89](https://github.com/FreeRTOS/coreHTTP/pull/89) Fix documentation of
memory size estimates of the library.

## v2.0.0 (December 2020)

### Updates

- [#83](https://github.com/FreeRTOS/coreHTTP/pull/83) Implement transport send and receive retry timeouts in coreHTTP. This change adds a timestamp callback function to the HTTPResponse_t struct, and new configuration macros to set the transport send and receive retry timeouts. Due to the HTTPResponse_t struct field addition, coreHTTP v2.0.0 is not backward compatible under certain conditions.
- [#79](https://github.com/FreeRTOS/coreHTTP/pull/79), [#82](https://github.com/FreeRTOS/coreHTTP/pull/82) transport_interface.h documentation updates.
- [#75](https://github.com/FreeRTOS/coreHTTP/pull/75) Small fix to cast logging arguments to types matching the format specifiers.
- [#83](https://github.com/FreeRTOS/coreHTTP/pull/83) Implement transport send
and receive retry timeouts in coreHTTP. This change adds a timestamp callback
function to the HTTPResponse_t struct, and new configuration macros to set the
transport send and receive retry timeouts. Due to the HTTPResponse_t struct
field addition, coreHTTP v2.0.0 is not backward compatible under certain
conditions.
- [#79](https://github.com/FreeRTOS/coreHTTP/pull/79),
[#82](https://github.com/FreeRTOS/coreHTTP/pull/82) transport_interface.h
documentation updates.
- [#75](https://github.com/FreeRTOS/coreHTTP/pull/75) Small fix to cast logging
arguments to types matching the format specifiers.

### Other
- [#70](https://github.com/FreeRTOS/coreHTTP/pull/70), [#72](https://github.com/FreeRTOS/coreHTTP/pull/72), [#78](https://github.com/FreeRTOS/coreHTTP/pull/78) Github actions updates.
- [#73](https://github.com/FreeRTOS/coreHTTP/pull/73), [#76](https://github.com/FreeRTOS/coreHTTP/pull/76) Github repo chores.
- [#71](https://github.com/FreeRTOS/coreHTTP/pull/71) CBMC automation chore.
- [#81](https://github.com/FreeRTOS/coreHTTP/pull/81), [#84](https://github.com/FreeRTOS/coreHTTP/pull/84) Doxygen memory estimates table update.

- [#70](https://github.com/FreeRTOS/coreHTTP/pull/70),
[#72](https://github.com/FreeRTOS/coreHTTP/pull/72),
[#78](https://github.com/FreeRTOS/coreHTTP/pull/78) Github actions updates.
- [#73](https://github.com/FreeRTOS/coreHTTP/pull/73),
[#76](https://github.com/FreeRTOS/coreHTTP/pull/76) Github repo chores.
- [#71](https://github.com/FreeRTOS/coreHTTP/pull/71) CBMC automation chore.
- [#81](https://github.com/FreeRTOS/coreHTTP/pull/81),
[#84](https://github.com/FreeRTOS/coreHTTP/pull/84) Doxygen memory estimates
table update.

## v1.0.0 November 2020

Expand Down
Loading

0 comments on commit 944ca9b

Please sign in to comment.