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.

Filenames with different UpperCamelCase are unsafe in case-insensitive filesystems

See original GitHub issue

Using upper-camel-case for filenames, or any sort of case that involves different letter casing, is dangerous when your team includes developers committing code from case insensitive filesystems (mostly people with windows and NTFS, and OSX and case insensitive HFS+).

It’s a problem specifically when a developer in a case insensitive filesystem renames a folder in a way that just changes the folder’s case, and pushes it. Because github (and probably all git hosts) run on linux, you’ll get an inconsistency there that you will not observe in an inconsistent file system.

For instance if you had Button/Button.jsx and Button/style.css, and you rename the button folder and file to button/button.jsx, in the remote git repository you would end up with two folders, button/button.jsx and Button/style.css. Nothing would be different in your local filesystem.

I understand if you strictly follow the conventions and never ever change a folder case you will be fine, but it’s easy to overlook if someone does it.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:4
  • Comments:11

github_iconTop GitHub Comments

9reactions
goatslackercommented, Dec 11, 2015

It’s a good thought but at Airbnb we follow PascalCaseNaming practices. You’re welcome to fork our guide though and add your own rules 😃

3reactions
madhurgarg71commented, Jun 1, 2018

I literally faced this issue. One of my file name was “LiveUnassignedOrdersListItem.js”. It was working on my local system (OSX), but when I tried to put the build on cloud server the build was failing. These are such bugs you can’t debug easily.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Case-insensitive filesystems considered harmful (to me)
When the project builds on my machine the non-standard, case-sensitive filesystem sees those as separate files and the failure does not occur.
Read more >
Adjust case sensitivity - WSL - Microsoft Learn
Learn how case sensitive file names are handled between Windows and Linux file systems, how to adjust these settings by directory with WSL, ......
Read more >
The Case For Case Insensitivity - Coding Horror
The de-facto default of all lowercase filenames in UNIX to avoid the constant specter of mismatches based on case. Another symptom of the...
Read more >
Git: How to change the case of filenames - Adam Johnson
Different filesystems have different case sensitivity, for example: The Linux filesystem ext4 is case sensitive, by default.
Read more >
What is the CamelCase naming convention? - TechTarget
CamelCase is a way to separate the words in a phrase by making the first ... Domain names cannot contain special characters and...
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