Linting or other code-quality tools
JamesB Posts: 10
I'm new to NetLinx programming. I've been going through Harman's online courses, which have been very helpful. One of the early lessons links to the style guide, which lays out a number of conventions that seem well thought-out. Unfortunately, the code base I inherited doesn't seem to follow them.
Normally, if I inherit unruly code, I'd run it through a linter and/or "prettify" utility and resolve any flagged issues, then incorporate those tools into my automated development pipeline to ensure compliance in the future. I didn't see any kind of automatic formatting provided in Netlinx Studio, and I can't find anything online about a linter for this language. Do those tools exist somewhere? Is there a community effort to build/maintain them?
Welcome! Glad you are finding the online training series helpful. We spent a significant amount of time making those series and it is nice to know people find them useful.
As for utilities for formatting, I am not aware. Some programmers user other IDE for development, but I am not familiar with formatting tools that work with Netlinx.
Thanks for your reply, Chris. I still have a ways to go with the course, so I'll probably be back with more questions at some point.
For formatting, I did find https://github.com/sentry07/vscode-amx-netlinx which is a plugin for the IDE I use for other projects (VSCode). The good news is that it adds support for some basic language features and hotkeys to integrate with the Netlinx compiler CLI, and apparently whatever language support is present is enough for Code's auto-format to sort of work. The bad news is it hasn't really been updated in a couple of years. It at least cleans up indentation and a few other things, but I was hoping to be able to have it enforce style guide stuff like flagging variables names without Hungarian notation, spacing for conditionals/loops, semicolons at the end of each line, etc.