Package org.sonar.python
Class TestPythonVisitorRunner
java.lang.Object
org.sonar.python.TestPythonVisitorRunner
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic PythonVisitorContextcreateContext(File file) static PythonVisitorContextcreateContext(File file, File workingDirectory) static PythonVisitorContextcreateContext(File file, File workingDirectory, String packageName, ProjectLevelSymbolTable projectLevelSymbolTable, CacheContext cacheContext) static PythonVisitorContextcreateContext(File file, File workingDirectory, String packageName, ProjectLevelSymbolTable projectLevelSymbolTable, CacheContext cacheContext, ProjectConfiguration projectConfiguration) static PythonVisitorContextcreateContext(File file, File workingDirectory, ProjectConfiguration projectConfiguration) static PythonVisitorContextcreateContext(TestPythonVisitorRunner.MockPythonFile file, File workingDirectory, String packageName, ProjectLevelSymbolTable projectLevelSymbolTable, CacheContext cacheContext) static PythonVisitorContextcreateNotebookContext(File file, Map<Integer, IPythonLocation> locations, String content, String packageName, ProjectLevelSymbolTable projectLevelSymbolTable, CacheContext cacheContext) static ProjectLevelSymbolTableglobalSymbols(List<File> files, File baseDir) static ProjectLevelSymbolTableglobalSymbols(Map<String, String> pathToContent, String baseDir) static FileInputparseNotebookFile(Map<Integer, IPythonLocation> locations, String content) static PythonVisitorContextscanFile(File file, PythonCheck... visitors) static PythonVisitorContextscanNotebookFile(File file, Map<Integer, IPythonLocation> locations, String content, PythonCheck... visitors)
-
Method Details
-
scanFile
-
scanNotebookFile
public static PythonVisitorContext scanNotebookFile(File file, Map<Integer, IPythonLocation> locations, String content, PythonCheck... visitors) -
createContext
-
createContext
-
createContext
public static PythonVisitorContext createContext(File file, @Nullable File workingDirectory, @Nullable ProjectConfiguration projectConfiguration) -
createContext
public static PythonVisitorContext createContext(File file, @Nullable File workingDirectory, String packageName, ProjectLevelSymbolTable projectLevelSymbolTable, CacheContext cacheContext) -
createContext
public static PythonVisitorContext createContext(File file, @Nullable File workingDirectory, String packageName, ProjectLevelSymbolTable projectLevelSymbolTable, CacheContext cacheContext, @Nullable ProjectConfiguration projectConfiguration) -
createContext
public static PythonVisitorContext createContext(TestPythonVisitorRunner.MockPythonFile file, @Nullable File workingDirectory, String packageName, ProjectLevelSymbolTable projectLevelSymbolTable, CacheContext cacheContext) -
createNotebookContext
public static PythonVisitorContext createNotebookContext(File file, Map<Integer, IPythonLocation> locations, String content, String packageName, ProjectLevelSymbolTable projectLevelSymbolTable, CacheContext cacheContext) -
globalSymbols
-
globalSymbols
public static ProjectLevelSymbolTable globalSymbols(Map<String, String> pathToContent, String baseDir) -
parseNotebookFile
-