Skip to content

fixed #13128 - apply enforced language with --clang#6825

Merged
chrchr-github merged 1 commit intocppcheck-opensource:mainfrom
firewave:clang-lang
Sep 25, 2024
Merged

fixed #13128 - apply enforced language with --clang#6825
chrchr-github merged 1 commit intocppcheck-opensource:mainfrom
firewave:clang-lang

Conversation

@firewave
Copy link
Copy Markdown
Collaborator

No description provided.

Comment thread lib/cppcheck.cpp
// TODO: get language from FileWithDetails object
// TODO: this ignores the configured language
const bool isCpp = Path::identify(file.spath(), mSettings.cppHeaderProbe) == Standards::Language::CPP;
bool isCpp;
Copy link
Copy Markdown
Collaborator

@chrchr-github chrchr-github Sep 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isCpp could be initialized with (mSettings.enforcedLang == Standards::CPP);
Or even make it const and use a ternary.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That code will go away when the language is moved into FileWithDetails.

@chrchr-github chrchr-github merged commit 3309f02 into cppcheck-opensource:main Sep 25, 2024
@firewave firewave deleted the clang-lang branch September 25, 2024 08:20
ludviggunne pushed a commit to ludviggunne/cppcheck that referenced this pull request Oct 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants