Add uncrustify github workflow (#659)

* Add uncrustify github workflow

* Fix exclusion pattern

* fix find expression

* exclude uncrustify files

* Uncrustify common demo and test files

* exlude white space checking files

* Fix EOL whitespace checker

* Remove whitespaces from EOL

* Fix space at EOL

* Fix find spaces at EOL

Co-authored-by: Archit Aggarwal <architag@amazon.com>
This commit is contained in:
alfred gedeon
2021-07-22 14:23:48 -07:00
committed by GitHub
co-authored by Archit Aggarwal
parent dd80d615b5
commit ae92d8c6ee
191 changed files with 17540 additions and 17102 deletions
+3 -3
View File
@@ -17,7 +17,7 @@ If you discover a potential security issue in this project we ask that you notif
## Submitting a bugs/feature request
Have a bug to report or feature to request? Follow these steps:
1. Search on the [FreeRTOS Community Support Forums](https://forums.freertos.org/) and [GitHub issue tracker](https://github.com/FreeRTOS/FreeRTOS/issues?utf8=%E2%9C%93&q=is%3Aissue) to be sure this hasn't been already reported or discussed.
1. Search on the [FreeRTOS Community Support Forums](https://forums.freertos.org/) and [GitHub issue tracker](https://github.com/FreeRTOS/FreeRTOS/issues?utf8=%E2%9C%93&q=is%3Aissue) to be sure this hasn't been already reported or discussed.
2. If your search turns up empty, create a new topic in the [forums](https://forums.freertos.org/) and work with the community to help clarify issues or refine the idea. Include as many of the details listed below.
3. Once the community has had time to discuss and digest, we welcome you to create an [issue](https://github.com/FreeRTOS/FreeRTOS/issues) to report bugs or suggest features.
@@ -43,8 +43,8 @@ To send us a pull request, please:
2. Modify the source; 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.
3. Follow the [coding style guide](https://www.freertos.org/FreeRTOS-Coding-Standard-and-Style-Guide.html).
4. Commit to your fork using clear commit messages.
5. Send us a pull request, answering any default questions in the pull request interface.
NOTE: Please make sure the default option (Allow edits from maintainers) is left checked.
5. Send us a pull request, answering any default questions in the pull request interface.
NOTE: Please make sure the default option (Allow edits from maintainers) is left checked.
6. 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
+1 -1
View File
@@ -24,7 +24,7 @@ A concise description of what the bug is.
**To Reproduce**
- Use project ... and configure with ...
- Run on ... and could observe ...
- Run on ... and could observe ...
**Expected behavior**
A concise description of what you expected to happen.
@@ -11,7 +11,7 @@ assignees: ''
Please describe the issue and expected clarification in concise language.
**Reference**
Please attach the URL at which you are experiencing the issue.
Please attach the URL at which you are experiencing the issue.
**Screenshot**
If applicable, please attach screenshot.
+2 -2
View File
@@ -1,5 +1,5 @@
## Reporting a Vulnerability
If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security
via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/) or directly via email to aws-security@amazon.com.
If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security
via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/) or directly via email to aws-security@amazon.com.
Please do **not** create a public github issue.
+1 -1
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
# python >= 3.4
# python >= 3.4
import os
from common.header_checker import HeaderChecker
+5 -5
View File
@@ -211,7 +211,7 @@ def configure_argparser():
type = str,
default = 'HEAD',
help = 'Commit ID of FreeRTOS repo to package')
return parser
def sanitize_cmd_args(args):
@@ -254,13 +254,13 @@ def main():
FREERTOS_GIT_LINK,
core_package_name,
commit_id=args.freertos_commit)
if path_core_out_tree == None:
print('Failed to prepare repo for zipping')
exit(1);
core_outzip = create_package(path_core_out_tree, core_package_name, RELATIVE_FILE_EXCLUDES)
# Create FreeRTOS-Labs package
labs_package_name = 'FreeRTOS-Labs'
(path_labs_in_tree, path_labs_out_tree) = create_file_trees(DIR_INPUT_TREES,
@@ -271,7 +271,7 @@ def main():
if path_labs_out_tree == None:
print('Failed to prepare repo for zipping')
exit(1);
labs_outzip = create_package(path_labs_out_tree, labs_package_name, LABS_RELATIVE_EXCLUDE_FILES)
# Package summaries
+5 -5
View File
@@ -10,7 +10,7 @@ from argparse import ArgumentParser
REPO_PATH=''
# List of submodules excluded from manifest.yml file
IGNORE_SUBMODULES_LIST = [
IGNORE_SUBMODULES_LIST = [
'FreeRTOS-Plus/Test/CMock',
'FreeRTOS/Test/CMock/CMock',
'FreeRTOS/Test/litani'
@@ -19,7 +19,7 @@ IGNORE_SUBMODULES_LIST = [
# Obtain submodule path of all entries in manifest.yml file.
def read_manifest():
path_list = []
# Read YML file
path_manifest = os.path.join(REPO_PATH, 'manifest.yml')
assert os.path.exists(path_manifest), 'Missing manifest.yml'
@@ -53,7 +53,7 @@ def get_all_submodules():
path = submodule.abspath.replace(REPO_PATH+'/', '')
if path not in IGNORE_SUBMODULES_LIST:
path_list.append(path)
return sorted(path_list)
if __name__ == '__main__':
@@ -69,13 +69,13 @@ if __name__ == '__main__':
# Convert any relative path (like './') in passed argument to absolute path.
REPO_PATH = os.path.abspath(args.repo_root_path)
libraries_in_manifest_file = read_manifest()
libraries_in_manifest_file = read_manifest()
git_submodules_list = get_all_submodules()
print(REPO_PATH)
print(git_submodules_list)
# Check that manifest.yml contains entries for all submodules
# Check that manifest.yml contains entries for all submodules
# present in repository.
if libraries_in_manifest_file == git_submodules_list:
print('Manifest.yml is verified!')
+33 -1
View File
@@ -24,6 +24,38 @@ jobs:
run: |
git-secrets --register-aws
git-secrets --scan
formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Uncrustify
run: sudo apt-get install uncrustify
- name: Run Uncrustify
run: |
uncrustify --version
find FreeRTOS/Demo/Common FreeRTOS/Test \( -name ethernet -o -name drivers -o -path 'FreeRTOS/Test/CMock/CMock' \) -prune -false -o -name "*.[hc]" -exec uncrustify --check -c tools/uncrustify.cfg {} +
- name: Check For Trailing Whitespace
run: |
set +e
ERROR=0
find . \( -name '.git' -o -path "./FreeRTOS/Test/CBMC/patches" -o -path "./FreeRTOS-Plus" -o -path "./FreeRTOS/Source" -o -path "./FreeRTOS/Test/CMock/CMock" -o -path "./FreeRTOS/Demo" \) -prune -false -o -type f -a -name "*" -exec grep -In -e "[[:blank:]]$" {} +
if [ "$?" = "0" ]; then
echo "Files have trailing whitespace."
ERROR=1
fi
find FreeRTOS/Demo/Common \( -name "ethernet" \) -prune -o -false -o -type f -a -name "*" -exec grep --color=yes -In -e "[[:blank:]]$" {} +
if [ "$?" = "0" ]; then
echo "Files have trailing whitespace."
exit 1
else
if [ "$ERROR" -eq "1" ]; then
exit 1
fi
exit 0
fi
doxygen:
runs-on: ubuntu-20.04
steps:
@@ -53,7 +85,7 @@ jobs:
- name: Upload doxygen artifact if main branch
if: success() && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/release-candidate' )
env:
GIT_SHA:
GIT_SHA:
uses: actions/upload-artifact@v2
with:
name: doxygen.zip-${{ github.sha }}