Re: clang-tidy not part of base

From: Nuno Teixeira <eduardo_at_freebsd.org>
Date: Sat, 08 Jul 2023 16:10:38 UTC
Hello Dimitry!

Thanks for explanation.
Having fun at https://github.com/aardappel/treesheets/pull/396 already.

I digged at main src log and found that this tool have some importance:
---
commit 711b35dc24a8165929a9402ff8406248b65467bc
Author: Richard Yao <richard.yao@alumni.stonybrook.edu>
Date:   Fri Oct 14 22:46:43 2022 -0400

    fm_fmri_hc_create() must call va_end() before returning

    clang-tidy caught this.
(...)
---

Cheers,

Dimitry Andric <dim@freebsd.org> escreveu no dia sábado, 8/07/2023 à(s)
15:14:

> On 8 Jul 2023, at 14:38, Nuno Teixeira <eduardo@freebsd.org> wrote:
> >
> > Recently deskutils/treesheets upstream introduced clang-tidy to cmake:
> > ---
> > set(CMAKE_CXX_CLANG_TIDY clang-tidy
> -checks=cppcoreguidelines-*,clang-analyzer-*,readability-*,performance-*,portability-*,concurrency-*,modernize-*)
> > ---
> >
> https://github.com/aardappel/treesheets/blob/9131048804169c448ba61900935ff04acfb1e279/CMakeLists.txt#L63C13-L63C13
> >
> > This causing build to fail because clang-tidy is not found.
> > What I found is that 13 and 14 doesn't ship this program but it is
> available as clang-tidy{13,15} from llvm ports.
>
> Theoretically we could import clang-tidy into base, at least the parts
> that don't use Python, but it is better left in the llvm ports.
>
>
> > As workaround I comment it out.
> > Any sugestions on what to do, what to say to upstream?
> >
> > Should this be a cmake debug option?
>
> I guess that clang-tidy is used by the upstream maintainers, for cleaning
> up the source, but it is of no use to ports builders or package end-users.
>
> For the short term, I would simply comment it out. I would inform upstream
> that this can be problematic, and maybe put it under some sort of
> "enable-maintainer-mode" option?
>
> -Dimitry
>
>

-- 
Nuno Teixeira
FreeBSD Committer (ports)