You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: lint.go
    path of file: ./repos/goreporter/linters/staticcheck
    
    the code of the file until where you have to start completion: // Package staticcheck contains a linter for Go source code.
package staticcheck // import "github.com/360EntSecGroup-Skylar/goreporter/linters/staticcheck"

import (
	"fmt"
	"go/ast"
	"go/build"
	"go/constant"
	"go/token"
	"go/types"
	htmltemplate "html/template"
	"net/http"
	"regexp"
	"strconv"
	"strings"
	"sync"
	texttemplate "text/template"

	"github.com/360EntSecGroup-Skylar/goreporter/linters/simpler/lint"
	"github.com/360EntSecGroup-Skylar/goreporter/linters/simpler/ssa"
	"github.com/360EntSecGroup-Skylar/goreporter/linters/staticcheck/functions"
	"github.com/360EntSecGroup-Skylar/goreporter/linters/staticcheck/gcsizes"
	"github.com/360EntSecGroup-Skylar/goreporter/linters/staticcheck/internal/sharedcheck"
	"github.com/360EntSecGroup-Skylar/goreporter/linters/staticcheck/vrp"

	"golang.org/x/tools/go/ast/astutil"
)

func validRegexp(call *Call) {
	arg := call.Args[0]
	err := ValidateRegexp(arg.Value)
	if err != nil
    
func (c *Checker) CheckIneffectiveAppend(j *lint.Job) {
	isAppend := func(ins ssa.Value) bool {
		call, ok := ins.(*ssa.Call)
		if !ok {
			return false
		}
		if call.Call.IsInvoke() {
			return false
		}
		if builtin, ok := call.Call.Value.(*ssa.Builtin); !ok || builtin.Name() != "append" {
			return false
		}
		return true
	}

	for _, ssafn := range j.Program.InitialFunctions {
		for _, block := range ssafn.Blocks {
			for _, ins := range block.Instrs {
				val, ok := ins.(ssa.Value)
				if !ok || !isAppend(val) {
					continue
				}

				isUsed := false
				visited := map[ssa.Instruction]bool{}
				var walkRefs func(refs []ssa.Instruction)
				walkRefs = func(refs []ssa.Instruction) {
				loop:
					for _, ref := range refs {
						if visited[ref] {
							continue
						}
						visited[ref] = true
						if _, ok := ref.(*ssa.DebugRef); ok {
							continue
						}
						switch ref := ref.(type) {
						case *ssa.Phi:
							walkRefs(*ref.Referrers())
						case *ssa.Sigma:
							walkRefs(*ref.Referrers())
						case ssa.Value:
							if !isAppend(ref) {
								isUsed = true
							} else {
								walkRefs(*ref.Referrers())
							}
						case ssa.Instruction:
							isUsed = true
							break loop
						}
					}
				}
				refs := val.Referrers()
				if refs == nil {
					continue
				}
				walkRefs(*refs)
				if !isUsed {
					j.Errorf(ins, "this result of append is never used, except maybe in other appends")
				}
			}
		}
	}
}