Aws only files spell check (#593)

* Added spell check

* All words

* Add a missing word

* Fix header checks

* Fix header checks v1

* Fix header check v2

* Updated freertos link in header

* Fixed afr link in the header

* Fix last of header checks

* Update the spell check script to check amazon licensed files only

* Fixed paths and added comments

* Try with modified repo

* Add inplace substitute option to sed

* Use official repo as the spell checker source

* Add vendor file to the ignored list

Co-authored-by: root <root@ip-172-31-5-28.us-west-2.compute.internal>
This commit is contained in:
Aniruddha Kanhere 2021-05-13 16:07:56 -07:00 committed by GitHub
parent e117bdcd17
commit 1bc759d413
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
104 changed files with 3737 additions and 444 deletions

View file

@ -266,7 +266,8 @@ FREERTOS_IGNORED_FILES = [
'run-cbmc-proofs.py',
'.editorconfig',
'lcovrc',
'htif.c', 'htif.h'
'htif.c', 'htif.h',
'ethernetif.c'
]
FREERTOS_HEADER = [

View file

@ -59,6 +59,39 @@ jobs:
name: doxygen.zip-${{ github.sha }}
path: ./freertos/doxygen.zip
retention-days: 2
spell-check:
runs-on: ubuntu-latest
steps:
- name: Checkout Parent Repo
uses: actions/checkout@v2
with:
ref: main
repository: FreeRTOS/CI-CD-Github-Actions
path: commonCI
- name: Clone This Repo
uses: actions/checkout@v2
with:
path: ./FreeRTOS
- name: Install spell
run: |
sudo apt-get install spell
sudo apt-get install util-linux
- name: Check spelling
run: |
# Add path to the tool to the environment variable.
PATH=$PATH:commonCI/spellings/tools
# Make sure that only Amazon licenced files are checked.
sed -i 's/`find $DIRNAME \\( -iname \\\*\.\[ch\] -o -iname \\\*\.dox \\) -type f`/`grep -ril "copyright \(c\) \[0-9\]\[0-9\]\[0-9\]\[0-9\] amazon.com" | grep "\\.\[ch\]"`/g' commonCI/spellings/tools/find-unknown-comment-words
# Run the spell check script.
find-unknown-comment-words --directory FreeRTOS/ --lexicon FreeRTOS/lexicon.txt
# Check the exit status.
if [ "$?" = "0" ]; then
exit 0
else
exit 1
fi
verify-manifest:
runs-on: ubuntu-latest
steps:
@ -71,4 +104,3 @@ jobs:
run: python3 -m pip install -r .github/scripts/verify_manifest_requirements.txt
- name: Run script to verify manifest.yml
run: python3 .github/scripts/verify_manifest.py