Skip to content

claude-md-filename-case-sensitive

Filename differs only in case from another file, causing conflicts on case-insensitive filesystems

Error

Rule Details

On case-insensitive filesystems like macOS (HFS+/APFS) and Windows (NTFS), files named Rules.md and rules.md resolve to the same file. However, on Linux (ext4), they are distinct files. When a CLAUDE.md import tree contains paths that differ only in case, the project will behave differently depending on the operating system. This rule recursively walks the import tree and tracks all resolved paths in a case-insensitive map. If two imports resolve to paths that differ only in case, an error is reported.

Incorrect

Two imports that differ only in case

markdown
# CLAUDE.md

@import .claude/rules/Git-Workflow.md
@import .claude/rules/git-workflow.md

Correct

Imports with consistent, unique casing

markdown
# CLAUDE.md

@import .claude/rules/git-workflow.md
@import .claude/rules/code-style.md

How To Fix

Rename one of the conflicting files so the names are distinct even when compared case-insensitively. Use a consistent naming convention (e.g., all lowercase with hyphens) for all imported files.

Options

This rule does not have any configuration options.

When Not To Use It

Disable this rule only if your project exclusively targets Linux and you intentionally maintain files that differ only in case. This is rare and generally discouraged.

Resources

Version

Available since: v0.2.0