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

Add code style check #48

Open
ronald-cron-arm opened this issue Sep 22, 2023 · 1 comment · May be fixed by #93
Open

Add code style check #48

ronald-cron-arm opened this issue Sep 22, 2023 · 1 comment · May be fixed by #93
Assignees
Labels
enhancement New feature or request size-s Estimated task size: small (~2d)

Comments

@ronald-cron-arm
Copy link
Contributor

ronald-cron-arm commented Sep 22, 2023

Add code style check

  • [] Adapt code_style.py to work both for mbedtls and TF-PSA-Crypto repo. Keep check of all files when called in the context of mbedtls for the time being.
  • [] Add tf_psa_crypto_check_code_style component in tf-psa-crypto/tests/scripts/components-basic-checks.sh (to be created).

Depends on: Mbed-TLS/mbedtls#9720 and #50 (code_style.py parses check-generated-files.sh).

DOD: Same support for code style checking in TF-PSA-Crypto as in mbedtls

@Harry-Ramsey
Copy link
Contributor

Harry-Ramsey commented Dec 27, 2024

Upon investigation, this task just requires check-generated-files.sh to be moved to framework/scripts. It does report numerous code issues however for TF-PSA-Crypto which will need to be fixed or the code style may need to be adjusted for TF-PSA-Crypto.

Currently an if statement like this is invalid:

if (ret != 0)
    return P256_INVALID_PRIVKEY;

and needs to be replaced with

if (ret != 0) {
    return P256_INVALID_PRIVKEY;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request size-s Estimated task size: small (~2d)
Projects
Status: TF-PSA-Crypto all.sh components
Development

Successfully merging a pull request may close this issue.

3 participants