take Save Actions' Autosave feature, put it into a new plugin and run the configured "Compile" or "Build" command for the current file (the configured build commands are different per filetype).
I still ask how does it know I have typed sensible code and am not half way through typing an identifier, or have typed `{` but not yet `}`?
I'm not sure if the configured build commands can be read via the plugin API, if not, such an API could be added.
https://www.geany.org/manual/reference/build_8h.html
one could ideally configure which of the available build commands is executed per filetype.
Thats a standard feature of the build commands system, open a C file `Build->Set Build Commands` and the first group of commands are C (or whatever the current filetype is) filetype specific, the user just needs to configure their "lint" command in the same place for each language. (remember its possible to add more command slots, so it doesn't have to use one of the default slots)