简体   繁体   中英

How to use C++ Core Checker in Unreal Engine project?

Here is an instruction how to use C++ Core Checker: C++ Core Guidelines Checkers available for VS 2015 Update 1.

I installed NuGet package successfully, but cannot use/enable it. There are no options related to static analysis in Property Pages of the project generated by UE.

Trying Analyze → Run Code Analyze achieves nothing too.

Trying Analyze → Configure Code Analysis leads to a message “There are currently no analyzable projects loaded”.

Why are these projects not analyzable? Is it possible to change that?

Compiler settings in Unreal 4 are handled by Unreal Build Tool. Turning on static analysis is equivalent to adding "/analyze" flag to compiler options. You can find the place where the build tool manages MSVC compiler and add an option there. Better yet, append the option only for your project in Yourproject.Build.cs.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM