code: func (f *file) lintExported() {
  	if f.isTest() {
  		return
  	}
  
  	var lastGen *ast.GenDecl // last GenDecl entered.
  
  	// Set of GenDecls that have already had missing comments flagged.
  	genDeclMissingComments := make(map[*ast.GenDecl]bool)
  
  	f.walk(func(node ast.Node) bool {
  		switch v := node.(type) {
  		case *ast.GenDecl:
  			if v.Tok == token.IMPORT {
  				return false
  			}
  			// token.CONST, token.TYPE or token.VAR
  			lastGen = v
  			return true
  		case *ast.FuncDecl:
  			f.lintFuncDoc(v)
  			if v.Recv == nil {
  				// Only check for stutter on functions, not methods.
  				// Method names are not used package-qualified.
  				f.checkStutter(v.Name, "func")
  			}
  			// Don't proceed inside funcs.
  			return false
  		case *ast.TypeSpec:
  			// inside a GenDecl, which usually has the doc
  			doc := v.Doc
  			if doc == nil {
  				doc = lastGen.Doc
  			}
  			f.lintTypeDoc(v, doc)
  			f.checkStutter(v.Name, "type")
  			// Don't proceed inside types.
  			return false
  		case *ast.ValueSpec:
  			f.lintValueSpecDoc(v, lastGen, genDeclMissingComments)
  			return false
  		}
  		return true
  	})
  }
docs: // lintExported examines the exported names.
  // It complains if any required doc comments are missing,
  // or if they are not of the right form. The exact rules are in
  // lintFuncDoc, lintTypeDoc and lintValueSpecDoc; this function
  // also tracks the GenDecl structure being traversed to permit
  // doc comments for constants to be on top of the const block.
  // It also complains if the names stutter when combined with
  // the package name.