CLion 2018.1 EAP: Clang-Tidy options and configs, CMake Install and more

Hi,

The new CLion 2018.1 EAP, build 181.3741.16, is available for download. This build delivers more flexible configuration of Clang-Tidy, fixes for debugger on WSL, CMake Install, dozens of GDB fixes and color schemes improvements.

If you have the previous CLion 2018.1 EAP build (181.3494.7) installed, you should soon get a notification in the IDE about a patch update.

Download CLion 2018.1 EAP

Clang-Tidy options

Starting with v2017.2 CLion comes with an integration with Clang-Tidy, which expands the list of CLion’s built-in checks and helps you ensure better code quality. Clang-Tidy checks can be configured in CLion’s settings (Settings/Preferences | Editor | Inspections | C/C++ | General | Clang-Tidy). With CLion 2018.1 EAP you can also:

  • Configure options used by the Clang-Tidy checks
  • Force CLion to use existing .clang-tidy configs instead of the settings provided in the IDE settings dialog

For example, if you take modernize-use-nullptr check and decide to provide the list of macro names that will be transformed into C++11 nullptr, you can configure this list in CLion now:
clang_tidy_options
If you want CLion to respect your existing per-directory Clang-Tidy configs, untick “Use IDE settings” option under Settings/Preferences | Editor | Inspections | C/C++ | General | Clang-Tidy.

The bundled Clang-Tidy binary was updated and now provides more checks (CPP-11811).

WSL debugger

WSL support in CLion comes with the debugger. This EAP build fixes an issue with reading from std::cin. Besides, you don’t need to enable WSL debugger via Registry now – it’s on by default.

CMake Install

In the previous EAP build one might notice a new action in the Run menu: Install. It simply runs cmake install on your project. Thus, if you have any install targets in your CMake, CLion will call them:
clang_tidy_options
You’ll get No rule to make target 'install' in case no target is found.

Besides, you can add an installation step to your run configurations:
install_step

GDB fixes: pretty printers and more

There is a bunch of debugger improvements in this build. First of all, we’ve bundled GDB 8.1, and on macOS it’s now built with multiarch support (like on other platforms). This bundled version includes a few fixes for the known issues:

  • GDB shows wrong type when fields are optimized out (CPP-11966)
  • GDB pretty printers are not called for iterators (CPP-7331)

We’ve also updated bundled GDB STL pretty-printers (CPP-11909) to fix several issues:

  • STL smart pointer rendering issue (CPP-2496)
  • GDB pretty printers don’t work for std::string and std::list with GCC-5 and higher (CPP-6828)

This EAP also delivers a fix for the case when the content of STL containers was not updated on stepping (CPP-7166).

Color scheme improvements

CLion now bundles Monokai and GitHub schemes, as well as comes with a bunch of fixes to the existing schemes:

  • Color schemes with improper configuration: “Right margin” not set, VCS marker not visible (CPP-3274)
  • Solarized Dark ‘Default Identifier’ color is black, illegible by default (CPP-10630)
  • Dark schemes use black foreground colors (CPP-11212)
  • Colors in dark editor color schemes are sometimes unreadable (CPP-11228)

That’s it! Full release notes are available by the link.

Try our new EAP build and let us know what you think!

Download CLion 2018.1 EAP

Your CLion Team
JetBrains
The Drive to Develop

This entry was posted in Early Access Preview and tagged , , , , , , . Bookmark the permalink.

