NRLint Overlapping nodes issues via Cli, but not in GUI


I'm using NRLint as linting tool for our Node-RED project. I found some weird behaviour regarding the no-overlapping-nodes rule and I'm curious if anyone else has the same issue.

We solved all the linting issues and according to the GUI we are clean:
If I run the linter using the terminal on the same flow file I got 42 overlapping nodes (npx nrlint flows.json):

None of the 42 nodes are actually overlapping in the editor. Does the CLI handle this rule differently? I would like to use the CLI as an automated check before deployment, but now It tells me that there are nodes overlapping (which is not true).

Node-RED version: 3.0.2
NRLint version: 1.1.0

Any ideas?

In general, the rules should evaluate the same in the CLI or browser. But this particular rule does have a bit of an edge case that can trip up the CLI.

The flow file doesn't include information about the size of the node. In the editor, the size of the node is known because the editor calculates it based on the label that is generated for the node.
In the CLI, we don't have the full node definition (its .html) available in order to know what the label is - so the CLI version has to use a default value for the width/height.

However, the normally means the CLI fails to flag an overlap because it doesn't know a node's label is particularly big, or that it has lots of outputs so is particularly tall.

Can you share a screenshot that shows the nodes the CLI is flagging up here? I'd be interested to see what they look like so we can better understand what might be happening.

Hi Knolleary,

Thanks for your reply. Based on your information my guess is that NRLint assumes the nodes are overlapping because they are assumed to be wider than they are in the editor. I chose some random examples from the list:

The selected nodes are listed as overlapping by NRLint.

edit: my assumption doesn't seem to be correct. I moved one of the 'overlapping nodes' in such a way that it cannot possibly overlap any other nodes:

I checked if my flows.json had changed and ran the NRLint again: exactly the same result :person_shrugging:

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.