Repository Analysis

ent/ent

An entity framework for Go

1.1 Likely human-written View on GitHub
1.1
Adjusted Score
1.1
Raw Score
100%
Time Factor
2026-05-30
Last Push
17,097
Stars
Go
Language
709,481
Lines of Code
2480
Files
799
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 1HIGH 0MEDIUM 0LOW 798

Pattern Findings

799 matches across 3 categories. Click a row to expand file-level details.

Over-Commented Block791 hits · 788 pts
SeverityFileLineSnippet
LOWent.go21 //
LOWent.go41 Type()
LOWent.go61 // the schema.
LOWent.go81 // field.Int("int"),
LOWent.go101
LOWent.go121 // Table: "Name",
LOWent.go141 // other methods in the schema without calling them directly.
LOWent.go161 // return []ent.Mixin{
LOWent.go181 Policy() Policy
LOWent.go201 }
LOWent.go281 // The second boolean value indicates that this field was
LOWent.go301 // ClearedFields returns all nullable fields that were cleared
LOWent.go321 AddedIDs(name string) []Value
LOWent.go341 // given edge name. It returns an error if the edge is not
LOWent.go361 Mutate(context.Context, Mutation) (Value, error)
LOWent.go401 // function as Querier. If f is a function with the appropriate signature,
LOWent.go421 // Note that unlike Traverse functions, which are called at each traversal stage, Intercept functions
LOWent.go441 // query is executed. For example:
LOWschema/schema.go1// Copyright 2019-present Facebook Inc. All rights reserved.
LOWschema/edge/edge.go81 return &inverseBuilder{desc: &Descriptor{Name: name, Type: b.desc.Type, Inverse: true, Ref: b.desc}}
LOWschema/edge/edge.go181 return b
LOWschema/edge/annotation.go1// Copyright 2019-present Facebook Inc. All rights reserved.
LOWschema/field/annotation.go1// Copyright 2019-present Facebook Inc. All rights reserved.
LOWschema/field/annotation.go21 StructTag map[string]string
LOWschema/field/field.go161 }}
LOWschema/field/field.go441// field.Time("created_at").
LOWschema/field/field.go581 return b
LOWschema/field/field.go721// Operation fails if the length of the buffer is zero.
LOWschema/field/field.go861 return b
LOWschema/field/field.go1041 b.desc.Enums = append(b.desc.Enums, struct{ N, V string }{N: v, V: v})
LOWschema/field/field.go1241 b.desc.Default = fn
LOWschema/field/field.go1301}
LOWschema/field/field.go1381 return b
LOWschema/field/numeric.go241}
LOWschema/field/numeric.go261// GoType(pkg.Int(0))
LOWschema/field/numeric.go441}
LOWschema/field/numeric.go641// GoType overrides the default Go type with a custom one.
LOWschema/field/numeric.go841// and no validators have been set, the type validator will
LOWschema/field/numeric.go1021 b.desc.StorageKey = key
LOWschema/field/numeric.go1041//
LOWschema/field/numeric.go1221}
LOWschema/field/numeric.go1241// GoType(pkg.Int64(0))
LOWschema/field/numeric.go1421}
LOWschema/field/numeric.go1601//
LOWschema/field/numeric.go1801// and no validators have been set, the type validator will
LOWschema/field/numeric.go1981// })
LOWschema/field/numeric.go2181// SchemaType overrides the default database type with a custom
LOWschema/field/numeric.go2201//
LOWschema/field/numeric.go2381// dialect.Postgres: "numeric(5, 2)",
LOWschema/index/index.go21}
LOWschema/index/index.go41}
LOWschema/index/index.go61// func (T) Indexes() []ent.Index {
LOWschema/index/index.go101}
LOWexamples/entcpkg/ent/entc.go41 ),
LOWexamples/entcpkg/ent/user_query.go261}
LOWexamples/entcpkg/ent/user_query.go281 grbuild.label = user.Label
LOWexamples/entcpkg/ent/tx.go41 // CommitHook defines the "commit middleware". A function that gets a Committer
LOWexamples/entcpkg/ent/tx.go101 // return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error {
LOWexamples/entcpkg/ent/migrate/migrate.go21 // for the ids of each entity (table).
LOWexamples/entcpkg/ent/migrate/migrate.go61// WriteTo writes the schema changes to w instead of running them against the database.
731 more matches not shown…
Hallucination Indicators1 hit · 10 pts
SeverityFileLineSnippet
CRITICALschema/field/field.go1172 if b.desc.Err == nil && b.desc.Info.RType.rtype.Kind() != reflect.String && !b.desc.Info.Stringer() {
Fake / Example Data7 hits · 9 pts
SeverityFileLineSnippet
LOWdoc/md/tutorial-grpc-optional-fields.md90 Alias: wrapperspb.String("John Doe"),
LOWdialect/sql/builder_test.go1894 Values("1", "user@example.com", 1633279231).
LOWdialect/sql/builder_test.go1909 require.Equal(t, []any{"1", "user@example.com", 1633279231, "Ariel", 1, 0}, args)
LOWdialect/sql/builder_test.go1966 Values("1", "user@example.com").
LOWdialect/sql/builder_test.go1972 require.Equal(t, []any{"1", "user@example.com"}, args)
LOWdialect/sql/builder_test.go1977 Values("1", "user@example.com").
LOWdialect/sql/builder_test.go1983 require.Equal(t, []any{"1", "user@example.com"}, args)