I am not sure if this would be possible but during code review collapsed code lines often result in presenting an irritating context.
For example consider the code
public void method1() {
existingCodeLine();
+ newCodeLineAdded();
}
public void method2() {
}
public void method3() {
}
public void method4() {
existingCodeLine();
existingCodeLine();
existingCodeLine();
+ newCodeLineAdded();
}
This would result in a collapsed code review view that looks like
public void method1() {
existingCodeLine();
+ newCodeLineAdded();
}
public void method2() {
// ---------------
// skipped X lines
// ---------------
existingCodeLine();
existingCodeLine();
existingCodeLine();
+ newCodeLineAdded();
}
So now you might think the code has been edited in method2() while in reality it was in method4(). This can be irritating sometimes.
I am wondering if it would be possible for OneDev to make sure to always show the enclosing context of a modified code section, e.g. the method that contains the modified code?
Also as a side note I noticed some skipped 1 line sections which seem useless and you could just render the code line instead. Maybe the skipped X lines block should have a minimum amount of lines before using it. I feel like hiding 1, 2 or maybe even 3 lines does not provide too much value.
I am not sure if this would be possible but during code review collapsed code lines often result in presenting an irritating context.
For example consider the code
This would result in a collapsed code review view that looks like
So now you might think the code has been edited in
method2()
while in reality it was inmethod4()
. This can be irritating sometimes.I am wondering if it would be possible for OneDev to make sure to always show the enclosing context of a modified code section, e.g. the method that contains the modified code?
Also as a side note I noticed some
skipped 1 line
sections which seem useless and you could just render the code line instead. Maybe theskipped X lines
block should have a minimum amount of lines before using it. I feel like hiding 1, 2 or maybe even 3 lines does not provide too much value.