18 Responses to CLion 2018.1 EAP: Clang-Tidy options and configs, CMake Install and more

  1. Tano says:

    Can we use in this version “data flow analysis” and cppcheck?
    Because it latest versions is unusable(meaning terrible slow) with these checks activated.

    • Anastasia Kazakova says:

      cppcheck is a 3rd party plugin, so we don’t have any control over it. DFA should be working, while there are some issues related to it (not new however).

  2. Tano says:

    Btw, I get this error when building:

    Couldn’t run process with PTY: Exec_tty error:Unknown reason
    java.io.IOException: Exec_tty error:Unknown reason
    at com.pty4j.unix.UnixPtyProcess.execInPty(UnixPtyProcess.java:235)
    at com.pty4j.unix.UnixPtyProcess.(UnixPtyProcess.java:69)
    at com.pty4j.PtyProcess.exec(PtyProcess.java:83)
    at com.intellij.execution.configurations.PtyCommandLine.startProcessWithPty(PtyCommandLine.java:109)
    at com.intellij.execution.configurations.PtyCommandLine.startProcess(PtyCommandLine.java:60)
    at com.intellij.execution.configurations.GeneralCommandLine.createProcess(GeneralCommandLine.java:391)
    at com.intellij.execution.process.OSProcessHandler.startProcess(OSProcessHandler.java:51)
    at com.intellij.execution.process.OSProcessHandler.(OSProcessHandler.java:44)
    at com.intellij.execution.process.KillableProcessHandler.(KillableProcessHandler.java:44)
    at com.intellij.execution.process.ColoredProcessHandler.(ColoredProcessHandler.java:38)
    at com.jetbrains.cidr.lang.toolchains.CidrToolEnvironment.createProcess(CidrToolEnvironment.java:118)
    at com.jetbrains.cidr.cpp.toolchains.CPPEnvironment.createProcess(CPPEnvironment.java:287)
    at com.jetbrains.cidr.cpp.execution.build.CMakeBuild.a(CMakeBuild.java:426)
    at com.jetbrains.cidr.cpp.execution.build.CMakeBuild.a(CMakeBuild.java:180)
    at com.jetbrains.cidr.cpp.cmake.workspace.CMakeWorkspaceWatcher.a(CMakeWorkspaceWatcher.java:343)
    at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:305)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

  3. Tano says:

    1. Also if I add “install” in the building step(like in your picture), when I build, it should install also?
    Because it does not work. The install is done only when I specify explicit Run-Install from the menu.
    2. I have like 30 targets, isn’t there a way to add “install” to all building steps?

    Thanks

    • Tano says:

      2. I meant ” isn’t there a way to add “install” to all building TARGETS?”

    • Anastasia Kazakova says:

      1. What is the building step? It’s a run configuration, so it adds steps to the actual target’s run, not building process.

      2. Install actually doesn’t work per target, but as it’s a CMake install, it simply run install for all targets that fit. But your point seems like a good feature request. Could you please add to the tracker? We might indeed consider it.

      • Tano says:

        So basically there is no way to run make install(both in one step) at building?
        I have to press build then I have to press install?

        • Anastasia Kazakova says:

          But why do you need that? Usually CMake Install is called after building the project/some targets (or right before the build), but before running some targets. Not sure about the use case. Can you please provide some details?

          • Tano says:

            Because I build in CLion but always debug and run in the terminal. I cannot debug if the binary are properly deployed in the “install” folder.
            Usually the “install” is done right after the build, not before running.

          • Tano says:

            ” I cannot debug if the binary are NOT properly deployed “

          • Tano says:

            Also, after building and installing, I am running multiple instances of my binary on different ports (I split the terminal and run 3-4 instances) and see the output for all, which is very easy to see in terminal, I even don’t know if CLion can handle this situation.

          • Anastasia Kazakova says:

            For this case you can simply call Install from the Run menu. We can maybe later assign a default shortcut for the action.

  4. Roman says:

    This version adds small blue rectangle to all .h/.cpp file icons in my project. What does it mean?

  5. ADV says:

    Is it possible to enable swift plugin for WSL ?

    • Anastasia Kazakova says:

      Do you mean using Swift toolchain from Ubuntu via WSL? It’s not supported for now and we haven’t yet considered such a case. Feel free to create a feature request and we’ll investigate.

Leave a Reply

Your email address will not be published. Required fields are marked *