Skip to content

Conversation

@danmar
Copy link
Owner

@danmar danmar commented Nov 17, 2025

The file-less warning generated from cppcheckexecutor.cpp is removed. the --errorlist message should match the real message.

@danmar danmar marked this pull request as draft November 17, 2025 20:35
@firewave
Copy link
Collaborator

Looks like we are lacking tests for this (and --check-config).

@danmar
Copy link
Owner Author

danmar commented Nov 18, 2025

Looks like we are lacking tests for this (and --check-config).

Yeah I was expecting some testfailures

@danmar danmar changed the title Experimental fix for #13825 (toomanyconfigs lacks file information) Fix #13825 (toomanyconfigs lacks file information) Nov 18, 2025
@danmar danmar marked this pull request as ready for review November 18, 2025 09:21
f.write(f'#{dir} defined(X{i})\nx = {i};\n')
f.write('#endif\n')

args = ['--enable=information', '--template=daca2', str(test_file)]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why are using the daca2 template?

Copy link
Owner Author

Choose a reason for hiding this comment

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

because default template writes 3 lines instead of 1.

Copy link
Owner Author

Choose a reason for hiding this comment

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

any 1-line template format will do here imho

// if maxConfigs has default value then report information message that configurations are skipped
if (mSettings.maxConfigs == 12 && mSettings.severity.isEnabled(Severity::information))
tooManyConfigsError(Path::toNativeSeparators(file.spath()), configurations.size());

Copy link
Collaborator

Choose a reason for hiding this comment

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

This feels very strange.

Also the check for the default value should not be hard-coded - use a default Settings object to check against.

@danmar danmar marked this pull request as draft November 19, 2025 07:04
@sonarqubecloud
Copy link

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