Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clean up the headers #293

Merged
merged 4 commits into from
Dec 1, 2020
Merged

Conversation

mikeandmore
Copy link
Contributor

Make all headers self-contained so that we can use many clang-based tools to analyze the code.

Make all headers self-contained so that we can use many clang-based
tools to analyze the code.
@ThomasAdam
Copy link
Member

Hi @mikeandmore,

Looks good. As mentioned on IRC, worth considering the include guards using a FVWM_ prefix.

I'm still suggesting we should handle inclusion of X11/Xlib header files better. They're all over the place with this change at the moment.

I would also recommend you run something like include-what-you-use or deheader over your change. I use deheader like this:

make clean
deheader -m "make -j $(nproc) CFLAGS='-Werror -Wfatal-errors'"

@mikeandmore
Copy link
Contributor Author

let me try include-what-you-use. Now I can run clang based tools on the headers.

@mikeandmore
Copy link
Contributor Author

include-what-you-use suggests to add more X11 headers instead of removing them.

Do you think it's a good idea to add a common_x11.h in libs/?

@ThomasAdam
Copy link
Member

Hi @mikeandmore,

include-what-you-use suggests to add more X11 headers instead of removing them.

Do you think it's a good idea to add a common_x11.h in libs/?

Absolutely. This is what I was getting at on IRC -- we're including them sporadically throughout the code base right now, but it should be referenced via something like libs/fvwm_x11.h.

Cheers!

@ThomasAdam ThomasAdam merged commit 0bb15b2 into fvwmorg:master Dec 1, 2020
@mikeandmore mikeandmore deleted the code-cleanup-headers branch December 1, 2020 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants