Bug 148415 - More detailed, better explained loplugin errors
Summary: More detailed, better explained loplugin errors
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: framework (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Dev-related
  Show dependency treegraph
 
Reported: 2022-04-06 08:26 UTC by Gabor Kelemen (allotropia)
Modified: 2024-06-04 03:14 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Kelemen (allotropia) 2022-04-06 08:26:34 UTC
This is not about LO, but about the clang plugins used by Jenkins.

In many cases the plugins end up giving error messages on a patch, which may be difficult to understand for beginner programmers - or even more experienced ones who do not follow new developments in the clang plugins area.

It came up that it would be better/more educative if ALL these error messages[1] were all uniformly a bit more explanatory:
- Why is some practice considered "wrong"? This may be dug out of git logs, but that's  super inconvenient.
- What should I change to do it correctly, possibly with an example.

Adding experienced devs and TDF mentors to CC. It would be beneficial to review all the plugins and change their error messages to be very descriptive if they are currently not.

[1] Just for examples from builds on top of the list:
https://gerrit.libreoffice.org/c/core/+/132571 writes:
clang plugin redundantcast did trigger. redundant static_cast from "SwParaPortion *" to "SwLinePortion *"
- tells why is this bad, but no explanation on what to do (might be seen as trivial... but that's just an assumption of experienced devs, better to make sure ;) )

https://gerrit.libreoffice.org/c/core/+/130692 writes:
clang plugin fakebool did trigger. use "true" instead of "sal_True" 
- no explanation why is this bad, but tells what to change

https://gerrit.libreoffice.org/c/core/+/132505 writes:
clang plugin stringviewparam did trigger. replace function parameter of type "const rtl::OUString &" with "std::u16string_view"
- no explanation why is this bad, but tells what to change

clang plugin simplifyconstruct did trigger. no need to explicitly init an instance of "::std::unique_ptr<FileChangedChecker>" with nullptr, just use default constructor
- explains why is this bad and what to do instead - excellent!
Comment 1 Aron Budea 2022-06-04 06:32:17 UTC
Seems reasonable, setting to NEW.
Comment 2 QA Administrators 2024-06-04 03:14:31 UTC
Dear Gabor Kelemen (allotropia),

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug