Skip to content

Commit

Permalink
Update xdry-php-plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoVie committed Oct 21, 2022
1 parent 6a66862 commit ae1b491
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 45 deletions.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,8 @@ ifndef version
endif
@echo "Building for all platforms (version ${version})"
chmod +x ./multiplatform_build.sh
./multiplatform_build.sh ${version}
./multiplatform_build.sh ${version}

.PHONY: test
test:
go test -v ./src...
84 changes: 42 additions & 42 deletions _testdata/expected_xdry_report.json
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@
"CloneType": 2,
"AggregatedClones": [
{
"Content": "$x = 1 ; print ( $x ) ;",
"Content": "$x = 1 ; print $x ;",
"Language": "php",
"Instances": [
{
Expand All @@ -218,44 +218,44 @@
]
},
{
"Content": "const x = 1 ; \n x . x ( x ) ; \n",
"Language": "javascript",
"Content": "$x = 1 ; $x = 1 ; print $x ;",
"Language": "php",
"Instances": [
{
"Path": "%PROJECT_PATH%/_testdata/javascript/bar.js",
"Language": "javascript",
"Index": 16
"Path": "%PROJECT_PATH%/_testdata/php/bar.php",
"Language": "php",
"Index": 0
},
{
"Path": "%PROJECT_PATH%/_testdata/javascript/bla.js",
"Language": "javascript",
"Path": "%PROJECT_PATH%/_testdata/php/bum.php",
"Language": "php",
"Index": 0
},
{
"Path": "%PROJECT_PATH%/_testdata/javascript/foo.js",
"Language": "javascript",
"Index": 16
"Path": "%PROJECT_PATH%/_testdata/php/foo.php",
"Language": "php",
"Index": 0
}
]
},
{
"Content": "$x = 1 ; $x = 1 ; print ( $x ) ;",
"Language": "php",
"Content": "const x = 1 ; \n x . x ( x ) ; \n",
"Language": "javascript",
"Instances": [
{
"Path": "%PROJECT_PATH%/_testdata/php/bar.php",
"Language": "php",
"Index": 0
"Path": "%PROJECT_PATH%/_testdata/javascript/bar.js",
"Language": "javascript",
"Index": 16
},
{
"Path": "%PROJECT_PATH%/_testdata/php/bum.php",
"Language": "php",
"Path": "%PROJECT_PATH%/_testdata/javascript/bla.js",
"Language": "javascript",
"Index": 0
},
{
"Path": "%PROJECT_PATH%/_testdata/php/foo.php",
"Language": "php",
"Index": 0
"Path": "%PROJECT_PATH%/_testdata/javascript/foo.js",
"Language": "javascript",
"Index": 16
}
]
},
Expand All @@ -281,7 +281,7 @@
"CloneType": 3,
"AggregatedClones": [
{
"Content": "$x = 1 ; print ( $x ) ;",
"Content": "$x = 1 ; print $x ;",
"Language": "php",
"Instances": [
{
Expand All @@ -307,44 +307,44 @@
]
},
{
"Content": "const x = 1 ; \n x . x ( x ) ; \n",
"Language": "javascript",
"Content": "$x = 1 ; $x = 1 ; print $x ;",
"Language": "php",
"Instances": [
{
"Path": "%PROJECT_PATH%/_testdata/javascript/bar.js",
"Language": "javascript",
"Index": 16
"Path": "%PROJECT_PATH%/_testdata/php/bar.php",
"Language": "php",
"Index": 0
},
{
"Path": "%PROJECT_PATH%/_testdata/javascript/bla.js",
"Language": "javascript",
"Path": "%PROJECT_PATH%/_testdata/php/bum.php",
"Language": "php",
"Index": 0
},
{
"Path": "%PROJECT_PATH%/_testdata/javascript/foo.js",
"Language": "javascript",
"Index": 16
"Path": "%PROJECT_PATH%/_testdata/php/foo.php",
"Language": "php",
"Index": 0
}
]
},
{
"Content": "$x = 1 ; $x = 1 ; print ( $x ) ;",
"Language": "php",
"Content": "const x = 1 ; \n x . x ( x ) ; \n",
"Language": "javascript",
"Instances": [
{
"Path": "%PROJECT_PATH%/_testdata/php/bar.php",
"Language": "php",
"Index": 0
"Path": "%PROJECT_PATH%/_testdata/javascript/bar.js",
"Language": "javascript",
"Index": 16
},
{
"Path": "%PROJECT_PATH%/_testdata/php/bum.php",
"Language": "php",
"Path": "%PROJECT_PATH%/_testdata/javascript/bla.js",
"Language": "javascript",
"Index": 0
},
{
"Path": "%PROJECT_PATH%/_testdata/php/foo.php",
"Language": "php",
"Index": 0
"Path": "%PROJECT_PATH%/_testdata/javascript/foo.js",
"Language": "javascript",
"Index": 16
}
]
},
Expand Down
4 changes: 2 additions & 2 deletions _testdata/xdry_2.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"--rm",
"-v",
"%FILEPATH%:/file.php",
"leovie/xdry-php-plugin:0.1.0",
"leovie/xdry-php-plugin:0.2.1",
"normalize:level-1",
"/file.php"
]
Expand All @@ -47,7 +47,7 @@
"--rm",
"-v",
"%FILEPATH%:/file.php",
"leovie/xdry-php-plugin:0.1.0",
"leovie/xdry-php-plugin:0.2.1",
"normalize:level-2",
"/file.php"
]
Expand Down

0 comments on commit ae1b491

Please sign in to comment.