-
Notifications
You must be signed in to change notification settings - Fork 102
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
Java plugin #557
base: master
Are you sure you want to change the base?
Java plugin #557
Conversation
… java plugin with rudimentary files.
…ible AstNode type.
…at the parser modifies only the source of the parser.
…named to "javaparser" in some cases.)
…ameters burned into EMFactory.java.)
…avac compile commands from CodeCompass.
…x a bug, which caused inconsistent parsing state for some files. Failing to parse a node in a file will not cause to stop the whole parsing process for the file.
…d. (Keywords "synchronize" was unnecessary and slowed down the parser.)
@Wrathan Please provide a detailed user guide in |
using std::runtime_error::runtime_error; | ||
}; | ||
|
||
class JavaParserServiceHandler : public JavaParserServiceIf { |
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.
If there is no specific reason for putting multiple large classes into one file, please put this class into a separate header file.
"marked" : ">=0.3.6", | ||
"marked" : "2.1.3", |
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.
This should be a minimal version, not an exact one.
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.
Especially semantic versioning should be used.
Tilde Version Range (~)
The ~ operator is best explained by example: ~1.2 is equivalent to >=1.2 <2.0.0, while ~1.2.3 is equivalent to >=1.2.3 <1.3.0. As you can see it is mostly useful for projects respecting semantic versioning. A common usage would be to mark the minimum minor version you depend on, like ~1.2 (which allows anything up to, but not including, 2.0). Since in theory there should be no backwards compatibility breaks until 2.0, that works well. Another way of looking at it is that using ~ specifies a minimum version, but allows the last digit specified to go up.Caret Version Range (^)
The ^ operator behaves very similarly, but it sticks closer to semantic versioning, and will always allow non-breaking updates. For example ^1.2.3 is equivalent to >=1.2.3 <2.0.0 as none of the releases until 2.0 should break backwards compatibility. For pre-1.0 versions it also acts with safety in mind and treats ^0.3 as >=0.3.0 <0.4.0 and ^0.0.3 as >=0.0.3 <0.0.4.
This is the recommended operator for maximum interoperability when writing library code.
src/dummyparser.cpp) | ||
src/dummyparser.cpp) |
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.
This change is unnecessary.
TEST_F(JavaParserTest, simpleJavaParserTest2) | ||
{ | ||
ASSERT_TRUE(true); | ||
} |
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.
Actual tests should be written for the plugin, or this file is unnecessary.
TEST_F(JavaServiceTest, simpleJavaServiceTest) | ||
{ | ||
EXPECT_EQ(7,7); | ||
} |
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.
Actual tests should be written for the plugin, or this file is unnecessary.
target_link_libraries(javatest ${GTEST_BOTH_LIBRARIES} pthread) | ||
|
||
# Add a test to the project to be run by ctest | ||
add_test(allJavaTest javatest) |
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.
Actual tests should be written for the plugin, or this file is unnecessary.
/* | ||
std::vector<std::string> content; | ||
|
||
_transaction([&, this]() { | ||
|
||
//--- Load the file content and break it into lines ---// | ||
|
||
model::FilePtr file = _db->query_one<model::File>( | ||
FileQuery::id == std::stoull(range_.file)); | ||
|
||
if (!file || !file->content.load()) | ||
return; | ||
|
||
std::istringstream s(file->content->content); | ||
std::string line; | ||
while (std::getline(s, line)) | ||
content.push_back(line); | ||
}); | ||
|
||
javaQueryHandler.getSyntaxHighlight(return_, range_, content); | ||
*/ |
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.
Dead code should be deleted.
scripts/CodeCompass_logger
Outdated
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.
This file should stay executable.
scripts/remover.sh
Outdated
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.
This file should stay executable.
@@ -1,6 +1,6 @@ | |||
#include <webserver/pluginhelper.h> | |||
|
|||
#include <service/dummyservice.h> | |||
#include <service/javaservice.h> |
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.
This should not be changed,
@@ -1,4 +1,4 @@ | |||
#include <service/dummyservice.h> | |||
#include <service/javaservice.h> |
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.
This should not be changed,
@@ -33,7 +33,7 @@ add_library(dummythrift STATIC | |||
target_compile_options(dummythrift PUBLIC -fPIC) | |||
|
|||
add_library(dummyservice SHARED | |||
src/dummyservice.cpp | |||
src/javaservice.cpp |
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.
This should not be changed,
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.
This should not be renamed, instead the dummyservice should copied as the new javaservice.
No description provided.