# VS Static Analysis: How to ignore UE's files?

**URL:** <https://forums.unrealengine.com/t/vs-static-analysis-how-to-ignore-ues-files/447103>\
**Category:** C++\
**Tags:** visual-c-platform-to, unreal-engine, Visual-Studio, CPP, question\
**Created:** [April 12, 2019, 10:19am UTC](https://forums.unrealengine.com/t/vs-static-analysis-how-to-ignore-ues-files/447103 "2019-04-12T10:19:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![chirieacam](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@chirieacam](https://forums.unrealengine.com/u/chirieacam)\
**Post date:** [April 12, 2019, 10:19am UTC](https://forums.unrealengine.com/t/vs-static-analysis-how-to-ignore-ues-files/447103/1 "2019-04-12T10:19:22Z")

</div>

I’ve tried to use Visual Studio’s static analysis for my game project but it also checks the engine files, and when adding C++ Core Guidelines checks it takes a long time (it was over an hour and still didn’t complete).

Is there a way to have the analyzer ignore the engine files?

How I enabled Static Analysis:

1. Added the following to `AppData\Roaming\Unreal Engine\UnrealBuildTool\BuildConfiguration.xml`:

2. I’ve rebuilt the `UnrealBuildTool` after adding `Arguments.Add("/analyze:plugin EspXEngine.dll")` to enable C++ Core Checks in `Engine\Source\Programs\UnrealBuildTool\Platform\Windows\VCToolChain.cs`.

---

<div class="post-metadata">

**Author:** ![Ruzihm](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ruzihm](https://forums.unrealengine.com/u/Ruzihm)\
**Post date:** [February 25, 2021, 4:47am UTC](https://forums.unrealengine.com/t/vs-static-analysis-how-to-ignore-ues-files/447103/2 "2021-02-25T04:47:46Z")

</div>

The solution I used was to create the “caexcludepath” environment variable, and set it to the engine/Epic Games directory.

I also added the `Intermediate` directory of my project so as to exclude the `.gen.cpp` files as well. That bit is kind of a hack job but it works.
