flosse / flosse/sloc

Option to discard symlinks

Open
#114 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
CoffeeScript
Stars
972
Forks
80
PR merge metrics
No merged PRs in 30d

Description

I am using lerna to automatically create virtual subpackages using symbolic links. sloc is unwrapping the symbolic links to the relative path (and recursively walking through the tree which will probably turn my machine into a great heater if I let it run). While it should be possible to work around this, I'm not sure if there is a one-size-fits-all workaround that would still allow for the simplicity of this tool to be preserved. Therefore, my recommendation would be for a command line flag that can treat all symlinks as nonexistant files/folders, for compatibility with lerna.

I don't know how I would implement this in coffee script, having never used it. But if someone else wants to volunteer to answer any stupid questions I have about it, I would be happy to work on this myself.

admin@Admins-MacBook-Pro ~/dev/project/foo $ sloc --exclude node_modules .

---------- Result ------------

Physical : 29310
Source : 20498
Comment : 5779
Single-line comment : 932
Block comment : 4847
Mixed : 90
Empty block comment : 53
Empty : 3176
To Do : 57

Number of files read : 358

----------------------------

admin@Admins-MacBook-Pro ~/dev/project/foo $ mv node_modules ../foo_node_modules
admin@Admins-MacBook-Pro ~/dev/project/foo $ sloc --exclude node_modules .

---------- Result ------------

Physical : 2583
Source : 1965
Comment : 330
Single-line comment : 51
Block comment : 279
Mixed : 4
Empty block comment : 1
Empty : 293
To Do : 0

Number of files read : 16

----------------------------

Contributor guide

No contributing guide indexed for this repository

Research direction

Locate the sloc CLI option handling and directory traversal, then reproduce the reported `sloc --exclude node_modules .` behavior with symbolic links. Done means a command-line option can treat symlinks as nonexistent files or folders without recursively following them.

Written by the indexing model from the issue text.

Assessment

Tech stack
coffeescript
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.