Skip to content

Commit d359809

Browse files
committed
Properly exclude comments
1 parent 005d9f1 commit d359809

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/cc/engine/analyzers/go/main.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@ class Main < CC::Engine::Analyzers::Base
1818
].freeze
1919
POINTS_PER_OVERAGE = 40_000
2020
REQUEST_PATH = "/go"
21-
COMMENT_MATCHER = Sexp::Matcher.parse("(_ (comments ___) ___)")
22-
23-
def use_sexp_lines?
24-
false
25-
end
21+
COMMENT_MATCHER = Sexp::Matcher.parse("(CommentGroup ___)")
2622

2723
def transform_sexp(sexp)
2824
delete_comments!(sexp)
2925
end
3026

27+
def use_sexp_lines?
28+
false
29+
end
30+
3131
private
3232

3333
def process_file(file)

0 commit comments

Comments
 (0)