-
Notifications
You must be signed in to change notification settings - Fork 176
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
SONARJS-705 Migrate plugin on SQ 5.6 LTS #245
Conversation
638d676
to
b125043
Compare
@@ -138,10 +138,19 @@ private void saveComplexityMetrics(TreeVisitorContext context) { | |||
saveMetricOnFile(CoreMetrics.COMPLEXITY_IN_CLASSES, classComplexity); | |||
saveMetricOnFile(CoreMetrics.COMPLEXITY_IN_FUNCTIONS, functionComplexity); | |||
|
|||
sensorContext.saveMeasure(inputFile, functionComplexityDistribution.build(true).setPersistenceMode(PersistenceMode.MEMORY)); | |||
sensorContext.<String>newMeasure() |
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.
721551a
to
d8b38b3
Compare
DefaultInputFile inputFile = new DefaultInputFile("src/test/resources/metrics/lines.js") | ||
.setAbsolutePath(file.getAbsolutePath()) | ||
DefaultInputFile inputFile = new DefaultInputFile("", "src/test/resources/metrics/lines.js") | ||
// .setAbsolutePath(file.getAbsolutePath()) |
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.
@vilchik-elena can we remove that comment?
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.
@pynicolas i think it's fixed in next commits
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.
@vilchik-elena ok, sorry for the noise.
@vilchik-elena |
@pynicolas we should drop it, but i have no idea how. Let's discuss that tomorrow |
@vilchik-elena |
@pynicolas fixed in acf6af4 |
@vilchik-elena I think we can remove |
int startOffset = token.startIndex(); | ||
int endOffset = token.toIndex(); | ||
return builder.newSymbol(startOffset, endOffset); | ||
private static void addReference(NewSymbol symbol, InternalSyntaxToken referenceToken) { |
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.
@vilchik-elena minor: can't we use SyntaxToken
instead of InternalSyntaxToken
?
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.
@pynicolas we can now!:) btw we can drop offset properties from InternalSyntaxToken
. WDYT?
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.
@vilchik-elena We can try, but I'm not sure it's easy.
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.
@pynicolas fixed 220992d
@pynicolas common rules are dropped in 65a9cc7 |
|
||
context.fileSystem().add(inputFile); | ||
|
||
return inputFile.initMetadata(new FileMetadata().readMetadata(inputFile.file(), Charset.defaultCharset())); |
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.
@vilchik-elena Charset.defaultCharset()
should be replaced with a given charset.
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.
@pynicolas fixed in 600ccbb
600ccbb
to
bfda452
Compare
@Override | ||
public boolean shouldExecuteOnProject(Project project) { | ||
return fileSystem.hasFiles(mainFilePredicate); | ||
private FilePredicate mainFilePredicate(FileSystem fileSystem) { |
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.
SonarQube analysis reported 5 issues Watch the comments in this conversation to review them. 2 extra issuesNote: The following issues were found on lines that were not modified in the pull request. Because these issues can't be reported as line comments, they are summarized here:
|
No description provided.