# How to get CLion's linter to work in juce\_\*.cpp files?

**URL:** <https://forum.juce.com/t/how-to-get-clions-linter-to-work-in-juce-cpp-files/66651>\
**Category:** General JUCE discussion\
**Created:** [July 21, 2025, 8:35am UTC](https://forum.juce.com/t/how-to-get-clions-linter-to-work-in-juce-cpp-files/66651 "2025-07-21T08:35:48Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![JanWilczek](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/janwilczek/32/21823_2.png) [@JanWilczek](https://forum.juce.com/u/JanWilczek)\
**Post date:** [July 21, 2025, 8:35am UTC](https://forum.juce.com/t/how-to-get-clions-linter-to-work-in-juce-cpp-files/66651/1 "2025-07-21T08:35:48Z")

</div>

I am working on a JUCE tutorial and would like to show a piece of JUCE source code: in this instance, `juce::LookAndFeel_V4::drawRotarySlider()` implementation.

Unfortunately, CLion’s linter does not work for JUCE implementation files. Here’s how it looks for me on macOS:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/juce/original/3X/d/9/d93ca31b76e82fd9b8ebb0b1583d215e47b3bc3a.png)

I’ve tried switching the target, but AU, VST3, and Standalone all give the same result: lack of proper coloring and no way to navigate around using Cmd + Click or “Go to declaration”.

I wonder if that’s an inherent feature of JUCE modules or if anyone has managed to fix it. I realize that this is a rare use case, but wouldn’t it be nice to have proper linting of JUCE modules’ source code? 🙂

I am using CLion 2025.1.3

---

<div class="post-metadata">

**Author:** ![ImJimmi](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/imjimmi/32/10843_2.png) [@ImJimmi](https://forum.juce.com/u/ImJimmi)\
**Post date:** [July 21, 2025, 9:35am UTC](https://forum.juce.com/t/how-to-get-clions-linter-to-work-in-juce-cpp-files/66651/2 "2025-07-21T09:35:00Z")

</div>

See [FR: Add explicit includes to JUCE modules](https://forum.juce.com/t/fr-add-explicit-includes-to-juce-modules/58552)

It’s usually that CLion doesn’t know where the definitions for JUCE symbols are due to the lack of explicit includes.

IME, you shouldn’t see these issues when using CMake as it’s aware of where all the library sources are.

---

<div class="post-metadata">

**Author:** ![JanWilczek](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/janwilczek/32/21823_2.png) [@JanWilczek](https://forum.juce.com/u/JanWilczek)\
**Post date:** [July 21, 2025, 10:06am UTC](https://forum.juce.com/t/how-to-get-clions-linter-to-work-in-juce-cpp-files/66651/3 "2025-07-21T10:06:33Z")

</div>

Thanks for the reply, that’s the kind of thread I was looking for 🙂

> [@ImJimmi](#):
>
> IME, you shouldn’t see these issues when using CMake as it’s aware of where all the library sources are.

Hmm, I need to find a way to tell that to my CLion! 😃

---

<div class="post-metadata">

**Author:** ![reuk](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/reuk/32/21494_2.png) [@reuk](https://forum.juce.com/u/reuk)\
**Post date:** [July 21, 2025, 10:15am UTC](https://forum.juce.com/t/how-to-get-clions-linter-to-work-in-juce-cpp-files/66651/4 "2025-07-21T10:15:41Z")

</div>

I think this depends on the module to some extent. I see the same thing here; however, files that are included earlier on in juce\_gui\_basics.cpp (all the native macOS files) seem to get indexed correctly. Some files that are included later on (TopLevelWindow.cpp, TooltipWindow.cpp) also get indexed correctly. It seems as though there’s _something_ that’s throwing off the indexing for some files in the middle, including the LookAndFeel sources, but at the moment I’m not sure what that could be.

---

<div class="post-metadata">

**Author:** ![JanWilczek](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/janwilczek/32/21823_2.png) [@JanWilczek](https://forum.juce.com/u/JanWilczek)\
**Post date:** [July 21, 2025, 10:36am UTC](https://forum.juce.com/t/how-to-get-clions-linter-to-work-in-juce-cpp-files/66651/5 "2025-07-21T10:36:18Z")

</div>

> [@reuk](#):
>
> It seems as though there’s _something_ that’s throwing off the indexing for some files in the middle, including the LookAndFeel sources, but at the moment I’m not sure what that could be.

Ah, yes, it’s the same for me too. My initial guess would be the size of the file: _juce\_Silder.cpp_ is over 1800 lines.

Update: After opening _juce\_gui\_basics.cpp_ and randomly navigating to some other _juce\_gui\_basics_ sources, linting started working 🤦‍♂️

---

<div class="post-metadata">

**Author:** ![ImJimmi](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/imjimmi/32/10843_2.png) [@ImJimmi](https://forum.juce.com/u/ImJimmi)\
**Post date:** [July 21, 2025, 1:31pm UTC](https://forum.juce.com/t/how-to-get-clions-linter-to-work-in-juce-cpp-files/66651/6 "2025-07-21T13:31:12Z")

</div>

I remember vscode used to do something similar before the CMake support improved.

---

<div class="post-metadata">

**Author:** ![mgrand](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/mgrand/32/14447_2.png) [@mgrand](https://forum.juce.com/u/mgrand)\
**Post date:** [July 25, 2025, 11:48am UTC](https://forum.juce.com/t/how-to-get-clions-linter-to-work-in-juce-cpp-files/66651/7 "2025-07-25T11:48:09Z")

</div>

I’m pretty sure it has to do with CLion Nova lack of Objective-C++ support. If I remove the main .mm file from my custom module, the linter starts working again.

Unfortunately, it’s not on JetBrains’ roadmap but you can vote for the feature request [here](https://youtrack.jetbrains.com/issue/CPP-37281/Objective-C-support).

---

<div class="post-metadata">

**Author:** ![JanWilczek](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/janwilczek/32/21823_2.png) [@JanWilczek](https://forum.juce.com/u/JanWilczek)\
**Post date:** [July 26, 2025, 8:11am UTC](https://forum.juce.com/t/how-to-get-clions-linter-to-work-in-juce-cpp-files/66651/8 "2025-07-26T08:11:41Z")

</div>

Interesting!
