wl-clipboard icon indicating copy to clipboard operation
wl-clipboard copied to clipboard

Include what you use

Open bugaevc opened this issue 1 year ago • 6 comments

We should run https://include-what-you-use.org/ on wl-clipboard and apply (some of) its suggestions, within reason.

It's easy to use with Meson, see https://github.com/mesonbuild/meson/issues/2637#issuecomment-504839877

bugaevc avatar Mar 28 '23 15:03 bugaevc

Hi, I was experimenting a bit with this and I tried setting up a github action for it. What I stumbled on is that there seem to be no prebuilt binaries of IWYU, so the action would need to first build IWYU, then build wl-clipboard and afterwards run IWYU on wl-clipboard. Have I missed something, or is this really the easiest way to do this?

Also: I need to specify a clang version for IWYU. Which should I use?

corite avatar Jul 30 '23 10:07 corite

Hi,

wl-clipboard will not use GitHub Actions (as long as it requires adding GitHub-specific files to the repo), so maybe setting up an action is not the optimal way to start. I was rather thinking we'd run IWYU once and act on its output, then maybe check what it has to say every once in a while.

bugaevc avatar Jul 30 '23 10:07 bugaevc

That being said, your action is using ubuntu-latest, so can't you just more or less apt install iwyu?

bugaevc avatar Jul 30 '23 10:07 bugaevc

Hi,

wl-clipboard will not use GitHub Actions (as long as it requires adding GitHub-specific files to the repo), so maybe setting up an action is not the optimal way to start. I was rather thinking we'd run IWYU once and act on its output, then maybe check what it has to say every once in a while.

Oh ok, may I ask why? I was thinking that If we put it in a workflow_dispatch action you get that same workflow, but without the hassle of installing and setting up stuff every time.

corite avatar Jul 30 '23 10:07 corite

That being said, your action is using ubuntu-latest, so can't you just more or less apt install iwyu?

Oh right, I've found it now. It was just not mentioned anywhere, so I thought there was no package available.

corite avatar Jul 30 '23 10:07 corite

Regardless of whether or not you want to merge this, it now works on my fork.

corite avatar Jul 30 '23 10:07 corite