[C++ Compiler Warning Feature Request] Throw a warning if a Blueprint Library function is not marked as static ♥

Dear Epic,

When I am adding functions to my C++ Blueprint Libraries (such as my Victory Plugin)

I frequently forget to mark it as static.

UFUNCTION(BlueprintCallable,Category="Brain Codes Library")
void BCEditorHighlighting_HighlightReceivers();

~ Load the editor

~ Can’t find it, and realize omg, I forgot to mark it as static

~ Close editor, recompile

UFUNCTION(BlueprintCallable,Category="Brain Codes Library")
static void BCEditorHighlighting_HighlightReceivers();

While this is entirely my fault it, it does necessitate a complete .h recompile and shutdown/reload cycle of the editor which is a rather long cycle because my C++ code base has grown quite large.

It would be lovely if you could consider throwing a compile warning if a UFUNCTION that is in a UBlueprintFunctionLibrary is not marked as static, given that it is part of the class comment itself:

// This class is a base class for any function libraries exposed to blueprints.
// Methods in subclasses are expected to be static, and no methods should be added to this base class.
UCLASS(Abstract, MinimalAPI)
class UBlueprintFunctionLibrary : public UObject

Again, this is entirely my own user error, but I am trying to help you make UE4 C++ ever more awesome and this little feature would really help me out personally

Thank youuuuu

#:heart:

would it be possible for the UHT to automatically insert the missing Static keywords when parsing static function libraries?

I don’t think UHT should interfere in code, you should be able to do what compiler let you do, warning would be satisfactory.

I’m with on this one. Coders need to be responsible for their code. Still a warning would be nice +1.