Skip to content

Adjust DEFAULT_MASS_THRESHOLD and POINTS_PER_OVERAGE #301

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 20, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/cc/engine/analyzers/go/main.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ module Go
class Main < CC::Engine::Analyzers::Base
LANGUAGE = "go"
PATTERNS = ["**/*.go"].freeze
DEFAULT_MASS_THRESHOLD = 30
DEFAULT_MASS_THRESHOLD = 100
DEFAULT_FILTERS = [
"(ImportSpec ___)",
].freeze
POINTS_PER_OVERAGE = 40_000
POINTS_PER_OVERAGE = 10_000
REQUEST_PATH = "/go"
COMMENT_MATCHER = Sexp::Matcher.parse("(_ (comments ___) ___)")

Expand Down
4 changes: 2 additions & 2 deletions spec/cc/engine/analyzers/go/main_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ module CC::Engine::Analyzers
"path" => "foo.go",
"lines" => { "begin" => 6, "end" => 6 },
})
expect(json["remediation_points"]).to eq(540_000)
expect(json["remediation_points"]).to eq(360_000)
expect(json["other_locations"]).to eq([
{"path" => "foo.go", "lines" => { "begin" => 7, "end" => 7} },
])
Expand Down Expand Up @@ -82,7 +82,7 @@ module CC::Engine::Analyzers
"path" => "foo.go",
"lines" => { "begin" => 5, "end" => 7 },
})
expect(json["remediation_points"]).to eq(1_260_000)
expect(json["remediation_points"]).to eq(540_000)
expect(json["other_locations"]).to eq([
{"path" => "foo.go", "lines" => { "begin" => 9, "end" => 11} },
{"path" => "foo.go", "lines" => { "begin" => 13, "end" => 15} },
Expand Down