This repository was archived by the owner on Jul 19, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 6 files changed +8
-7
lines changed Expand file tree Collapse file tree 6 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -93,6 +93,7 @@ def fingerprint
9393 def description
9494 description = "#{ check_name } found in #{ occurrences } other location"
9595 description += "s" if occurrences > 1
96+ description += " (mass = #{ mass } )"
9697 description
9798 end
9899
Original file line number Diff line number Diff line change 2222
2323 expect ( json [ "type" ] ) . to eq ( "issue" )
2424 expect ( json [ "check_name" ] ) . to eq ( "Identical code" )
25- expect ( json [ "description" ] ) . to eq ( "Identical code found in 2 other locations" )
25+ expect ( json [ "description" ] ) . to eq ( "Identical code found in 2 other locations (mass = 11) " )
2626 expect ( json [ "categories" ] ) . to eq ( [ "Duplication" ] )
2727 expect ( json [ "location" ] ) . to eq ( {
2828 "path" => "foo.js" ,
5050
5151 expect ( json [ "type" ] ) . to eq ( "issue" )
5252 expect ( json [ "check_name" ] ) . to eq ( "Similar code" )
53- expect ( json [ "description" ] ) . to eq ( "Similar code found in 2 other locations" )
53+ expect ( json [ "description" ] ) . to eq ( "Similar code found in 2 other locations (mass = 11) " )
5454 expect ( json [ "categories" ] ) . to eq ( [ "Duplication" ] )
5555 expect ( json [ "location" ] ) . to eq ( {
5656 "path" => "foo.js" ,
Original file line number Diff line number Diff line change 3535
3636 expect ( json [ "type" ] ) . to eq ( "issue" )
3737 expect ( json [ "check_name" ] ) . to eq ( "Identical code" )
38- expect ( json [ "description" ] ) . to eq ( "Identical code found in 1 other location" )
38+ expect ( json [ "description" ] ) . to eq ( "Identical code found in 1 other location (mass = 11) " )
3939 expect ( json [ "categories" ] ) . to eq ( [ "Duplication" ] )
4040 expect ( json [ "location" ] ) . to eq ( {
4141 "path" => "foo.php" ,
Original file line number Diff line number Diff line change 2222
2323 expect ( json [ "type" ] ) . to eq ( "issue" )
2424 expect ( json [ "check_name" ] ) . to eq ( "Identical code" )
25- expect ( json [ "description" ] ) . to eq ( "Identical code found in 2 other locations" )
25+ expect ( json [ "description" ] ) . to eq ( "Identical code found in 2 other locations (mass = 6) " )
2626 expect ( json [ "categories" ] ) . to eq ( [ "Duplication" ] )
2727 expect ( json [ "location" ] ) . to eq ( {
2828 "path" => "foo.py" ,
5050
5151 expect ( json [ "type" ] ) . to eq ( "issue" )
5252 expect ( json [ "check_name" ] ) . to eq ( "Similar code" )
53- expect ( json [ "description" ] ) . to eq ( "Similar code found in 2 other locations" )
53+ expect ( json [ "description" ] ) . to eq ( "Similar code found in 2 other locations (mass = 6) " )
5454 expect ( json [ "categories" ] ) . to eq ( [ "Duplication" ] )
5555 expect ( json [ "location" ] ) . to eq ( {
5656 "path" => "foo.py" ,
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ module CC::Engine::Analyzers
3434
3535 expect ( json [ "type" ] ) . to eq ( "issue" )
3636 expect ( json [ "check_name" ] ) . to eq ( "Similar code" )
37- expect ( json [ "description" ] ) . to eq ( "Similar code found in 1 other location" )
37+ expect ( json [ "description" ] ) . to eq ( "Similar code found in 1 other location (mass = 18) " )
3838 expect ( json [ "categories" ] ) . to eq ( [ "Duplication" ] )
3939 expect ( json [ "location" ] ) . to eq ( {
4040 "path" => "foo.rb" ,
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ module CC::Engine::Analyzers
3535
3636 expect ( first_formatted [ :type ] ) . to eq ( "issue" )
3737 expect ( first_formatted [ :check_name ] ) . to eq ( "Identical code" )
38- expect ( first_formatted [ :description ] ) . to eq ( "Identical code found in 2 other locations" )
38+ expect ( first_formatted [ :description ] ) . to eq ( "Identical code found in 2 other locations (mass = 18) " )
3939 expect ( first_formatted [ :categories ] ) . to eq ( [ "Duplication" ] )
4040 expect ( first_formatted [ :remediation_points ] ) . to eq ( 30 )
4141 expect ( first_formatted [ :location ] ) . to eq ( { :path => "file.rb" , :lines => { :begin => 1 , :end => 5 } } )
You can’t perform that action at this time.
0 commit comments