You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2022/11/01 04:08:00 UTC

[jira] [Commented] (IMPALA-11695) Exclude some useless warnings from the Clang Tidy build

    [ https://issues.apache.org/jira/browse/IMPALA-11695?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17626954#comment-17626954 ] 

ASF subversion and git services commented on IMPALA-11695:
----------------------------------------------------------

Commit 8271bdd587d241cd5a61ccae7422bbb5fafcfaf7 in impala's branch refs/heads/master from Joe McDonnell
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=8271bdd58 ]

IMPALA-11695: Reduce clang tidy warning output size

The Clang Tidy build enables all warnings via -Wall
and -Weverything. This produces enormous output.
Looking at a recent failed Clang Tidy build, there
are ~4.5 million warnings generated. Of these,
about 4 million are from C++98 compatibility warnings.
A further 250 thousand are from padding warnings.
Since these are not particularly interesting, this
disables both of those to reduce the output size.

Disabling these warnings allowed Clang Tidy to find
some issues in DataSketches that it was previously
missing. Perhaps there is some limit on the number
or size of warnings that it was processing. This
modifies the DataSketches code to fix those (which
are all minor issues with const correctness).

Testing:
 - Built with clang tidy locally

Change-Id: I28c6ed1e7a4f525d81a9c48e90d051b374d44941
Reviewed-on: http://gerrit.cloudera.org:8080/19182
Reviewed-by: Wenzhe Zhou <wz...@cloudera.com>
Reviewed-by: Michael Smith <mi...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>


> Exclude some useless warnings from the Clang Tidy build
> -------------------------------------------------------
>
>                 Key: IMPALA-11695
>                 URL: https://issues.apache.org/jira/browse/IMPALA-11695
>             Project: IMPALA
>          Issue Type: Improvement
>          Components: Infrastructure
>    Affects Versions: Impala 4.2.0
>            Reporter: Joe McDonnell
>            Assignee: Joe McDonnell
>            Priority: Major
>
> Thee build we do for Clang Tidy enables all warnings:
>  
> {noformat}
> # Turn all warnings back on. Some will be ignored via .clang-tidy's "Checks" value, but
> # this allows different "Checks" settings to be used in different clang-tidy runs without
> # recompiling.
> SET(CXX_FLAGS_TIDY "${CXX_FLAGS_TIDY} -Wall -W -Weverything"){noformat}
> This produces extremely verbose output, and some of the warnings are not useful. In particular, we have no interest in c++98 compatibility, so Wc++98-compat inflates the output dramatically for no reason.
> Looking at the output of a recent build failure, the tidylog.txt was 1.6GB and contained 4.6 million warnings. Of those, 4 million were from c++98 compatability. Another 275k were from Wpadded, which is also not interesting.
>  
> {noformat}
> $ cat tidylog.txt | grep '\[\-W' | wc -l
> 4657716
> # Exclude Wc++98-compat
> $ cat tidylog.txt | grep '\[\-W' | grep -v "Wc++98-compat" | wc -l
> 592206
> # Exclude Wc++98-compat and Wpadded
> $ cat tidylog.txt | grep '\[\-W' | grep -v "Wc++98-compat" | grep -v "Wpadded" | wc -l
> 316982{noformat}
> It seems like excluding these two warnings is useful to reduce the output size.
> An issue we saw recently is that the JUnitXML from the build is so overwhelmed by the useless warnings that the actual error gets cut off due to size constraints for JUnitXML. This should help with that.
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org