You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’d like for loc to take an option that allows counting of any arbitrary file extension(s). It could ignore blank lines without knowing the specific syntax.
Perhaps a few generic formats could be defined, such as "pound-commented" and "C-like". The former would recognize # this style of comment; the latter could ignore lines with only } end brackets (I’m not sure if LOC already does this for C, JS, etc) and would recognize /* this */ and // this style of comments.
Alternatively, extensions could be treated as other existing languages; I might alias .hdbs to .html.
From a purely utilitarian point of view, counting lines in unknown formats is still useful even if the comments can not be identified.
I’m personally curious to see .hdbs (handlebars) statistics, but this issue could resolve (or nearly resolve) many other specific requests: #113, #109, #100, #101, #102, and so on.
Example syntax might be:
loc my_folder/ --include-extensions=hdbs
loc --include-extensions=hdbs --parse-as=hdbs,html
loc --include-extensions=hdbs,pyw --parse-as=hdbs,html,pyw,py
loc --include-extensions=acme-config --parse-as=acme-config,pound-commented
The text was updated successfully, but these errors were encountered:
I’d like for
loc
to take an option that allows counting of any arbitrary file extension(s). It could ignore blank lines without knowing the specific syntax.Perhaps a few generic formats could be defined, such as "pound-commented" and "C-like". The former would recognize
# this style
of comment; the latter could ignore lines with only}
end brackets (I’m not sure if LOC already does this for C, JS, etc) and would recognize/* this */
and// this
style of comments.Alternatively, extensions could be treated as other existing languages; I might alias
.hdbs
to.html
.From a purely utilitarian point of view, counting lines in unknown formats is still useful even if the comments can not be identified.
I’m personally curious to see
.hdbs
(handlebars) statistics, but this issue could resolve (or nearly resolve) many other specific requests: #113, #109, #100, #101, #102, and so on.Example syntax might be:
The text was updated successfully, but these errors were encountered: