Skip to content

Commit 0c2f635

Browse files
authored
Merge pull request #19 from Minjung-Baek/master
Change dexter.em file for v0.10.4
2 parents 6cc2fc6 + 046da51 commit 0c2f635

File tree

45 files changed

+473
-405
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+473
-405
lines changed

project/dexter-core/META-INF/MANIFEST.MF

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
33
BUndle-RequiredExecutionEnvironment: JavaSE-1.7
44
Bundle-Name: Dexter Core
55
Bundle-SymbolicName: dexter-core;singleton:=true
6-
Bundle-Version: 0.10.2
6+
Bundle-Version: 0.10.4
77
Bundle-ClassPath: .,
88
lib/jspf.core-1.0.2.jar,
99
lib/jspf.remote-1.0.2.jar,

project/dexter-core/src/java/com/samsung/sec/dexter/core/config/DexterConfig.java

+1
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ public class DexterConfig {
6969
public static final String CHECK_SERVER_ADDRESS = "/api/v1/isServerAlive";
7070
public static final String PUT_ANALYSIS_RESULT = "/api/v1/analysis/result";
7171
public static final String PUT_ANALYSIS_RESULT_V2 = "/api/v2/analysis/result";
72+
public static final String PUT_ANALYSIS_RESULT_V3 = "/api/v3/analysis/result";
7273
public static final String DISMISS_DEFECT = "/api/v1/defect/dismiss";
7374
public static final String FILTER_FALSE_ALARM = "/api/v1/filter/false-alarm";
7475
public static final String FILTER_FALSE_ALARM_LIST = "/api/v1/filter/false-alarm-list";

project/dexter-core/src/java/com/samsung/sec/dexter/core/util/DexterClient.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -250,10 +250,10 @@ public void sendAnalsysisResult(final String resultJson) {
250250
if (DexterConfig.getInstance().getRunMode() == DexterConfig.RunMode.CLI) {
251251
Gson gson = new Gson();
252252
String jsonBody = gson.toJson(body);
253-
resultText = webResource.postWithBodyforCLI(getServiceUrl(DexterConfig.PUT_ANALYSIS_RESULT_V2),
253+
resultText = webResource.postWithBodyforCLI(getServiceUrl(DexterConfig.PUT_ANALYSIS_RESULT_V3),
254254
this.currentUserId, this.currentUserPwd, jsonBody);
255255
} else {
256-
resultText = webResource.postWithBody(getServiceUrl(DexterConfig.PUT_ANALYSIS_RESULT_V2),
256+
resultText = webResource.postWithBody(getServiceUrl(DexterConfig.PUT_ANALYSIS_RESULT_V3),
257257
this.currentUserId, this.currentUserPwd, body);
258258
}
259259
checkResultOk(resultText);

project/dexter-core/src/resource/dexter.em

+4-90
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ macro initDexterGlobalVariables()
4949
global g_showResultMsgDialog; // 1: show, 0: hide
5050
global g_waitDexterResult; // 1: wait(synchronously), 0: no wait(asynchronously)
5151
global g_analysisWhenOpen; // 1: analysis when open, 0: not analysis when open a file(default)
52-
global g_functionList;
5352
global g_dexterPath; // dexter daemon installation path
5453
5554
g_dexterRunning = 1;
@@ -61,7 +60,7 @@ macro initDexterGlobalVariables()
6160
g_showResultMsgDialog = 0;
6261
g_waitDexterResult = 0;
6362
g_analysisWhenOpen = 0;
64-
g_functionList = "";
63+
6564
6665
g_dexterConfig.sourceDirRegKey = "sourceDirRegKey"
6766
g_dexterConfig.headerDirRegKey = "headerDirRegKey"
@@ -243,8 +242,7 @@ macro runDexter(sFile)
243242
if(g_dexterDaemon == nil || g_dexterDaemon == "g_dexterDaemon" || g_dexterDaemon == 0){
244243
RunCmdLine(g_dexterPath # "\\dexter.exe", g_dexterPath, 0);
245244
}
246-
247-
saveModifiedFunctionList();
245+
248246
createDexterConfFile();
249247
}
250248
@@ -526,7 +524,7 @@ macro createDexterConfFile()
526524
var confFile;
527525
var requestTime;
528526
var contents;
529-
var functionList;
527+
530528
initDexterHome();
531529
confFile = g_dexterConfig.dexterHome # "\\bin\\daemon\\dexter_daemon_cfg.json"
532530
hConfbuf = OpenBuf(confFile);
@@ -560,98 +558,14 @@ macro createDexterConfFile()
560558
}
561559
562560
contents = contents # "\t\"fileName\":[\"" # GetBufName(hFile) # "\"],";
563-
contents = contents # "\t\"type\":\"FILE\",";
564-
contents = contents # "\t\"functionList\":[" # g_functionList # "]";
561+
contents = contents # "\t\"type\":\"FILE\"";
565562
contents = contents # "}";
566563
567564
emptyFileContent(hConfbuf, 0);
568565
AppendBufLine(hConfbuf, contents);
569566
SaveBuf(hConfbuf);
570567
CloseBuf(hConfbuf);
571568
}
572-
macro saveModifiedFunctionList(){
573-
var firstRevisionLine;
574-
var changeCount;
575-
var functionName;
576-
var curSymbol;
577-
578-
hwnd = GetCurrentWnd();
579-
hbuf = GetCurrentBuf();
580-
581-
currentLine = 0;
582-
583-
changeCount = 0;
584-
firstRevisionLine = 0;
585-
586-
g_functionList= "";
587-
currentLn = GetWndSelLnFirst (hwnd);
588-
currentIch =GetWndSelIchFirst(hwnd);
589-
vert = GetWndVertScroll (hwnd);
590-
wndsel = GetWndSel(hwnd);
591-
//msg();
592-
while(1){
593-
Go_To_Next_Change;
594-
if(changeCount == 0){
595-
firstRevisionLine = GetBufLnCur(hbuf);
596-
}else if( isNavigatedLine(hbuf,changeCount,firstRevisionLine) == true){
597-
break;
598-
}
599-
changeCount = changeCount +1;
600-
601-
curSymbol = GetCurSymbol();
602-
symbolLocation = GetSymbolLocation(curSymbol);
603-
if( symbolLocation == "" ){
604-
605-
}else if(symbolLocation.Type == "Function" || symbolLocation.Type == "Method"){
606-
functionName = SymbolLeafName(symbolLocation);
607-
608-
addFunctionNameIfNotExist(functionName);
609-
}
610-
}
611-
if(g_functionList !=""){
612-
g_functionList = strtrunc(g_functionList,strlen(g_functionList)-1);
613-
}
614-
SetBufIns(hbuf,currentLn,currentIch);
615-
ScrollWndToLine(hwnd,vert);
616-
617-
}
618-
macro isNavigatedLine(hbuf, count,firstRevisionLine){
619-
620-
var currentLine;
621-
currentLine = GetBufLnCur(hbuf);
622-
if(count>=1 && currentLine == firstRevisionLine){
623-
return true;
624-
}
625-
return false;
626-
627-
}
628-
macro addFunctionNameIfNotExist(functionName){
629-
var index;
630-
var functionListLength;
631-
var compareFunctionName;
632-
var frontIndex;
633-
var backIndex;
634-
635-
index = 0;
636-
frontIndex = 0;
637-
backIndex = 0;
638-
functionListLength = strlen(g_functionList);
639-
640-
while(index<functionListLength){
641-
if(g_functionList[index] == ","){
642-
backIndex = index;
643-
compareFunctionName = strmid(g_functionList,frontIndex+1,backIndex-1);
644-
if(compareFunctionName == functionName){
645-
return;
646-
}
647-
frontIndex = index +1;
648-
}
649-
index = index +1;
650-
}
651-
652-
g_functionList = g_functionList # "\"" # functionName # "\"" # ",";
653-
654-
}
655569
656570
macro createPlatzKeywordFile()
657571
{

project/dexter-core/src/test/com/samsung/sec/dexter/core/util/DexterUtilTest.java

-140
This file was deleted.

project/dexter-cppcheck/META-INF/MANIFEST.MF

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
22
Bundle-ManifestVersion: 2
33
Bundle-Name: Dexter Cppcheck
44
Bundle-SymbolicName: dexter-cppcheck;singleton:=true
5-
Bundle-Version: 0.10.2
5+
Bundle-Version: 0.10.4
66
Bundle-ClassPath: .,
77
lib/gson-2.2.4.jar,
88
lib/guava-16.0.1.jar,

project/dexter-cppcheck/src/java/checker-config.json

+1-1
Large diffs are not rendered by default.

project/dexter-cppcheck/src/java/com/samsung/sec/dexter/cppcheck/plugin/CppcheckDexterPlugin.java

+15-7
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
@PluginImplementation
5353
public class CppcheckDexterPlugin implements IDexterPlugin {
5454
public final static String PLUGIN_NAME = "cppcheck";
55-
public final static PluginVersion PLUGIN_VERSION = new PluginVersion("0.10.2");
55+
public final static PluginVersion PLUGIN_VERSION = new PluginVersion("0.10.4");
5656

5757
private CppcheckWrapper cppcheck = new CppcheckWrapper();
5858
private final static Logger logger = Logger.getLogger(CppcheckWrapper.class);
@@ -71,11 +71,11 @@ public class CppcheckDexterPlugin implements IDexterPlugin {
7171
public void init() {
7272
cppcheck.initCheckerConfig();
7373

74+
copyCppcheckRunModule();
75+
7476
if (DexterUtil.getOS() == DexterUtil.OS.LINUX || DexterUtil.getOS() == DexterUtil.OS.MAC) {
7577
checkCppcheckPermission();
7678
}
77-
78-
copyCppcheckRunModule();
7979
}
8080

8181
/*
@@ -137,12 +137,20 @@ private void copyCppcheckRunModule() {
137137
String cppcheckPath = "";
138138

139139
if (DexterUtil.getOS() == DexterUtil.OS.WINDOWS) {
140-
//zipFilePath += "/temp/cppcheck-windows_" + CppcheckDexterPlugin.version.getVersion() + ".zip";
141-
zipFilePath += "/temp/cppcheck-windows_0.10.2.zip";
140+
//zipFilePath += "/temp/cppcheck-windows_0.10.2.zip";
141+
zipFilePath += "/temp/cppcheck-windows_" + PLUGIN_VERSION + ".zip";
142142
cppcheckPath = "/cppcheck-windows.zip";
143143
} else { // LINUX or MAC
144-
zipFilePath += "/temp/cppcheck-linux_0.10.2.zip";
145-
cppcheckPath = "/cppcheck-linux.zip";
144+
if(DexterUtil.getBit() == DexterUtil.BIT._32){
145+
//zipFilePath += "/temp/cppcheck-linux_0.10.2.zip";
146+
zipFilePath += "/temp/cppcheck-linux_"+ PLUGIN_VERSION + "_32.zip";
147+
cppcheckPath = "/cppcheck-linux-32.zip";
148+
}else{
149+
//zipFilePath += "/temp/cppcheck-linux_0.10.2.zip";
150+
zipFilePath += "/temp/cppcheck-linux_"+ PLUGIN_VERSION + "_64.zip";
151+
cppcheckPath = "/cppcheck-linux-64.zip";
152+
}
153+
146154
}
147155

148156
final File file = new File(zipFilePath);

project/dexter-cppcheck/src/java/com/samsung/sec/dexter/cppcheck/plugin/ResultFileHandler.java

+6-3
Original file line numberDiff line numberDiff line change
@@ -134,12 +134,15 @@ public void startElement(final String uri, final String localName, final String
134134
Checker checker = new Checker(checkerCode, checkerCode,
135135
CppcheckDexterPlugin.PLUGIN_VERSION.getVersion(), true);
136136

137+
137138
if ("true".equals(attributes.getValue("inconclusive"))) {
138139
checker.setSeverityCode("ETC");
139140
checker.setActive(false);
140-
} else {
141-
setSeverityForNewChecker(attributes, checker);
142-
}
141+
}
142+
143+
currentOccurence.setSeverityCode("ETC");
144+
currentOccurence.setCategoryName("");
145+
setSeverityForNewChecker(attributes, checker);
143146
checkerConfig.addChecker(checker);
144147

145148
}
Binary file not shown.
Binary file not shown.
Binary file not shown.

project/dexter-daemon/META-INF/MANIFEST.MF

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
22
Bundle-ManifestVersion: 2
33
Bundle-Name: Dexter-daemon
44
Bundle-SymbolicName: dexter-daemon;singleton:=true
5-
Bundle-Version: 0.10.2
5+
Bundle-Version: 0.10.4
66
Bundle-Activator: com.samsung.sec.dexter.daemon.DexterDaemonActivator
77
Require-Bundle: org.eclipse.core.runtime,
88
org.eclipse.ui,

0 commit comments

Comments
 (0)