Skip to content

Commit fabd839

Browse files
committed
Add 'delete_if' filters to transform_sexp
1 parent 9c4be1b commit fabd839

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,12 @@ class Main < CC::Engine::Analyzers::Base
1818
].freeze
1919
POINTS_PER_OVERAGE = 40_000
2020
REQUEST_PATH = "/go"
21-
COMMENT_MATCHER = Sexp::Matcher.parse("(CommentGroup ___)")
21+
COMMENT_MATCHER = Sexp::Matcher.parse("(_ (comments ___) ___)")
2222

2323
def transform_sexp(sexp)
2424
delete_comments!(sexp)
25+
sexp.delete_if { |node| node[0] == :name }
26+
sexp.delete_if { |node| node[0] == :unresolved }
2527
end
2628

2729
def use_sexp_lines?

0 commit comments

Comments
 (0)