diff options
author | Darshan Sen <raisinten@gmail.com> | 2022-04-20 18:00:22 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-20 18:00:22 +0300 |
commit | 61fefe1959a8ab9e796f409346ff619c14036c81 (patch) | |
tree | 8a59e76ecf2b2bb44e2681930fbdd6b73f908821 /.github | |
parent | 09c329de9f67334dff08bcd4ed0675ce4a49482f (diff) |
build: fix format-cpp
According to the logs in
https://github.com/nodejs/node/pull/42681#issuecomment-1100856089,
`make format-cpp` exits with an NZEC. This change intentionally ignores
the error code because it is irrelevant. We already check if the
formatter produced a diff in the next line.
Refs: https://github.com/nodejs/node/pull/42681#issuecomment-1100856089
Signed-off-by: Darshan Sen <raisinten@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/42764
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/linters.yml | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index fa761f4f9de..7373aabaca0 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -70,8 +70,12 @@ jobs: - name: Format C/C++ files run: | make format-cpp-build + # The `make format-cpp` error code is intentionally ignored here + # because it is irrelevant. We already check if the formatter produced + # a diff in the next line. + # Refs: https://github.com/nodejs/node/pull/42764 CLANG_FORMAT_START="$(git merge-base HEAD refs/remotes/origin/$GITHUB_BASE_REF)" \ - make format-cpp + make format-cpp || true git --no-pager diff --exit-code && EXIT_CODE="$?" || EXIT_CODE="$?" if [ "$EXIT_CODE" != "0" ] then |