Skip to content

Commit 8347f97

Browse files
authored
*: remove redundant lines at the start/end of block (#3730)
1 parent 468727c commit 8347f97

24 files changed

+6
-34
lines changed

‎pkg/dwarf/frame/entries_test.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ func TestFDEForPC(t *testing.T) {
3838
{300, frames[3]},
3939
{309, frames[3]},
4040
{310, nil},
41-
{400, nil}} {
42-
41+
{400, nil},
42+
} {
4343
out, err := frames.FDEForPC(test.pc)
4444
if test.fde != nil {
4545
if err != nil {

‎pkg/dwarf/line/line_parser_test.go‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,5 +377,4 @@ func TestDebugLineDwarf4(t *testing.T) {
377377
}
378378
}
379379
}
380-
381380
}

‎pkg/dwarf/line/state_machine_test.go‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,6 @@ func TestMultipleSequences(t *testing.T) {
238238
if curline != testCase.line {
239239
t.Errorf("Wrong line returned for %#x: got %d expected %d", testCase.pc, curline, testCase.line)
240240
}
241-
242241
}
243242

244243
// Test that AllPCsBetween is correct for all three sequences

‎pkg/proc/bininfo.go‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,6 @@ func FindFileLocation(p Process, filename string, lineno int) ([]uint64, error)
207207
selectedPCs := []uint64{}
208208

209209
for fn, pcs := range pcByFunc {
210-
211210
// 3. for each concrete function split instruction between the inlined functions it contains
212211

213212
if strings.Contains(fn.Name, "·dwrap·") || fn.trampoline {
@@ -1399,7 +1398,6 @@ func (bi *BinaryInfo) openSeparateDebugInfo(image *Image, exe *elf.File, debugIn
13991398
bi.logger.Errorf("gnu_debuglink CRC check failed for %s (want %x got %x)", debugFilePath, crc, computedCRC)
14001399
debugFilePath = ""
14011400
}
1402-
14031401
}
14041402
}
14051403
}

‎pkg/proc/core/linux_core.go‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,6 @@ func buildMemory(core, exeELF *elf.File, exe io.ReaderAt, notes []*note) proc.Me
368368
}
369369
memory.Add(r, entry.Start, entry.End-entry.Start)
370370
}
371-
372371
}
373372
}
374373

‎pkg/proc/dwarf_expr_test.go‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,6 @@ func TestLocationCovers(t *testing.T) {
370370
if fmt.Sprintf("%x", ranges) != "[[40100 40700] [40700 41000]]" {
371371
t.Error("wrong value returned by LocationCover")
372372
}
373-
374373
}
375374

376375
func TestIssue1636_InlineWithoutOrigin(t *testing.T) {

‎pkg/proc/evalop/evalcompile.go‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,6 @@ func (ctx *compileCtx) compileAST(t ast.Expr) error {
266266

267267
default:
268268
return ctx.compileUnary(node.X, &Select{node.Sel.Name})
269-
270269
}
271270

272271
case *ast.TypeAssertExpr: // <expression>.(<type>)

‎pkg/proc/gdbserial/gdbserver.go‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1784,7 +1784,6 @@ func (t *gdbThread) writeRegisters() error {
17841784
} else {
17851785
return err
17861786
}
1787-
17881787
}
17891788
for _, r := range t.regs.regs {
17901789
if r.ignoreOnWrite {

‎pkg/proc/moduledata.go‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ func loadModuleData(bi *BinaryInfo, mem MemoryReadWriter) ([]moduleData, error)
3838
if err != nil {
3939
return nil, err
4040
}
41-
4241
}
4342

4443
var err error

‎pkg/proc/proc_test.go‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3325,7 +3325,6 @@ func logStacktrace(t *testing.T, p *proc.Target, frames []proc.Stackframe) {
33253325
fmt.Fprintf(w, "%#x\t%#x\t%#x\t%#x\t%#x\t%s\t%s:%d\t%s\t%s\t\n",
33263326
frame.Call.PC, frame.FrameOffset(), frame.FramePointerOffset(), frame.Current.PC, frame.Ret,
33273327
name, filepath.Base(frame.Call.File), frame.Call.Line, topmostdefer, defers)
3328-
33293328
}
33303329
w.Flush()
33313330
}
@@ -5011,7 +5010,8 @@ func TestStepIntoWrapperForEmbeddedPointer(t *testing.T) {
50115010
{contStep, 22},
50125011
{contNext, 23},
50135012
{contNext, 23},
5014-
{contNext, 29}})
5013+
{contNext, 29},
5014+
})
50155015
} else {
50165016
testseq2(t, "ifaceembcall", "", []seqTest{
50175017
{contContinue, 28}, // main.main, the line calling iface.PtrReceiver()
@@ -5021,8 +5021,8 @@ func TestStepIntoWrapperForEmbeddedPointer(t *testing.T) {
50215021
{contContinueToBreakpoint, 29}, // main.main, the line calling iface.NonPtrReceiver()
50225022
{contStep, 22},
50235023
{contNext, 23},
5024-
{contNext, 29}})
5025-
5024+
{contNext, 29},
5025+
})
50265026
}
50275027
}
50285028

@@ -5123,7 +5123,6 @@ func TestStepOutPreservesGoroutine(t *testing.T) {
51235123
} else {
51245124
pickg = candg[rand.Intn(len(candg))]
51255125
t.Logf("selected goroutine %d\n", pickg.ID)
5126-
51275126
}
51285127
goid := pickg.ID
51295128
assertNoError(p.SwitchGoroutine(pickg), t, "SwitchGoroutine")

0 commit comments

Comments
 (0)