Coding standard/style for Ignition script

Hi,
Like to know if there is literature for the coding standard/style of the ignition script language.

For JAVA, there is coding style like (for example) geosoft.no/development/javastyle.html
Also there is static tools for JAVA codes like (for example) en.wikipedia.org/wiki/PMD_(software

Thank you

Ignition uses jython, which is an implementation of python. Unlike most popular languages, python identifies control structures (if, for, while, …) by indentation. So style is constrained by the rules of the language. This was very much intended by the inventor of the language.
For all practical purposes there is no style guide, because it’s not needed.

There is a style guide, but by writing code that has valid syntax you’re mostly forced to follow it: python.org/dev/peps/pep-0008/

[quote=“Kevin.Herron”]There is a style guide[/quote]Interesting. I never noticed that PEP, even though I’ve browsed them before. Based on a quick skim, I’m a baaaaad boy.

1 Like

Hi Thomas,

I created a programming style guide for Ignition projects. You are free to use it. See it at this link: perfectabstractions.com/perf … guide.html

Also, I am happy to receive any comments or suggestions about it.

Best,

1 Like

Thank you all for all the valuable feedback and references.

Sorry to bump the old thread but the topic is still relevant and good reference info seems hard to come by. I've been looking for best/common practice info on naming and folder structure for perspective views, among other things, in order to communicate/implement some simple standard practices for our dev team.

Here is another "style guide" I came across while looking for similar data. It is not mine but freely available on GitHub. I'm not clear on how to apply the "Linting" info in an Ignition environment (due to lack of familiarity) but all the other info seems relevant.

@kgamble I believe this is your content.

1 Like