Skip to content

Conversation

@danmar
Copy link
Owner

@danmar danmar commented Nov 22, 2025

No description provided.

@danmar danmar force-pushed the fix-14227-truncLongCast branch from 96224d6 to 3baab23 Compare November 22, 2025 13:45
@danmar danmar force-pushed the fix-14227-truncLongCast branch from 3baab23 to e41bf07 Compare November 22, 2025 13:46
@sonarqubecloud
Copy link

@danmar danmar merged commit cb76e52 into danmar:main Nov 22, 2025
2 checks passed
@danmar danmar deleted the fix-14227-truncLongCast branch November 22, 2025 13:48
@firewave
Copy link
Collaborator

Documenting the checkers is good but some notes on that:

  • we should make sure that the code is actually valid
    • the code cannot be compiled as it lacks the includes. I understand that is done to make it more readable but it makes it harder to other people to take the code and reproduce the actual issue. That is also a common issue with the documentation of other code checkers.
  • we should make sure the issues are actually caught (we do it for the samples which are now redundant)
    • see above
  • it would be good to include the actual reported issue
  • in some other pages it is hard to make out what was actually changed in the code. Adding a different comment might not be sufficient so it should probably have some highlighting as there might be subtle changes which can easily be missed if the fix requires more than one lie to be adjusted (might not be possible with Markdown and also wanting C++ highlighting).

Maybe the source should be provided as good/bad files as the samples and the *.md pages generated from those files (that could also include the expected output).

@danmar
Copy link
Owner Author

danmar commented Nov 29, 2025

I think this is good feedback.

  • I am not strongly against that we provide the #include options.
  • Some syntax checking to ensure code examples are valid sounds good.
  • Showing what message cppcheck writes for each sample sounds good.
  • I am against that code examples are broken out into separate good/bad files I want to provide a single interface for the user. However I would not be against that good/bad files are extracted from the md files so users have a choice..

@firewave
Copy link
Collaborator

  • I am against that code examples are broken out into separate good/bad files I want to provide a single interface for the user. However I would not be against that good/bad files are extracted from the md files so users have a choice..

The code should be within the Markdown and separately on the filesystem. But there should be only one place that code is being maintained it. If that is achieved via injection or extraction should probably not matter (unless we realize one of them is more convenient of course).

@danmar
Copy link
Owner Author

danmar commented Nov 29, 2025

But there should be only one place that code is being maintained it.

yes

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