Skip to content

Conversation

@danmar
Copy link
Owner

@danmar danmar commented Mar 4, 2023

No description provided.

@firewave
Copy link
Collaborator

firewave commented Mar 4, 2023

I think we should add a small additional paragraph about what --library is trying to achieve to README.md. Detailing this is used to provide information about certain interfaces without need to providing the headers so so can properly analyze only your code base. Should also have a mention of --debug-warnings and --check-library (though this should get an asterisk since it still has too many false positives) about detecting gaps in that similar to the missingInclude warning. And also that user can provide their own library files for custom libraries - with an hint at submitting those to the project.

This would also go along with https://trac.cppcheck.net/ticket/11287. If we know which header belongs to which library we can suggest the actual library in the message. And in case we do the automatic detection we only need to provide the missingIncludeSystem warning if it is not covered by any library thus increasing the detection coverage.

The message you are changing should say something like (paraphrased and verbose):

Cppcheck does not need system header for analysis. Having more information will help to provide more accurate results. Please specify a --library instead. Refer the --library documentation for more infomration.

@danmar
Copy link
Owner Author

danmar commented Mar 4, 2023

Cppcheck does not need system header for analysis. Having more information will help to provide more accurate results. Please specify a --library instead. Refer the --library documentation for more infomration.

I would like it to be more clear.

The second sentence can easily be understood as: it would be a good thing to provide include paths to system headers.

And the first sentence could be understood as: well.. cppcheck can still run without headers it will not crash or anything.

The third sentence does not say explicitly what --library should be used instead of. We do not mention "include paths" anywhere in the message.

@firewave
Copy link
Collaborator

firewave commented Mar 4, 2023

That was just the gist of it. I am currently not in the mindset to phrase that in a clear and compact way. Maybe on Monday...

@danmar danmar closed this Apr 9, 2023
@danmar danmar deleted the missingIncludeMessages branch April 9, 2023 19:02
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.

3 participants