func (v *fieldNamesLowerSnakeCaseVisitor) VisitOneofField(field *parser.OneofField) bool {
	name := field.FieldName
	if !strs.IsLowerSnakeCase(name) {
		expected := strs.ToLowerSnakeCase(name)
		v.AddFailuref(field.Meta.Pos, "Field name %q must be underscore_separated_names like %q", name, expected)

		err := v.Fixer.SearchAndReplace(field.Meta.Pos, func(lex *lexer.Lexer) fixer.TextEdit {
			parseType(lex)
			lex.Next()
			return fixer.TextEdit{
				Pos:     lex.Pos.Offset,
				End:     lex.Pos.Offset + len(lex.Text) - 1,
				NewText: []byte(expected),
			}
		})
		if err != nil {
			panic(err)
		}
	}
	return false
}
// VisitOneofField checks the oneof field.
VisitOneofField checks the oneof field.
// VisitOneofField checks the oneof field .
func (v *fieldNamesLowerSnakeCaseVisitor) VisitOneofField(field *parser.OneofField) bool {
	name := field.FieldName
	if !strs.IsLowerSnakeCase(name) {
		expected := strs.ToLowerSnakeCase(name)
		v.AddFailuref(field.Meta.Pos, "Field name %q must be underscore_separated_names like %q", name, expected)
		err := v.Fixer.SearchAndReplace(field.Meta.Pos, func(lex *lexer.Lexer) fixer.TextEdit {
			parseType(lex)
			lex.Next()
			return fixer.TextEdit{
				Pos:     lex.Pos.Offset,
				End:     lex.Pos.Offset + len(lex.Text) - 1,
				NewText: []byte(expected),
			}
		})
		if err != nil {
			panic(err)
		}
	}
	return false
}
func ( v * fieldNamesLowerSnakeCaseVisitor ) VisitOneofField ( field * parser . OneofField ) bool { name := field . FieldName if ! strs . IsLowerSnakeCase ( name ) { expected := strs . ToLowerSnakeCase ( name ) v . AddFailuref ( field . Meta . Pos , " " , name , expected ) err := v . Fixer . SearchAndReplace ( field . Meta . Pos , func ( lex * lexer . Lexer ) fixer . TextEdit { parseType ( lex ) lex . Next ( ) return fixer . TextEdit { Pos : lex . Pos . Offset , End : lex . Pos . Offset + len ( lex . Text ) - 1 , NewText : [ ] byte ( expected ) , } } ) if err != nil { panic ( err ) } } return false }
VisitOneofField checks the oneof field.
VisitOneofField checks the oneof field .