Rules
iglint has 110 rules in 10 categories. 88 run by default; enable the others with select or extend-select (configuration). 13 can fix findings: always or sometimes means iglint check --fix can repair a finding of the rule, and fixes that are not proven safe also need --unsafe-fixes (see safe and unsafe fixes).
Selectors accept the code (SCR101), the name (undefined-name), a code prefix (SCR1), a category (SCR) or ALL.
View structure (VIEW)
Section titled “View structure (VIEW)”| Code | Name | Severity | Default | Fix | Summary |
|---|---|---|---|---|---|
| VIEW001 | invalid-json |
error | on | no | Resource JSON does not parse |
| VIEW002 | duplicate-component-name |
error | on | no | Sibling components share a name |
| VIEW003 | unknown-component-type |
warning | on | no | Component type is not a registered Perspective component |
| VIEW004 | unknown-component-prop |
warning | off | no | Top-level props key is not in the component's schema |
| VIEW005 | invalid-position-key |
warning | on | no | position key not valid for the parent container |
| VIEW006 | excessive-context-data |
warning | on | no | Oversized data stored in view-level custom properties |
| VIEW007 | invalid-utf8 |
error | on | no | File is not valid UTF-8 |
| VIEW008 | empty-script |
error | on | no | Perspective script with an empty body |
| VIEW009 | disabled-change-script |
info | on | no | Property change script is disabled but has code |
| VIEW010 | unknown-action-type |
error | on | no | Event action type is not one Ignition knows |
| VIEW011 | duplicate-json-key |
error | on | no | JSON object has the same key twice |
| VIEW012 | property-access |
warning | off | sometimes | Custom property access mode differs from the project convention |
| VIEW013 | property-persistence |
warning | off | sometimes | Bound custom property persistence differs from the project convention |
| VIEW014 | param-without-direction |
warning | on | no | View parameter has no paramDirection |
| VIEW015 | unused-custom-property |
warning | on | sometimes | Custom property or view parameter is never read |
| VIEW017 | message-handler-never-receives |
warning | on | no | Message handler listens to no scope |
| VIEW018 | fragile-component-reference |
warning | off | no | Script or binding navigates the component tree |
| VIEW019 | output-param-never-written |
info | off | no | Output parameter is never written |
| VIEW020 | dom-and-action-click |
warning | on | no | Button has both dom.onClick and component.onActionPerformed actions |
| VIEW021 | invalid-view-structure |
error | on | no | A part of a view or of the session properties has the wrong JSON type |
Naming (NAME)
Section titled “Naming (NAME)”| Code | Name | Severity | Default | Fix | Summary |
|---|---|---|---|---|---|
| NAME001 | name-pattern |
warning | off | sometimes | Name does not follow the configured naming convention |
| NAME002 | method-shadows-component-api |
error | on | no | Custom method has the name of a built-in component member |
Bindings and expressions (BIND)
Section titled “Bindings and expressions (BIND)”| Code | Name | Severity | Default | Fix | Summary |
|---|---|---|---|---|---|
| BIND001 | expression-syntax-error |
error | on | no | Expression does not parse |
| BIND002 | unknown-expression-function |
error | on | no | Function not registered on the gateway |
| BIND003 | expression-function-arity |
error | on | no | Wrong number of arguments for an expression function |
| BIND004 | polling-interval |
warning | on | no | Expression polls faster than the minimum interval |
| BIND005 | unresolved-property-reference |
error | on | no | Property reference does not resolve in the view |
| BIND006 | indirect-tag-reference-mismatch |
error | on | no | Indirect tag binding placeholders and references differ |
| BIND007 | placeholder-in-direct-tag-path |
warning | on | no | Direct tag binding path contains {...} |
| BIND008 | disabled-binding |
info | on | no | Binding disabled with enabled: false |
| BIND009 | transform-without-return |
error | on | no | Script transform can finish without return |
| BIND010 | map-transform-duplicate-input |
warning | on | no | Map transform maps the same input twice |
| BIND011 | expression-type-mismatch |
warning | off | no | Obvious literal type errors in expressions |
Scripts (SCR)
Section titled “Scripts (SCR)”| Code | Name | Severity | Default | Fix | Summary |
|---|---|---|---|---|---|
| SCR001 | syntax-error |
error | on | no | Script does not parse with Jython 2.7 |
| SCR002 | compile-error |
error | on | no | Script parses but Jython refuses to compile it |
| SCR003 | compile-warning |
warning | on | no | Jython compiles the script with a SyntaxWarning |
| SCR101 | undefined-name |
error | on | no | Name is not defined anywhere the script can see |
| SCR102 | unused-import |
warning | on | sometimes | Imported name is never used |
| SCR103 | unused-variable |
warning | on | sometimes | Local variable is assigned but never read |
| SCR104 | redefined-unused |
warning | on | no | Function, class or import redefined before it is used |
| SCR105 | unreachable-code |
warning | on | no | Statement can never run |
| SCR106 | bare-except |
warning | on | no | except: without an exception type |
| SCR107 | mutable-default-argument |
warning | on | no | Mutable value as a parameter default |
| SCR108 | duplicate-dict-key |
warning | on | no | Dict literal has the same constant key twice |
| SCR109 | self-assignment |
warning | on | no | Variable assigned to itself |
| SCR110 | comparison-with-literal-identity |
warning | on | sometimes | is / is not with a string or number literal |
| SCR111 | assert-on-tuple |
warning | on | no | assert on a non-empty tuple is always true |
| SCR112 | format-string-mismatch |
error | on | no | String formatting that fails at run time |
| SCR113 | except-order |
warning | on | no | Exception class caught after a broader one |
| SCR114 | pointless-statement |
warning | on | no | Expression statement with no effect |
| SCR115 | except-tuple-without-parentheses |
error | on | always | except A, B: binds B instead of catching it |
| SCR116 | raise-string |
error | on | no | raise with a string |
| SCR117 | redefined-builtin |
info | off | no | Name shadows a builtin or Ignition's system |
| SCR118 | used-before-assignment |
error | on | no | Variable is read where no assignment can have happened |
| SCR119 | return-in-finally |
warning | on | no | return or break in a finally clause |
| SCR120 | dangerous-loop-closure |
warning | off | no | Function defined in a loop uses the loop's variable |
| SCR121 | global-at-module-level |
info | on | no | global statement at module level |
| SCR122 | print-statement |
info | off | no | print in a script that runs on the gateway |
| SCR123 | unused-suppression |
info | on | always | # iglint: ignore[...] that suppresses nothing |
| SCR124 | trailing-whitespace |
info | off | always | Spaces or tabs at the end of a script line |
| SCR201 | unknown-system-function |
error | on | no | system.* member that does not exist in Ignition 8.3 |
| SCR202 | system-function-arity |
error | on | no | system.* call with arguments that match no signature |
| SCR203 | unknown-system-keyword |
error | on | no | Keyword argument a system.* function does not accept |
| SCR204 | deprecated-system-function |
warning | on | no | Deprecated system.* function |
| SCR205 | wrong-scope-system-function |
error | on | no | system.* function not available where the script runs |
| SCR206 | legacy-script-prefix |
error | on | sometimes | project., shared. or app. prefix that does not exist in 8.3 |
| SCR301 | invalid-event-script-header |
error | on | sometimes | Event script file whose first line is not the canonical header |
| SCR302 | sleep-in-event-script |
warning | on | no | time.sleep or Thread.sleep in a Perspective event script |
| SCR303 | module-level-side-effect |
warning | on | no | Library module calls system.* or does I/O when it is imported |
| SCR304 | shadowed-library-package |
error | on | no | Library module with its own code.py hides its child modules |
| SCR305 | unresolved-component-reference |
error | on | no | getSibling/getChild with a literal name that matches no component |
| SCR306 | message-handler-payload-misuse |
warning | off | no | Message handler reads a payload key that no sender sends |
| SCR307 | redefined-event-handler |
error | on | no | Event script file that rebinds its handler to something Ignition cannot call |
| SCR900 | pylint |
warning | off | sometimes | Message reported by pylint |
References (REF)
Section titled “References (REF)”| Code | Name | Severity | Default | Fix | Summary |
|---|---|---|---|---|---|
| REF001 | unknown-view |
error | on | no | Referenced view does not exist |
| REF002 | unknown-library-member |
error | on | no | Library module or function does not exist |
| REF003 | library-function-arity |
error | on | no | Call to a library function with arguments it cannot accept |
| REF004 | unknown-named-query |
error | on | no | Named query does not exist |
| REF005 | named-query-parameter-mismatch |
error | on | no | Named query parameters passed do not match the named query |
| REF006 | unknown-message-type |
warning | on | no | Message sent to a type no handler listens for |
| REF007 | popup-param-mismatch |
warning | on | no | Parameter passed to a view that the view does not declare |
| REF008 | unknown-page-url |
warning | on | no | Navigation to a page URL that the page configuration does not define |
| REF009 | resource-manifest-mismatch |
warning | on | no | resource.json and the files of the resource disagree, or it is missing |
| REF010 | unknown-parent-project |
error | on | no | parent names a project that does not exist or is not inheritable |
| REF011 | unused-view |
info | off | no | View is not referenced anywhere |
| REF012 | unused-library-function |
info | off | no | Library function is never referenced |
| REF013 | unused-named-query |
info | off | no | Named query is not referenced anywhere |
| REF014 | unhandled-message-handler |
info | off | no | Message handler whose type nothing sends |
Performance (PERF)
Section titled “Performance (PERF)”| Code | Name | Severity | Default | Fix | Summary |
|---|---|---|---|---|---|
| PERF001 | deep-component-nesting |
info | on | no | Components nested deeper than max-depth |
| PERF002 | fast-query-polling |
warning | on | no | Query, tag history or HTTP binding polls faster than minimum-interval |
| PERF003 | hidden-component-bindings |
info | off | no | Component with meta.visible: false has bindings |
| PERF004 | large-view |
info | off | no | View has more than max-components components |
Security (SEC)
Section titled “Security (SEC)”| Code | Name | Severity | Default | Fix | Summary |
|---|---|---|---|---|---|
| SEC001 | sql-string-building |
warning | on | no | SQL text built from values at run time |
| SEC002 | hardcoded-credential |
warning | on | no | Password, token or key written in a script or HTTP binding |
| SEC003 | eval-exec |
warning | on | no | eval, exec, execfile or compile on code built at run time |
| SEC004 | insecure-url |
info | on | no | Plain http:// URL in an HTTP binding or system.net call |
| SEC005 | querystring-parameter |
warning | on | no | Named query parameter of type QueryString |
| SEC006 | os-command |
warning | on | no | Script starts an operating system process |
Accessibility (A11Y)
Section titled “Accessibility (A11Y)”| Code | Name | Severity | Default | Fix | Summary |
|---|---|---|---|---|---|
| A11Y001 | image-without-alt |
warning | on | no | Image component without alternative text |
| A11Y002 | icon-button-without-text |
warning | off | no | Clickable button or icon without text or tooltip |
Styles (STYLE)
Section titled “Styles (STYLE)”| Code | Name | Severity | Default | Fix | Summary |
|---|---|---|---|---|---|
| STYLE001 | unknown-style-class |
warning | on | no | Style class does not exist |
| STYLE002 | unused-style-class |
info | off | no | Style class is never referenced |
| STYLE003 | empty-style-class |
info | on | no | Style class defines no styles |
Tags and gateway (TAG)
Section titled “Tags and gateway (TAG)”| Code | Name | Severity | Default | Fix | Summary |
|---|---|---|---|---|---|
| TAG001 | unknown-udt-type |
error | on | no | typeId does not name a UDT definition, or UDT inheritance is cyclic |
| TAG002 | undefined-udt-parameter |
error | on | no | {Param} in a UDT member names no parameter at all |
| TAG003 | unknown-tag-path |
error | off | no | Tag path to a tag that does not exist |
| TAG004 | unknown-history-provider |
warning | on | no | historyProvider is not configured on the gateway |
| TAG005 | invalid-alarm-bind-type |
error | on | no | Alarm property bound with a bind type alarms do not accept |
| TAG006 | tag-change-script-paths |
error | on | no | Tag change script without tag paths or with an invalid tag path |
| TAG007 | invalid-cron-expression |
error | on | no | Scheduled script with an invalid cron expression |
Generated from the rule metadata by iglint generate-docs. Source: docs/rules/README.md.