Skip to content

Ignore clang-format error for now#1916

Merged
celinval merged 1 commit intomodel-checking:mainfrom
celinval:issue-xxxx-clang-format
Nov 18, 2022
Merged

Ignore clang-format error for now#1916
celinval merged 1 commit intomodel-checking:mainfrom
celinval:issue-xxxx-clang-format

Conversation

@celinval
Copy link
Copy Markdown
Contributor

Description of changes:

Ignore clang-format error for now. I'm also printing the version to see if that's the culprit of the new issue we are seeing.

Resolved issues:

N/A

Related RFC:

Optional #ISSUE-NUMBER.

Call-outs:

Testing:

  • How is this change tested?

  • Is this a refactor change?

Checklist

  • Each commit message has a non-empty body, explaining why the change was made
  • Methods or procedures are documented
  • Regression or unit tests are included, or existing tests cover the modified code
  • My PR is restricted to a single feature or bugfix

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.

  - I'm also printing the version to see if that's the culprit of the
    new issue we are seeing.
@celinval celinval requested a review from a team as a code owner November 18, 2022 19:56
# SPDX-License-Identifier: Apache-2.0 OR MIT
name: Kani Format Check
on: pull_request
on:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is unnecessary on push, but I guess I don't object strongly

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One can say that about all our workflows. I was wondering if we should just be consistent.

@celinval
Copy link
Copy Markdown
Contributor Author

Comparing the clang-format step from this PR and the run from my fork, the former fails while running clang-format version 14 while the latter succeeds running on version 11.

Failing logs:
> Run ./scripts/run-clang-format.sh -d
clang-format is /usr/bin/clang-format
Ubuntu clang-format version 14.0.0-1ubuntu1
/home/runner/work/kani/kani/scripts/../library/kani/stubs/C/vec/vec.c:125:37: error: code should be clang-formatted [-Wclang-format-violations]
    v->mem              = ( uint32_t * )malloc(max_elements * sizeof(*v->mem));
                                    ^
/home/runner/work/kani/kani/scripts/../library/kani/stubs/C/vec/vec.c:125:39: error: code should be clang-formatted [-Wclang-format-violations]
    v->mem              = ( uint32_t * )malloc(max_elements * sizeof(*v->mem));
                                      ^
/home/runner/work/kani/kani/scripts/../library/kani/stubs/C/vec/vec.c:142:29: error: code should be clang-formatted [-Wclang-format-violations]
    v->mem      = ( uint32_t * )malloc(capacity * sizeof(*v->mem));
                            ^
/home/runner/work/kani/kani/scripts/../library/kani/stubs/C/vec/vec.c:142:31: error: code should be clang-formatted [-Wclang-format-violations]
    v->mem      = ( uint32_t * )malloc(capacity * sizeof(*v->mem));
                              ^
Error: Process completed with exit code 123.
Succeeding logs:
> Run ./scripts/run-clang-format.sh -d
clang-format is /usr/bin/clang-format
Ubuntu clang-format version 11.0.0-2~ubuntu20.04.1

@celinval celinval merged commit e1b346d into model-checking:main Nov 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants