Add clang-tidy linting, callable with make lint.

This commit is contained in:
NunoSempere 2023-08-19 19:37:30 +02:00
parent aec21c71a6
commit 67b46c6420
3 changed files with 11 additions and 3 deletions

View File

@ -67,11 +67,16 @@ I just found out that you can inspect a GTK application with the GTK explorer if
### Known bugs/gotchas. ### Known bugs/gotchas.
- [x] ~~Doesn't work with when Spanish is selected as the language, for some reason~~ => Previously misdiagnosed. The real issue was that it freezes when interacting with [Espanso](https://espanso.org/) substitutions, which I had set-up automatically on my machine when using words containing an ñ, like my own name, Nuño. General:
- [ ] At some point, I tried to install libsoup-3 and borked some unknown installation option/paths. So now I need to run rose with `GIO_MODULE_DIR=/usr/lib/x86_64-linux-gnu/gio/modules/ /bin/rose` (or put `export GIO_MODULE_DIR=/usr/lib/x86_64-linux-gnu/gio/modules/` in my .bashrc). This won't affect new users though, just double checked on a fresh machine.
- [ ] By default the searchbar is pretty gigantic. I've made this so because I'm a bit myopic, but also work with my laptop in a laptop stand. Anyways, if you are a more normal person you can change this in the style.css. - [ ] By default the searchbar is pretty gigantic. I've made this so because I'm a bit myopic, but also work with my laptop in a laptop stand. Anyways, if you are a more normal person you can change this in the style.css.
- [ ] The style.css usage isn't updated until installation. This is because by default rose uses the theme located in /usr/share/themes/rose/style.css, and that file isn't updated until make install. - [ ] The style.css usage isn't updated until installation. This is because by default rose uses the theme located in /usr/share/themes/rose/style.css, and that file isn't updated until make install.
About my own system:
- [x] ~~Doesn't work with when Spanish is selected as the language, for some reason~~ => Previously misdiagnosed. The real issue was that it freezes when interacting with [Espanso](https://espanso.org/) substitutions, which I had set-up automatically on my machine when using words containing an ñ, like my own name, Nuño.
- [ ] At some point, I tried to install libsoup-3 and borked some unknown installation option/paths. So now I need to run rose with `GIO_MODULE_DIR=/usr/lib/x86_64-linux-gnu/gio/modules/ /bin/rose` (or put `export GIO_MODULE_DIR=/usr/lib/x86_64-linux-gnu/gio/modules/` in my .bashrc). This won't affect new users though, just double checked on a fresh machine.
### To do ### To do
#### Quality of life: #### Quality of life:

View File

@ -72,6 +72,9 @@ build: $(SRC) $(PLUGS) $(CONFIG)
GIO_MODULE_DIR=/usr/lib/x86_64-linux-gnu/gio/modules/ GIO_MODULE_DIR=/usr/lib/x86_64-linux-gnu/gio/modules/
$(CC) $(WARNINGS) $(OPTIMIZED) $(DEBUG) $(INCS) $(PLUGS) $(SRC) -o rose $(LIBS) $(ADBLOCK) $(CC) $(WARNINGS) $(OPTIMIZED) $(DEBUG) $(INCS) $(PLUGS) $(SRC) -o rose $(LIBS) $(ADBLOCK)
lint:
clang-tidy $(SRC) $(PLUGS) -- -Wall -O3 `pkg-config --cflags 'webkit2gtk-4.0'` -o rose `pkg-config --libs 'webkit2gtk-4.0'`
inspect: build inspect: build
GTK_DEBUG=interactive ./rose GTK_DEBUG=interactive ./rose

2
rose.c
View File

@ -488,7 +488,7 @@ void setup(GtkNotebook* notebook, int argc, char** argv)
int main(int argc, char** argv) int main(int argc, char** argv)
{ {
GtkNotebook* notebook; GtkNotebook* notebook = NULL;
gtk_init(NULL, NULL); gtk_init(NULL, NULL);
setup(notebook, argc, argv); setup(notebook, argc, argv);
gtk_main(); gtk_main();