【问题标题】:clion disable code insight in certain filesclion 在某些文件中禁用代码洞察力
【发布时间】:2017-08-03 22:28:21
【问题描述】:

是否有任何方法可以仅针对项目中的一个文件禁用 Clion 中的代码洞察?

我有一个只有几行的 swig 文件。但是每次我进入文件时,clion都会抱怨标题并冻结很长时间。我必须在 phpstorm 或其他无法解析 c++ 的编辑器中打开这个文件。

complain messages from Clion

//anal.swig
%module anal
%{
#include "anal.cpp"
%}
void anal(char *str, int size);

【问题讨论】:

    标签: clion


    【解决方案1】:

    有几种方法可以做到这一点: 1.将文件扩展名从“.h/.cpp”更改为“.templ”(非C++相关) 2. Clion有special IDE macros,可以加守卫

    #ifndef __CLION_IDE__
    //anal.swig
    %module anal
    %{
    #include "anal.cpp"
    %}
    #endif
    void anal(char *str, int size);
    
    1. CLion 有 #pragma ide diagnostic ignored 用于选择性关闭。

    【讨论】:

      猜你喜欢
      • 2015-11-10
      • 2011-12-16
      • 2011-01-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多