From 598c72adccca273cb6ef9949eddc10860f98f470 Mon Sep 17 00:00:00 2001 From: Taras Drozdovskyi Date: Mon, 19 Feb 2024 17:18:33 +0200 Subject: [PATCH] Test Linter Signed-off-by: Taras Drozdovskyi --- .github/workflows/linter.yml | 19 +++++++++---------- README.md | 1 + tools/ecdsa_keygen.c | 6 +++--- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 143f6ac4..9bb67a3d 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -6,21 +6,20 @@ jobs: cpp-linter: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: cpp-linter/cpp-linter-action@v2 + - uses: actions/checkout@v4 + - uses: cpp-linter/cpp-linter-action@main id: linter + continue-on-error: true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - style: file - # The following value will only update a single comment - # in a pull request's thread. Set it to false to disable the comment. - # Set it to true to post a new comment (and delete the old comment). - # thread-comments: ${{ github.event_name == 'pull_request' && 'update' }} - thread-comments: ${{ github.event_name == 'push' && 'update' }} + style: '' + files-changed-only: false + ignore: crypto - name: Fail fast?! - if: steps.linter.outputs.checks-failed > 0 - run: echo "Some files failed the linting checks!" + if: steps.linter.outputs.checks-failed != 0 + run: | + echo "some linter checks failed. ${{ steps.linter.outputs.checks-failed }}" # for actual deployment # run: exit 1 \ No newline at end of file diff --git a/README.md b/README.md index 3d0b4c1f..bd3ee4fd 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ [![Build](https://github.com/samsung/mtower/workflows/Build/badge.svg)](https://github.com/samsung/mtower/actions?query=workflow%3ABuild) [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/6108/badge)](https://bestpractices.coreinfrastructure.org/projects/6108) [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/Samsung/mTower/badge)](https://api.securityscorecards.dev/projects/github.com/Samsung/mTower) +[![cpp-linter](https://github.com/cpp-linter/cpp-linter-action/actions/workflows/cpp-linter.yml/badge.svg)](https://github.com/cpp-linter/cpp-linter-action/actions/workflows/cpp-linter.yml) [![RepoSize](https://img.shields.io/github/repo-size/samsung/mtower.svg)](https://github.com/samsung/mtower) [![Release](https://img.shields.io/github/v/release/samsung/mtower.svg)](https://github.com/samsung/mtower/releases) [![LICENSE](https://img.shields.io/github/license/samsung/mtower.svg)](https://github.com/samsung/mtower/blob/master/LICENSE) diff --git a/tools/ecdsa_keygen.c b/tools/ecdsa_keygen.c index 96bc164e..2955fc60 100644 --- a/tools/ecdsa_keygen.c +++ b/tools/ecdsa_keygen.c @@ -75,11 +75,11 @@ typedef struct Message_Struct { /* Private Data. */ /* All static data definitions appear here. */ -uint32_t key[] = +const uint32_t key[] = { 0x78563412, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xefcdac00 }; -uint32_t iv[] = +const uint32_t iv[] = { 0x78563412, 0x00000000, 0x00000000, 0xefcdac00 }; /* Public Data. */ @@ -374,7 +374,7 @@ int main(int argc, char * argv[]) } fclose(fd); -exit: +// exit: BN_free(x); BN_free(y); EC_GROUP_free(ecgroup);