If I do not want to count open and closing curly brackets such as "{" and "}" in C and C++ source file, can I tell cloc to do that by modifying the lang filter definition? Does cloc (v1.60) support this feature? Thank you.
Discussion
Anonymous
-
2014-03-25
I mean I do not want to count the line that contains only open and closing curly brackets such as "{" and "}" in C and C++ source file
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes, that's possible. Include this line in your custom language definition file for C:
filter remove_matches ^\s*[{}]\s*$
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
Anonymous
-
2014-03-26
Could you please explain for this filter: filter remove_matches ? What does it mean for ^\s, [{}], \s$?
Can I add several filter remove_matches for a specific language such as:
filter remove_matches ^\s//
filter remove_matches ^\s{\s//
filter remove_matches ^\s[{}]\s*$
What does it mean for filter remove_inline //.*$?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I mean I do not want to count the line that contains only open and closing curly brackets such as "{" and "}" in C and C++ source file
Yes, that's possible. Include this line in your custom language definition file for C:
filter remove_matches ^\s//
filter remove_matches ^\s{\s//
filter remove_matches ^\s[{}]\s*$