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:
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 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.
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.