Hello, I am currently working on a couple of watchfaces, the last one I have created is My Day 24. And let's say, these tools for developers could be better :) Maybe I am too spoiled from C# and ReSharper plugin, but I wanted to have something better than the current Eclipse SDK.
Currently you can easily make a typo in a variable name, or copy paste some wrong code. The project still compiles and no errors are shown, but the app will crash on a real device in production. It is specially annoying if you have multiple files for each device (one file for Fenix 3, another for Vivoactive) and you change for example the number of parameters of a function, but just in one file. You will not see any crash on your device, but people will report you that it does not work.
So I have created a new tool, a desktop Windows app: http://bit.ly/codekeeper You can select your project folder with .mc files. You can leave this tool opened next to Eclipse, for example on a second monitor. And each time you save an .mc file, the tool will automatically refresh and show the warnings and errors. See screenshots attached.
What's implemented, errors:
- Variable is used, but it was not declared (or it is used before it was declared in the block)
- Function is called, but it was not declared in the same block (on in the global block)
- Function is called, but it has incorrect number of parameters
- Function is called on an instance of a class, but has incorrect number of parameters
Warnings:
- Variable was declared, but not used in the block
- Variable is declared more than once with the same name (for example in a global block and in the function)
- Function is declared more than once with the same number of parameters
- Variable was passed as a parameter of the function, but not used in the function
- Variable was initialized more than once by new keyword
Currently objects are not checked for null reference exception, it would require a better parser (with value propagation into functions and other blocks). I have also not tested yet the new 2.4.0 features like barells and jungle files. Also some weird constructs from the Monkey C language will most likely not work, but you can check it and see it. I have tested multiple Monkey C projects from Github, but there will always be some edge case where it will fail.
You can check the parsed tree (if the code was parsed correctly), or you can edit the list of system functions and variables that should be ignored. And if you are really interested, you will find a donate button on a Help / About screen :)
Download: http://bit.ly/codekeeper
Send me any feedback if you have. community.garmin.com/.../1296466.png community.garmin.com/.../1296467.png community.garmin.com/.../1296468.png community.garmin.com/.../1296469.png community.garmin.com/.../1296470.png