Skip to content

LOC: don’t apply .gitignore rules by default#42

Open
oasaleh wants to merge 1 commit intojolav:masterfrom
oasaleh:fix/loc-disable-gitignore
Open

LOC: don’t apply .gitignore rules by default#42
oasaleh wants to merge 1 commit intojolav:masterfrom
oasaleh:fix/loc-disable-gitignore

Conversation

@oasaleh
Copy link
Copy Markdown

@oasaleh oasaleh commented Jan 24, 2026

Codetabs' LOC feature uses scc under the hood. By default, scc respects .gitignore rules.

Some repos (Homebrew is a good example) have a .gitignore that effectively does:

# ignore everything (e.g. /*)
# then selectively "un-ignore" only a few files/paths (README.md, Dockerfile, etc.)

That pattern is fine for Git workflows, but for a LOC scanner that applies .gitignore broadly, it can mean most of the repo gets skipped, so the reported LOC becomes way too low.

Fix idea (high level)

Run scc with .gitignore disabled (e.g. scc --no-gitignore ...) so LOC reflects what's actually in the repo.

image

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

Successfully merging this pull request may close these issues.

1 participant