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 a clang-tidy checks and warnings #2312

Merged
merged 10 commits into from
Apr 26, 2024
Merged

Conversation

Rot127
Copy link
Collaborator

@Rot127 Rot127 commented Apr 7, 2024

Your checklist for this pull request

  • I've documented or updated the documentation of every function and struct this PR changes. If not so I've explained why.
  • I've added tests that prove my fix is effective or that my feature works (if possible)

Detailed description

Requires: #2309

  • Adds static clang-tidy analyzer tests to the CI. The tests only fail, if changed files are effected (otherwise they are just too many).
  • Adds -Wshadow=local and -Warray-bounds
  • Fixes warnings regarding -Wshadow=local

Test plan

CI green

Closing issues

Partially addresses #2113

@Rot127 Rot127 added Testing Test related issue build & packaging Build system and packaging related labels Apr 7, 2024
@Rot127 Rot127 force-pushed the build-warnings branch 5 times, most recently from 6eb23dc to 51db1c8 Compare April 7, 2024 08:45
@Rot127 Rot127 changed the title Add a clang-tidy check for analyzer tests. Add a clang-tidy checks and warnings Apr 7, 2024
@github-actions github-actions bot added ARM Arch AArch64 Arch M68K Arch CS-core-files auto-sync HPPA Arch labels Apr 7, 2024
@Rot127 Rot127 force-pushed the build-warnings branch 2 times, most recently from 9b0a311 to c7dcdbf Compare April 7, 2024 09:51
@Rot127 Rot127 marked this pull request as ready for review April 10, 2024 07:47
@Rot127 Rot127 force-pushed the build-warnings branch 2 times, most recently from 9b97384 to 1faca65 Compare April 10, 2024 08:42
The variable missed and 'R' and was not defined. This means that no
warning options were passed to the compiler the whole time.

Luckily, we have not introduced any more warnings since
I added this one.
@XVilka
Copy link
Contributor

XVilka commented Apr 26, 2024

@kabeor would be nice to have this merged because Rizin uses stricter options by default and it stops us from updating to the latest commit.

Copy link
Member

@kabeor kabeor left a comment

Choose a reason for hiding this comment

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

Looks great, merged.

@kabeor kabeor merged commit 6c7b548 into capstone-engine:next Apr 26, 2024
14 checks passed
@Rot127 Rot127 deleted the build-warnings branch April 26, 2024 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AArch64 Arch ARM Arch build & packaging Build system and packaging related CS-core-files auto-sync Documentation HPPA Arch LLVM-generated-files M68K Arch Testing Test related issue
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants