Skip to content

Include paths and defines are still not passed to cppcheck with 1.2.4 (CDT project using a language settings provider) #35

Open

Description

@alotfy1993

Follow-up to #11.

Environment

  • cppcheclipse 1.2.4.v20260812-0727
  • Eclipse 4.39 / CDT 9.3 (Renesas e2 studio), Java 21
  • cppcheck 2.22.0
  • C project, Renesas LLVM (clang) toolchain for Arm, managed build
  • language.settings.xml providers:
    com.renesas.cdt.managedbuild.llvm.arm.languageprovider,
    org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider,
    org.eclipse.cdt.ui.UserLanguageSettingsProvider

Settings: "Follow user-defined includes", "Follow system-defined includes",
"Include CDT User-Defined Symbols" and "Include CDT System-Defined Symbols" are checked.

Expected: cppcheck gets -I and -D from the project's include paths and macros.
Actual: no -I and no -D are passed. The plugin's findings are identical
(same 31 findings, same lines) to a plain command-line run without any -I or -D.
Command line from the plugin console:

Possible cause: ToolchainSettings reads ICLanguageSetting.getSettingEntries()
from the root folder of the active configuration. In this project the entries
come from language settings providers, which that call may not return.
LanguageSettingsManager / ILanguageSettingsProvidersKeeper might be needed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions