diff --git a/Dockerfile b/Dockerfile index efcd4b26..6fa47c2f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM codeclimate/codeclimate-parser:b850 +FROM codeclimate/codeclimate-parser:b859 LABEL maintainer="Code Climate " # Reset from base image diff --git a/lib/cc/engine/analyzers/php/main.rb b/lib/cc/engine/analyzers/php/main.rb index d86924ca..7094d055 100644 --- a/lib/cc/engine/analyzers/php/main.rb +++ b/lib/cc/engine/analyzers/php/main.rb @@ -11,12 +11,12 @@ class Main < CC::Engine::Analyzers::Base PATTERNS = [ "**/*.php", ].freeze - DEFAULT_MASS_THRESHOLD = 75 + DEFAULT_MASS_THRESHOLD = 90 DEFAULT_FILTERS = [ "(Stmt_Use ___)", "(comments ___)", ].freeze - POINTS_PER_OVERAGE = 35_000 + POINTS_PER_OVERAGE = 29_000 REQUEST_PATH = "/php" def use_sexp_lines? diff --git a/spec/cc/engine/analyzers/php/main_spec.rb b/spec/cc/engine/analyzers/php/main_spec.rb index 45a87f84..2056aeeb 100644 --- a/spec/cc/engine/analyzers/php/main_spec.rb +++ b/spec/cc/engine/analyzers/php/main_spec.rb @@ -40,12 +40,12 @@ "path" => "foo.php", "lines" => { "begin" => 2, "end" => 8 }, }) - expect(json["remediation_points"]).to eq(965_000) + expect(json["remediation_points"]).to eq(967000) expect(json["other_locations"]).to eq([ {"path" => "foo.php", "lines" => { "begin" => 10, "end" => 16} }, ]) - expect(json["content"]["body"]).to match(/This issue has a mass of 24/) - expect(json["fingerprint"]).to eq("367e371730140daeda61ab577c617236") + expect(json["content"]["body"]).to match(/This issue has a mass of 28/) + expect(json["fingerprint"]).to eq("b41447552cff977d3d98dff4cd282ec2") expect(json["severity"]).to eq(CC::Engine::Analyzers::Base::MAJOR) end @@ -82,12 +82,12 @@ "path" => "foo.php", "lines" => { "begin" => 2, "end" => 8 }, }) - expect(json["remediation_points"]).to eq(965_000) + expect(json["remediation_points"]).to eq(967000) expect(json["other_locations"]).to eq([ {"path" => "foo.php", "lines" => { "begin" => 10, "end" => 16} }, ]) - expect(json["content"]["body"]).to match(/This issue has a mass of 24/) - expect(json["fingerprint"]).to eq("8fe741c1e4cccc7226bbf6f0244fc49d") + expect(json["content"]["body"]).to match(/This issue has a mass of 28/) + expect(json["fingerprint"]).to eq("c4c0b456f59f109d0a5cfce7d4807935") end it "runs against complex files" do @@ -238,7 +238,7 @@ "path" => "foo.php", "lines" => { "begin" => 8, "end" => 14 }, ) - expect(issue["content"]["body"]).to match(/This issue has a mass of 24/) + expect(issue["content"]["body"]).to match(/This issue has a mass of 28/) end it "ignores one-line comments" do @@ -272,7 +272,7 @@ "path" => "foo.php", "lines" => { "begin" => 4, "end" => 10 }, ) - expect(issue["content"]["body"]).to match(/This issue has a mass of 24/) + expect(issue["content"]["body"]).to match(/This issue has a mass of 28/) end end end