ChillerDragon / teeworlds_network

A teeworlds 0.7 network protocol library written in ruby
5 stars 0 forks source link

Check parameters in bad_code.sh #7

Closed ChillerDragon closed 7 months ago

ChillerDragon commented 1 year ago

Chunk.create_header has a few required keys make sure when its called those are provided. There are probably other methods too where the arguments could be checked.

This is basically implementing typed ruby using a external shell script which is a super weird and probably bad idea. But whatever. It does help detecting runtime errors without running it.

ChillerDragon commented 7 months ago

The create_header() seems to work fine already. I tried making the code more reusable to add other methods it became really messy. Also I do not see any other methods that need it. Closing this as completed now. If there is more need for argument checking do that via sorbet see https://github.com/ChillerDragon/teeworlds_network/issues/18