Skip to content
Open
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
10 changes: 6 additions & 4 deletions IPCheck/dashAnalysis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ echo ":"
# Check if the SRC_DIR directory does not exist
if [ ! -d "$SRC_DIR" ]
then
echo ": ERROR: Directory $SRC_DIR DOES NOT exists."
echo ": ERROR: Directory $SRC_DIR DOES NOT exists. Clone the repo first!"
exit
fi

Expand Down Expand Up @@ -101,7 +101,7 @@ if [ $KIND_OF = "Maven" ]; then

echo ": DASH Analysis > " $ANALYSIS_RESULT_FILE
echo ": DASH Analysis > " $ANALYSIS_RESULT_FILE >> $LOG_FILE
java -jar $DASH_LIB $GREP_RESULT_FILE -summary $ANALYSIS_RESULT_FILE >> $LOG_FILE
java -jar $DASH_LIB $GREP_RESULT_FILE -summary $ANALYSIS_RESULT_FILE -batch 500 >> $LOG_FILE
cp $SRC_DIR/pom.xml $DEST_DIR

elif [ $KIND_OF = "Nodes" ]; then
Expand All @@ -112,8 +112,9 @@ elif [ $KIND_OF = "Nodes" ]; then

echo ": DASH Analysis > " $ANALYSIS_RESULT_FILE
echo ": DASH Analysis > " $ANALYSIS_RESULT_FILE >> $LOG_FILE
java -jar $DASH_LIB $JSON_FILE -summary $ANALYSIS_RESULT_FILE >> $LOG_FILE
cp $SRC_DIR/package-lock.json $DEST_DIR
java -jar $DASH_LIB $JSON_FILE -summary $ANALYSIS_RESULT_FILE -batch 500 >> $LOG_FILE
cp $SRC_DIR/package.json $DEST_DIR
cp $SRC_DIR/yarn.lock $DEST_DIR
Comment thread
phkrief marked this conversation as resolved.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
cp $SRC_DIR/yarn.lock $DEST_DIR
cp $SRC_DIR/package-lock.json $DEST_DIR

I think this should be package-lock.json because a node project typically does not have a yarn.lock file.


elif [ $KIND_OF = "Yarn" ]; then
# Analyse Yarn project
Expand All @@ -125,6 +126,7 @@ elif [ $KIND_OF = "Yarn" ]; then
echo ": DASH Analysis > " $ANALYSIS_RESULT_FILE >> $LOG_FILE
# Reduce the size of the batch (from 1000 to 500) to avoid a time out with ClearlyDefined
java -jar $DASH_LIB $YARN_FILE -summary $ANALYSIS_RESULT_FILE -batch 500 >> $LOG_FILE
cp $SRC_DIR/package.json $DEST_DIR
cp $SRC_DIR/yarn.lock $DEST_DIR

