question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Restrict names with underscored numbers

See original GitHub issue

Rule request

Thesis

There are two possible ways how one can write “Star Wars Episode 2” in snake case: star_wars_episode2 and star_wars_episode_2.

The same goes for numbers in the middle of the name: come2_me vs come_2_me.

We need to enforce the first version and restrict the former.

Reasoning

This is done for consistency in naming.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
riyasyashcommented, Oct 5, 2018

@sobolevn Yes I am. 😃 What about come_2me. is this allowed ?

1reaction
sobolevncommented, Oct 5, 2018

@riyasyash

Yes for both of your questions 🙂 We can even use the same violation for variables and modules.

Are you willing to take this over?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Rules for what a name can and cannot contain | ITPro Today
The first character of a name cannot be a number. Remaining characters in the name can be letters, numbers, periods, and underscore characters....
Read more >
General naming rules - IBM
Restrictions. Do not begin names with a number or with the underscore character. Do not use SQL reserved words to name tables, views,...
Read more >
Username with only letters numbers and underscore
The length restriction for example can be edited like this: ... "Username can only contain letters, numbers, and underscores, and must be ...
Read more >
How do I restrict special character, underscore, space in name ...
I have a html form and I don't want to allow any special characters, underscore to the field.
Read more >
The ability to use numerical character names and underscores
The ability to use numerical character names and underscores - Suggestion Box - PokeMMO.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found