1Using an IDE 2=============== 3 4Live Code Analysis 5------------------ 6While developing the Haiku codebase, it is possible to generate an inventory of compile commands 7by passing the **-c** flag to jam. The resulting **compile_commands.json** document will assist 8tools such as clangd_ in live analyzing our source code. 9 10.. code-block:: 11 :caption: Generating the **compile_commands.json** for clangd: 12 13 $ mkdir generated.clangd && cd generated.clangd 14 $ configure --build-cross-tools x86_64 --cross-tools-source ../../buildtools 15 $ jam -anc @nightly-anyboot 16 $ ln -sr compile_commands.json ../compile_commands.json 17 18 19When you use an editor which supports clangd_ such as helix_ or vim_ (with the clangd plugin), 20clangd_ will have knowledge of the relevant include paths and build flags for every source file 21within the Haiku codebase. 22 23.. TIP:: 24 When new source code files are added, you will need to run though the process above for a 25 complete database. 26 27.. _helix: http://helix-editor.com 28.. _vim: http://vim.org 29.. _clangd: http://clangd.llvm.org 30