{"id":15569447,"url":"https://github.com/johnthagen/clion-cppcheck","last_synced_at":"2025-07-20T12:05:59.939Z","repository":{"id":3380408,"uuid":"49236949","full_name":"johnthagen/clion-cppcheck","owner":"johnthagen","description":":ballot_box_with_check: cppcheck plugin for CLion","archived":false,"fork":false,"pushed_at":"2025-01-03T12:13:24.000Z","size":2924,"stargazers_count":33,"open_issues_count":36,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-25T18:05:15.669Z","etag":null,"topics":["clion","cpp","cppcheck","linting"],"latest_commit_sha":null,"homepage":"https://plugins.jetbrains.com/plugin/8143-cppcheck/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/johnthagen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-01-07T23:24:33.000Z","updated_at":"2025-05-10T17:34:26.000Z","dependencies_parsed_at":"2025-04-28T16:37:26.323Z","dependency_job_id":null,"html_url":"https://github.com/johnthagen/clion-cppcheck","commit_stats":null,"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"purl":"pkg:github/johnthagen/clion-cppcheck","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnthagen%2Fclion-cppcheck","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnthagen%2Fclion-cppcheck/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnthagen%2Fclion-cppcheck/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnthagen%2Fclion-cppcheck/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johnthagen","download_url":"https://codeload.github.com/johnthagen/clion-cppcheck/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnthagen%2Fclion-cppcheck/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266120341,"owners_count":23879301,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clion","cpp","cppcheck","linting"],"created_at":"2024-10-02T17:29:03.893Z","updated_at":"2025-07-20T12:05:59.922Z","avatar_url":"https://github.com/johnthagen.png","language":"Java","readme":"# clion-cppcheck\n\nA plugin for JetBrains IDEs to provide inspections for C/C++ files utilizing the static analyzer [Cppcheck](https://cppcheck.sourceforge.io/). \n\nThis project is supported with a free open source license of CLion from \n[JetBrains](https://www.jetbrains.com/?from=clion-cppcheck).\n\n## Features\n\n- Runs `Cppcheck` on the fly while you write code.\n- Highlights lines and displays `Cppcheck` error messages.\n- Supports passing options to `Cppcheck`.\n\n## Installation\n\n- Install the `cppcheck` plugin from the JetBrains Marketplace: https://plugins.jetbrains.com/plugin/8143-cppcheck. See \n[Installing, Updating and Uninstalling Repository Plugins](https://www.jetbrains.com/help/clion/managing-plugins.html)\nfor more details.\n\n- Install Cppcheck. Please refer to https://github.com/danmar/cppcheck#packages on how to obtain a version of Cppcheck\n  for your platform.\n\n- Go to the `Cppcheck Configuration` section in the settings of your respective JetBrains IDE and put the **absolute**\n  path to the Cppcheck executable in the `Cppcheck Path`.\n\n- (Windows) The executable is found in the path you specified during the installation. By default this should be\n  `C:\\Program Files\\Cppcheck\\cppcheck.exe`.\n- (Non-Windows) Use `which cppcheck` or `command -v cppcheck` on the command-line to get the location of the executable.\n  The default depends on your system but should usually be `/usr/bin/cppcheck` or `/usr/local/bin/cppcheck`.\n\n## Usage\n\n### Provided Actions\n\nThe plugin provides the `Show Cppcheck XML Output` action which will show the raw XML output of the latest finished\nanalysis.\n\n## Plugin Configuration\n\n### Verbose Level\n\nThe verbose level of the plugin. The following additional information are provided:\n\n`0` - no verbose information\u003cbr/\u003e\n`1` - a notification will be shown if the analysis finished\u003cbr/\u003e\n`2` - a notification will be shown if the analysis was invoked (includes all command-line options)\u003cbr/\u003e\n`4` - a notification will be shown for each findings in the result (will not show the internally ignored ones)\u003cbr/\u003e\n\n## Known Issues/Limitations\n\nSee https://github.com/johnthagen/clion-cppcheck/issues for a complete list of tracked issues and enhancements requests.\n\n### Analyzing header files\n\nCppcheck is not designed to be run on header files (`.h`) directly, as must be done for this\nplugin, and as a result may have false positives.\n\nWhen run on header files directly, Cppcheck defaults to C as the language, which will generate\nfalse positives for C++ projects. So `--language=c++` is implicitly added as option when analyzing header files.\n\nIt will also provide `unusedFunction` and `unusedStructMember` false positives so these findings are being suppressed.\n\nRelated issues:\u003cbr/\u003e\nhttps://github.com/johnthagen/clion-cppcheck/issues/22\nhttps://github.com/johnthagen/clion-cppcheck/issues/52\n\n### Analyzing multiple configurations\n\nBy default Cppcheck tries to determine all the available configurations for a file (i.e. all combination of the used \npreprocessor defines). As the plugin doesn't get the current list of defines this may lead to findings shown in code \nwhich is shown as disabled in the editor. To check just a specific configuration you can either add defines using `-D`\nto the options. Or you can limit the configurations to a single one adding `--max-configs=1`.\n\nBy default Limiting the configurations also decreases the time of the analysis.\n\nBy default a maximum of 12 configurations is checked. This may lead to some code which might actually be active not to \nshow any findings. This can also be controlled by the `--max-configs=\u003cn\u003e` option.\n\nRelated issues:\u003cbr/\u003e\nhttps://github.com/johnthagen/clion-cppcheck/issues/34\nhttps://github.com/johnthagen/clion-cppcheck/issues/52\n\n### Multiple include paths\n\nNo additional includes path are being passed to Cppcheck for the analysis which might result in false positives or not\nall findings being shown.\n\nYou can add additional include path using the `-I \u003cpath\u003e` options.\n\nRelated issues:\u003cbr/\u003e\nhttps://github.com/johnthagen/clion-cppcheck/issues/52\nhttps://github.com/johnthagen/clion-cppcheck/issues/55\n\n### Batch analysis\n\nThe batch analysis passes the files individually to Cppcheck just like the highlighting inspections. So if you pass a \nfolder to the batch analysis it might not show the same findings as when passing a folder to `Cppcheck` itself.\n\nIt will also pass all the contents of the folder to the analysis and not just project files. This might lead to\nunexpected findings.\n\nAlso some findings in headers files triggered by the analysis of a source files are not being shown.\n\nRelated issues:\u003cbr/\u003e\nhttps://github.com/johnthagen/clion-cppcheck/issues/54\n\n### Showing raw output\n\n`Show Cppcheck XML Output` only shows the XML result of the latest analysis. If you need to view the results for a\nspecific file make sure it was the last one analyzed.\n\nRelated issues:\u003cbr/\u003e\nhttps://github.com/johnthagen/clion-cppcheck/issues/53\n\n### External libraries / System includes\n\nCppcheck does not support analyzing of external library or system includes. It provides profiles for several external\nlibraries which describe the contents and behavior of the includes which allows it to finding issues with usage of them\nin the code. To add such a profile to your analysis you need to specify it via the `--library=\u003cname\u003e` option. The\navailable profile can be found in the `cfg` folder of your `Cppcheck` installation. \n\n### Global options\n\nCurrently the configured options are global and not per project.\n\nRelated issues:\u003cbr/\u003e\nhttps://github.com/johnthagen/clion-cppcheck/issues/52\n\n## Development\n\nTo run the plugin from source, open this project in IntelliJ and create a new \"Plugin\" run configuration. Running or\ndebugging this run configuration will launch a new IntelliJ process with the plugin loaded into it. \n\nSee this page for details: https://jetbrains.org/intellij/sdk/docs/basics/getting_started/setting_up_environment.html\n\nTo build the plugin for deployment to the https://plugins.jetbrains.com/, select Build | Prepare Plugin Module For\nDeployment.\n\n## Maintainers\n\n- @johnthagen\n- @firewave\n\n## Releases\n\n### 1.6.7 - 20XX-XX-XX\n\n### 1.6.6 - 2024-01-06\n\n- Fixed `no location` error notifications for `checkersReport` when `information` is enabled.\n\n### 1.6.5 - 2023-12-15\n\n- Removed `com.intellij.modules.java` dependency.\n- Bumped the oldest supported product versions to 2020.1.\n\n### 1.6.4 - 2023-12-12\n\n- Added missing `com.intellij.modules.java` dependency.\n\n### 1.6.3 - 2023-12-07\n\n- Added `Show Cppcheck XML Output` action to show the latest XML output.\n- Report execution errors as global inspection errors.\n- Display `Cppcheck Path` configuration errors as global inspection errors instead of using a (hard to spot) status bar\n  message.\n- Display global inspection error and omit the option if the configured `MISRA Addon JSON` does not exist.\n- Made plugin verbose level configurable via settings.\n- Display all available details for findings in tooltip.\n\n### 1.6.2 - 2022-01-25\n\n- Fixed `NullPointerException` with Cppcheck \u003c 1.89 caused by missing `column` attribute in XML result.\n\n### 1.6.1 - 2022-01-14\n\n- Fixed missing `commons-lang3` dependency.\n- Fixed `.idea` project provided by repository.\n\n### 1.6.0 - 2021-12-26\n\n- Parse `--xml` output instead of text output. (Contribution by @firewave)\n- Fixed scanning of files with whitespaces in name. (Contribution by @firewave)\n- Only scan files which actually exist. (Contribution by @firewave)\n- Use unique file names for temporary files used for analysis. (Contribution by @firewave)\n- Properly handle `debug` messages generated by `--debug-warnings`. (Contribution by @firewave)\n- Added `.cl`, `.hxx`, `.tpp` and `.txx` to list of supported file extensions - now matches the ones supported by\n  Cppcheck internally. (Contribution by @firewave)\n- Internally suppress `unusedFunction` and `unusedStructMember`  (for header files only) warnings to avoid false\n  positives. (Contribution by @firewave)\n- Fixed `information` messages not being shown at all. (Contribution by @firewave)\n\n### 1.5.1 - 2020-11-12\n\nImproved reporting of execution failures. (Contribution by @firewave)\n\n### 1.5.0 - 2020-11-01\n\n- Correctly specify minimum supported CLion version.\n- Support showing inconclusive annotations in the IDE. (Contribution by @firewave)\n\n### 1.4.2 - 2020-04-06\n\nFix NullPointerException. (Contribution by @firewave)\n\n### 1.4.1 - 2020-04-06\n\nFix NullPointerException. (Contribution by @firewave)\n\n### 1.4.0 - 2020-04-03\n\nSupport Cppcheck MISRA addon. (Contribution by @SJ-Innovation)\n\n### 1.3.0 - 2020-03-28\n\nSupport Cppcheck \u003e1.89. (Contribution by @SJ-Innovation)\n\n### 1.2.0 - 2018-04-11\n\nGreatly improve plugin responsiveness to changes by using virtual files to interact with Cppcheck.\n(Contribution by @fastasturtle)\n\n### 1.1.0 - 2018-04-02\n\nUse `CapturingProcessHandler` to fix read locking issues and spaces in path to source files. \n(Contribution by @fastasturtle)\n\n### 1.0.10 - 2018-01-06\n\nFix formatting on plugin homepage.\n\n### 1.0.9 - 2018-01-02\n\nImprove the user's guide for installing and using the plugin. Default to using `--language=c++` Cppcheck option.\n\n### 1.0.8 - 2017-08-02\n\nFix handling Cppcheck errors that span multiple lines.\n\n### 1.0.7 - 2017-02-03\n\nAvoid drawing errors in .cpp and .c files from header files they import.\n\n### 1.0.6 - 2016-02-25\n\nFix NullPointerException when opening files with no extension.\n\n### 1.0.5 - 2016-02-11\n\nAdd warning about header file false positives in C++ projects.\n\n### 1.0.4 - 2016-01-28\n\nFix highlighting prepended whitespace.\n\n### 1.0.3 - 2016-01-22\n\nHighlight line corresponding to severity.\n\n### 1.0.2 - 2016-01-19\n\nFix execution on Linux.\n\n### 1.0.1 - 2016-01-11\n\nFix possible out of bounds line number when Cppcheck gets out of sync with in-memory file.\n\n### 1.0.0 - 2016-01-07\n\nFirst release.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnthagen%2Fclion-cppcheck","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnthagen%2Fclion-cppcheck","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnthagen%2Fclion-cppcheck/lists"}