Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dummy Names for Functions and Links clashes nrLint Check #30

Open
ba47-development opened this issue May 19, 2022 · 3 comments
Open

Dummy Names for Functions and Links clashes nrLint Check #30

ba47-development opened this issue May 19, 2022 · 3 comments

Comments

@ba47-development
Copy link

Current Behavior

As discussed in https://discourse.nodered.org/t/node-red-3-0-0-beta-2-released/62698/28, so that this doesn't get missed. Also see node-red/node-red#3618.

nrLint rules 'no-unnamed-functions' and 'no-unnamed-links' do not work with NR 3.0 automatic node naming.

Even if nodes now get dummy names, these are still considered to be unnamed, because "function 1" is as meaningless as "function".

Expected Behavior

No response

Steps To Reproduce

No response

Example flow

No response

Environment

No response

@knolleary
Copy link
Member

knolleary commented May 19, 2022

nrLint rules 'no-unnamed-functions' and 'no-unnamed-links' do not work with NR 3.0 automatic node naming.

Yes it does - it identifies the nodes that have a blank name which is all they say they do.

Even if nodes now get dummy names, these are still considered to be unnamed, because "function 1" is as meaningless as "function".

To be clear - as I said on the forum - having a name of function 1 is not as meaningless as having a blank name (which then shows as function in the workspace). If you have 10 function nodes, all with blank names, then you have 10 nodes you cannot quickly distinguish. That is markedly different to having function 1, function 2 etc - where you can at least quickly distinguish them when looking in the logs etc.

I fully agree it would be better for the user to set meaningful names - but the purpose of the generated default name is to help those users who don't rename things.

The resolution for this issue will be either:

  • add a 'no-default-named-functions/links` rules that specifically looks for nodes with the generate names
  • add an option to the existing rules to also consider the generated names

@ba47-development
Copy link
Author

ba47-development commented May 19, 2022

I fully agree it would be better for the user to set meaningful names - but the purpose of the generated default name is to help those users who don't rename things.

Thank you. :-)

The resolution for this issue will be either:
* add a 'no-default-named-functions/links` rules that specifically looks for nodes with the generate names
* add an option to the existing rules to also consider the generated names

I personally don't mind as long as we get that function.

@ba47-development
Copy link
Author

Apart from that. :-) Any idea when the new version of nrLint will be published?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants