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: 2022-06-04 06:32 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.