Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
sonar: ignore more issues, hide commented code, add 'explicit'
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Sat, 15 Jun 2019 20:24:03 +0000 (22:24 +0200)
committerMartin Quinson <martin.quinson@ens-rennes.fr>
Sat, 15 Jun 2019 20:24:03 +0000 (22:24 +0200)
sonar-project.properties
src/bindings/java/jtrace.h
src/mc/Session.hpp

index 97c12bc..8d932f3 100644 (file)
@@ -14,7 +14,7 @@ sonar.sources=src,examples,include,teshsuite
 
 
 # Disable some rules on some files
-sonar.issue.ignore.multicriteria=j1,j2,j3,jni1,jni2,c1,c2a,c2b,c3,c4a,c4b,c5a,c5b,c6a,c6b,c7,c8,c9,c10,f1,p1,s1,s2,s3,s4
+sonar.issue.ignore.multicriteria=j1,j2,j3,j4,jni1,jni2,c1,c2a,c2b,c3,c4a,c4b,c5a,c5b,c6a,c6b,c7,c8,c9,c10,f1,p1,s1,s2,s3,s4
 
 # The Object.finalize() method should not be overriden
 # But we need to clean the native memory with JNI
@@ -31,6 +31,11 @@ sonar.issue.ignore.multicriteria.j2.resourceKey=**/*.java
 sonar.issue.ignore.multicriteria.j3.ruleKey=squid:S4823
 sonar.issue.ignore.multicriteria.j3.resourceKey=**/*.java
 
+# Standard outputs should not be used directly to log anything
+#┬áBut this file is used before SimGrid is initialized
+sonar.issue.ignore.multicriteria.j4.ruleKey=squid:S106
+sonar.issue.ignore.multicriteria.j4.resourceKey=src/bindings/java/org/simgrid/NativeLib.java
+
 # "reinterpret_cast" should not be used
 # But this is exactly intended to store a pointer into a long -- what we do here
 sonar.issue.ignore.multicriteria.jni1.ruleKey=cpp:S3630
index 414947c..b7b1cf4 100644 (file)
@@ -61,15 +61,15 @@ JNIEXPORT void JNICALL Java_org_simgrid_trace_Trace_hostPushState (JNIEnv *env,
 JNIEXPORT void JNICALL Java_org_simgrid_trace_Trace_hostPopState (JNIEnv *env, jclass cls, jstring js_host,
                                                                   jstring js_state);
 
-/* Missing calls
-JNIEXPORT void JNICALL Java_org_simgrid_trace_Trace_linkVariableSetWithTime (JNIEnv *env, jclass cls, jdouble, jstring, jstring, jdouble);
-JNIEXPORT void JNICALL Java_org_simgrid_trace_Trace_linkVariableAddWithTime (JNIEnv *env, jclass cls, jdouble, jstring, jstring, jdouble);
-JNIEXPORT void JNICALL Java_org_simgrid_trace_Trace_linkVariableSubWithTime (JNIEnv *env, jclass cls, jdouble, jstring, jstring, jdouble);
-JNIEXPORT void JNICALL Java_org_simgrid_trace_Trace_linkSrcDstVariableAdd (JNIEnv *env, jclass cls, jstring, jstring, jstring, jdouble);
-JNIEXPORT void JNICALL Java_org_simgrid_trace_Trace_linkSrcDstVariableSub (JNIEnv *env, jclass cls, jstring, jstring, jstring, jdouble);
-JNIEXPORT void JNICALL Java_org_simgrid_trace_Trace_linkSrcDstVariableSetWithTime (JNIEnv *env, jclass cls, jdouble, jstring, jstring, jstring, jdouble);
-JNIEXPORT void JNICALL Java_org_simgrid_trace_Trace_linkSrcdstVariableAddWithTime (JNIEnv *env, jclass cls, jdouble, jstring, jstring, jstring, jdouble);
-JNIEXPORT void JNICALL Java_org_simgrid_trace_Trace_linkSrcDstVariableSubWithTime (JNIEnv *env, jclass cls, jdouble, jstring, jstring, jstring, jdouble);
+/* Missing calls:
+Java_org_simgrid_trace_Trace_linkVariableSetWithTime
+Java_org_simgrid_trace_Trace_linkVariableAddWithTime
+Java_org_simgrid_trace_Trace_linkVariableSubWithTime
+Java_org_simgrid_trace_Trace_linkSrcDstVariableAdd
+Java_org_simgrid_trace_Trace_linkSrcDstVariableSub
+Java_org_simgrid_trace_Trace_linkSrcDstVariableSetWithTime
+Java_org_simgrid_trace_Trace_linkSrcdstVariableAddWithTime
+Java_org_simgrid_trace_Trace_linkSrcDstVariableSubWithTime
 */
 #ifdef __cplusplus
 }
index 3a79387..ecdb31d 100644 (file)
@@ -38,7 +38,7 @@ public:
    *
    *  The code is expected to `exec` the model-checked application.
    */
-  Session(const std::function<void()>& code);
+  explicit Session(const std::function<void()>& code);
 
   ~Session();
   void close();