-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AnalysisScope example #11
Conversation
src/main/java/com/ibm/wala/examples/AnalysisScopeExamples/AnalysisScopeExamples.java
Outdated
Show resolved
Hide resolved
src/main/java/com/ibm/wala/examples/AnalysisScopeExamples/AnalysisScopeExamples.java
Outdated
Show resolved
Hide resolved
src/main/java/com/ibm/wala/examples/AnalysisScopeExamples/AnalysisScopeExamples.java
Outdated
Show resolved
Hide resolved
src/main/java/com/ibm/wala/examples/AnalysisScopeExamples/AnalysisScopeExamples.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few more comments
//for more information, please check out https://github.com/wala/WALA/wiki/Analysis-Scope | ||
|
||
|
||
public class analysisscope { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public class analysisscope { | |
public class AnalysisScopeExamples { |
Class names start with a capital and use camel case. See https://google.github.io/styleguide/javaguide.html#s5.2.2-class-names
public class analysisscope { | ||
/** | ||
* @param classPath paths of jars to include in analysis scope, formatted as a Java classpath | ||
* @return AnaylsisScope object created by makeJavaBinaryAnalysisScope |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* @return AnaylsisScope object created by makeJavaBinaryAnalysisScope | |
* @return AnalysisScope object created by makeJavaBinaryAnalysisScope |
* @return return an analysis scope object | ||
* @throws IOException | ||
*/ | ||
AnalysisScope makeAnalysisScope(String classPath, String exceptionFile) throws IOException{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The first parameter should be named something like scopeFilePath
, and the second should be exclusionsFilePath
*/ | ||
AnalysisScope makeAnalysisScope(String classPath, String exceptionFile) throws IOException{ | ||
File exception = new File(exceptionFile); | ||
return AnalysisScopeReader.readJavaScope(classPath, exception, null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return AnalysisScopeReader.readJavaScope(classPath, exception, null); | |
return AnalysisScopeReader.readJavaScope(classPath, exception, AnalysisScopeExamples.class.getClassLoader()); |
Should pass a real classloader as the final parameter.
import java.io.IOException; | ||
import com.ibm.wala.util.config.AnalysisScopeReader; | ||
|
||
//for more information, please check out https://github.com/wala/WALA/wiki/Analysis-Scope |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Write this as proper Javadoc on the class rather than just a single line comment
/** | ||
* | ||
* @param scopeFilePath Location of a scope file in string form | ||
* @param exceptionFilePath location of an exception file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everywhere you write exception
it should be exclusion
. These files give a pattern of which Java packages to exclude from the scope
No description provided.