else
Expand Down
70 changes: 42 additions & 28 deletions IPCheck/parseAll.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,38 +26,52 @@
if [[ $# < 2 ]]; then
echo "ERROR: Wrong number of arguments"
echo "Syntax: parseAll.sh <source> <destination>"
echo ' with: <source> = The Path to the folder where the git repos are cloned'
echo ' <destination> = The Path to the folder where the results of the analysis will be stored'
echo " with: <source> = The Path to the folder where the git repos are cloned"
echo " <destination> = The Path to the folder where the results of the analysis will be stored"
exit
fi

# Grab arguments
SRC_REPO=$1
DST_REPO=$2

./dashAnalysis.sh "Maven" "$SRC_REPO/smartclide-api-gateway" "$DST_REPO/smartclide-api-gateway"
./dashAnalysis.sh "Maven" "$SRC_REPO/smartclide-broker" "$DST_REPO/smartclide-broker"
./dashAnalysis.sh "Maven" "$SRC_REPO/smartclide-cicd" "$DST_REPO/smartclide-cicd"
./dashAnalysis.sh "Docker" "$SRC_REPO/smartclide-cicd-gitlab" "$DST_REPO/smartclide-cicd-gitlab"
./dashAnalysis.sh "Maven" "$SRC_REPO/smartclide-context" "$DST_REPO/smartclide-context"
./dashAnalysis.sh "Other" "$SRC_REPO/smartclide-deployment-extension" "$DST_REPO/smartclide-deployment-extension"
./dashAnalysis.sh "Docker" "$SRC_REPO/smartclide-deployment-service" "$DST_REPO/smartclide-deployment-service"
./dashAnalysis.sh "Yarn" "$SRC_REPO/smartclide-design-pattern-selection-theia" "$DST_REPO/smartclide-design-pattern-selection-theia"
./dashAnalysis.sh "Other" "$SRC_REPO/smartclide-docs" "$DST_REPO/smartclide-docs"
./dashAnalysis.sh "Nodes" "$SRC_REPO/smartclide-ide-front-end" "$DST_REPO/smartclide-ide-front-end"
./dashAnalysis.sh "Other" "$SRC_REPO/smartclide-ide-front-end-theme" "$DST_REPO/smartclide-ide-front-end-theme"
./dashAnalysis.sh "Docker" "$SRC_REPO/smartclide-jbpm" "$DST_REPO/smartclide-jbpm"
./dashAnalysis.sh "Nodes" "$SRC_REPO/smartclide-perftestgen-theia" "$DST_REPO/smartclide-perftestgen-theia"
./dashAnalysis.sh "Other" "$SRC_REPO/smartclide-RMV" "$DST_REPO/smartclide-RMV"#
./dashAnalysis.sh "Maven" "$SRC_REPO/smartclide-security/Theia-BackEnd" "$DST_REPO/smartclide-security"
./dashAnalysis.sh "Maven" "$SRC_REPO/smartclide-service-creation" "$DST_REPO/smartclide-service-creation"
./dashAnalysis.sh "Other" "$SRC_REPO/smartclide-Service-Creation-Testing" "$DST_REPO/smartclide-Service-Creation-Testing"
./dashAnalysis.sh "Yarn" "$SRC_REPO/smartclide-service-creation-theia" "$DST_REPO/smartclide-service-creation-theia"
./dashAnalysis.sh "Other" "$SRC_REPO/smartclide-service-discovery-poc" "$DST_REPO/smartclide-service-discovery-poc"
./dashAnalysis.sh "Maven" "$SRC_REPO/smartclide-service-registry-poc/demo" "$DST_REPO/smartclide-service-registry-poc"
./dashAnalysis.sh "Docker" "$SRC_REPO/smartclide-smart-assistant" "$DST_REPO/smartclide-smart-assistant"
./dashAnalysis.sh "Other" "$SRC_REPO/smartclide-task-service-discovery" "$DST_REPO/smartclide-task-service-discovery"
./dashAnalysis.sh "Maven" "$SRC_REPO/smartclide-TD-Interest" "$DST_REPO/smartclide-TD-Interest"
./dashAnalysis.sh "Maven" "$SRC_REPO/smartclide-TD-Principal" "$DST_REPO/smartclide-TD-Principal"
./dashAnalysis.sh "Maven" "$SRC_REPO/smartclide-TD-Reusability-Index" "$DST_REPO/smartclide-TD-Reusability-Index"
./dashAnalysis.sh "Yarn" "$SRC_REPO/smartclide-td-reusability-theia" "$DST_REPO/smartclide-td-reusability-theia"
./dashAnalysis.sh "Maven" "$SRC_REPO/kie-wb-common" "$DST_REPO/kie-wb-common"
./dashAnalysis.sh "Maven" "$SRC_REPO/kie-wb-distributions" "$DST_REPO/kie-wb-distributions"

./dashAnalysis.sh "N/A" "$SRC_REPO/smartclide" "$DST_REPO/smartclide"
./dashAnalysis.sh "Maven" "$SRC_REPO/smartclide-api-gateway" "$DST_REPO/smartclide-api-gateway"
./dashAnalysis.sh "??" "$SRC_REPO/smartclide-architectural-pattern" "$DST_REPO/smartclide-architectural-pattern"
./dashAnalysis.sh "??" "$SRC_REPO/smartclide-Backend-REST-Client" "$DST_REPO/smartclide-Backend-REST-Client"
./dashAnalysis.sh "Maven" "$SRC_REPO/smartclide-broker" "$DST_REPO/smartclide-broker"
./dashAnalysis.sh "??" "$SRC_REPO/smartclide-Che-REST-Client" "$DST_REPO/smartclide-Che-REST-Client"
./dashAnalysis.sh "??" "$SRC_REPO/smartclide-che-theia" "$DST_REPO/smartclide-che-theia"
./dashAnalysis.sh "Maven" "$SRC_REPO/smartclide-cicd" "$DST_REPO/smartclide-cicd"
./dashAnalysis.sh "Docker" "$SRC_REPO/smartclide-cicd-gitlab" "$DST_REPO/smartclide-cicd-gitlab"
./dashAnalysis.sh "Maven" "$SRC_REPO/smartclide-context" "$DST_REPO/smartclide-context"
./dashAnalysis.sh "Maven" "$SRC_REPO/smartclide-db-api" "$DST_REPO/smartclide-db-api"
./dashAnalysis.sh "Yarn" "$SRC_REPO/smartclide-deployment-extension" "$DST_REPO/smartclide-deployment-extension"
./dashAnalysis.sh "Maven" "$SRC_REPO/smartclide-deployment-interpreter-service" "$DST_REPO/smartclide-deployment-interpreter-service"
./dashAnalysis.sh "Yarn" "$SRC_REPO/smartclide-deployment-interpreter-theia" "$DST_REPO/smartclide-deployment-interpreter-theia"
./dashAnalysis.sh "Docker" "$SRC_REPO/smartclide-deployment-service" "$DST_REPO/smartclide-deployment-service"
./dashAnalysis.sh "Yarn" "$SRC_REPO/smartclide-design-pattern-selection-theia" "$DST_REPO/smartclide-design-pattern-selection-theia"
./dashAnalysis.sh "??" "$SRC_REPO/smartclide-devfiles" "$DST_REPO/smartclide-devfiles"
./dashAnalysis.sh "N/A" "$SRC_REPO/smartclide-docs" "$DST_REPO/smartclide-docs"
./dashAnalysis.sh "Maven" "$SRC_REPO/smartclide-external-project-importer" "$DST_REPO/smartclide-external-project-importer"
./dashAnalysis.sh "Nodes" "$SRC_REPO/smartclide-frontend-comm" "$DST_REPO/smartclide-frontend-comm"
./dashAnalysis.sh "Nodes" "$SRC_REPO/smartclide-ide-front-end" "$DST_REPO/smartclide-ide-front-end"
./dashAnalysis.sh "??" "$SRC_REPO/smartclide-ide-front-end-theme" "$DST_REPO/smartclide-ide-front-end-theme"
./dashAnalysis.sh "Yarn" "$SRC_REPO/smartclide-perftestgen-theia" "$DST_REPO/smartclide-perftestgen-theia"
./dashAnalysis.sh "Other" "$SRC_REPO/smartclide-RMV" "$DST_REPO/smartclide-RMV"
./dashAnalysis.sh "Maven" "$SRC_REPO/smartclide-security/Theia-BackEnd" "$DST_REPO/smartclide-security"
./dashAnalysis.sh "Other" "$SRC_REPO/smartclide-security-patterns" "$DST_REPO/smartclide-security-patterns"
./dashAnalysis.sh "Maven" "$SRC_REPO/smartclide-service-creation" "$DST_REPO/smartclide-service-creation"
./dashAnalysis.sh "Other" "$SRC_REPO/smartclide-Service-Creation-Testing" "$DST_REPO/smartclide-Service-Creation-Testing"
./dashAnalysis.sh "Yarn" "$SRC_REPO/smartclide-service-creation-theia" "$DST_REPO/smartclide-service-creation-theia"
./dashAnalysis.sh "Docker" "$SRC_REPO/smartclide-service-discovery-poc" "$DST_REPO/smartclide-service-discovery-poc"
./dashAnalysis.sh "Maven" "$SRC_REPO/smartclide-service-registry-poc/demo" "$DST_REPO/smartclide-service-registry-poc"
./dashAnalysis.sh "Docker" "$SRC_REPO/smartclide-smart-assistant" "$DST_REPO/smartclide-smart-assistant"
./dashAnalysis.sh "N/A" "$SRC_REPO/smartclide-task-service-discovery" "$DST_REPO/smartclide-task-service-discovery"
./dashAnalysis.sh "Maven" "$SRC_REPO/smartclide-TD-Interest" "$DST_REPO/smartclide-TD-Interest"
./dashAnalysis.sh "Maven" "$SRC_REPO/smartclide-TD-Principal" "$DST_REPO/smartclide-TD-Principal"
./dashAnalysis.sh "Maven" "$SRC_REPO/smartclide-TD-Reusability-Index" "$DST_REPO/smartclide-TD-Reusability-Index"
./dashAnalysis.sh "Yarn" "$SRC_REPO/smartclide-td-reusability-theia" "$DST_REPO/smartclide-td-reusability-theia"
2 changes: 2 additions & 0 deletions IPCheck/parseThemAll.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
./parseAll.sh "/Users/philippe/git" "/Users/philippe/temp/smartclide/analysis"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe put parseThemAll.sh and parseThisOne.sh as examples into a README.md file?

I would suggest not to include them as source files - at least not as they are now - because they contain file paths that are specific for your machine.

4 changes: 4 additions & 0 deletions IPCheck/parseThisOne.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
SRC_REPO="/Users/philippe/git"
DST_REPO="/Users/philippe/temp/smartclide/analysis"
./dashAnalysis.sh "Yarn" "$SRC_REPO/smartclide-td-reusability-theia" "$DST_REPO/smartclide-td-reusability-theia"