Repository Analysis

diesel-rs/diesel

A safe, extensible ORM and Query Builder for Rust

7.1 Low AI signal View on GitHub
7.1
Adjusted Score
7.1
Raw Score
100%
Time Factor
2026-05-30
Last Push
14,076
Stars
Rust
Language
164,017
Lines of Code
1142
Files
1476
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 0MEDIUM 8LOW 1468

Pattern Findings

1476 matches across 7 categories. Click a row to expand file-level details.

Over-Commented Block1455 hits · 1119 pts
SeverityFileLineSnippet
LOWdiesel_infer_query/src/query_source.rs1// This Source Code Form is subject to the terms of the Mozilla Public
LOWdiesel_infer_query/src/query_source.rs21/// This information is relevant to
LOWdiesel_infer_query/src/query_source.rs41 /// source lookup map
LOWdiesel_infer_query/src/error.rs1// This Source Code Form is subject to the terms of the Mozilla Public
LOWdiesel_infer_query/src/views.rs21 pub fn field_count(&self) -> usize {
LOW.config/nextest.toml21# statements straddling a second boundary;
LOWguide_drafts/trait_derives.md221}
LOWdiesel_compile_tests/tests/trybuild.rs21 // would leak into the blessed `.stderr` files. Map the actual target
LOW…ests/tests/fail/array_expressions_must_be_same_type.rs21 //~^ ERROR: cannot select `f64` from `diesel::query_builder::from_clause::NoFromClause`
LOW…ests/fail/right_side_of_left_join_requires_nullable.rs41 let join = users::table.left_outer_join(posts::table);
LOW…ests/fail/right_side_of_left_join_requires_nullable.rs141 //~^ ERROR: type mismatch resolving `<table as AppearsInFromClause<table>>::Count == Never`
LOW…select_for_update_cannot_be_mixed_with_some_clauses.rs21 //~| ERROR: the trait bound `SelectStatement<FromClause<...>>: LockingDsl<...>` is not satisfied
LOW…select_for_update_cannot_be_mixed_with_some_clauses.rs41 //~| ERROR: the trait bound `SelectStatement<FromClause<...>>: LockingDsl<...>` is not satisfied
LOW…ail/custom_returning_requires_selectable_expression.rs41 //~^ ERROR: cannot select `bad::columns::age` from `ReturningQuerySource<..., ...>`
LOW…indow_functions_expression_requires_window_function.rs21 users::table.select(lower(users::name).over());
LOW…indow_functions_expression_requires_window_function.rs41 //~| ERROR: `diesel::sql_types::Text` is neither `diesel::sql_types::Range<_>` nor `diesel::sql_types::Multirange<_>
LOW…ggregate_expression_requires_column_from_same_table.rs21 let source = users::table.select(sum(posts::id));
LOWdiesel_compile_tests/tests/fail/selectable.rs201 //~| ERROR: the trait bound `ReturningQuerySource<..., ...>: TableNotEqual<...>` is not satisfied
LOWdiesel_compile_tests/tests/fail/selectable.rs221 .load(&mut conn)
LOW…compile_tests/tests/fail/find_requires_correct_type.rs21 //~^ ERROR: the trait bound `str: Expression` is not satisfied
LOW…s/fail/derive/belongs_to_missing_foreign_key_column.rs21#[derive(Associations)]
LOW…sts/tests/fail/derive/identifiable_missing_pk_field.rs21}
LOW…esel_compile_tests/tests/fail/derive/bad_belongs_to.rs61#[diesel(belongs_to(Bar = "bar_id"))]
LOWdiesel_compile_tests/tests/fail/derive/empty_struct.rs21//~^ ERROR: this derive can only be used on non-unit structs
LOW…l_compile_tests/tests/fail/derive/bad_postgres_type.rs21#[diesel(postgres_type(name))]
LOW…l_compile_tests/tests/fail/derive/bad_postgres_type.rs41#[diesel(postgres_type(name = "foo", array_oid = 3))]
LOW…l_compile_tests/tests/fail/derive/bad_postgres_type.rs61#[diesel(postgres_type(schema = "foo"))]
LOWdiesel_compile_tests/tests/fail/derive/bad_sql_type.rs1extern crate diesel;
LOW…esel_compile_tests/tests/fail/derive/bad_mysql_type.rs21#[diesel(mysql_type(name))]
LOWdiesel_compile_tests/tests/fail/derive/has_query.rs41 //~| ERROR: the trait bound `std::string::String: FromSqlRow<diesel::sql_types::Integer, Pg>` is not satisfied
LOW…sel_compile_tests/tests/fail/derive/bad_sqlite_type.rs21#[diesel(sqlite_type(name))]
LOW…ts/fail/derive/belongs_to_missing_foreign_key_field.rs1#[macro_use]
LOW…sel_compile_tests/tests/fail/derive/bad_column_name.rs21#[derive(Queryable)]
LOW…tests/fail/derive_deprecated/deprecated_column_name.rs21#[derive(AsChangeset)]
LOW…sts/fail/derive_deprecated/deprecated_postgres_type.rs21#[postgres(type_name)]
LOW…sts/fail/derive_deprecated/deprecated_postgres_type.rs41#[postgres(type_name = "foo", array_oid = "3")]
LOW…ts/tests/fail/derive_deprecated/deprecated_sql_type.rs1#[macro_use]
LOW…/tests/fail/derive_deprecated/deprecated_belongs_to.rs21
LOW…/tests/fail/derive_deprecated/deprecated_belongs_to.rs61#[derive(Associations)]
LOW…/tests/fail/derive_deprecated/deprecated_belongs_to.rs101#[belongs_to(Bar, what)]
LOWdiesel_dynamic_schema/src/dynamic_value.rs1//! This module provides a container that allows to receive a dynamically
LOWdiesel_dynamic_schema/src/dynamic_value.rs21//! #
LOWdiesel_dynamic_schema/src/dynamic_value.rs41//! # }
LOWdiesel_dynamic_schema/src/dynamic_value.rs61//! #
LOWdiesel_dynamic_schema/src/dynamic_value.rs81//! #
LOWdiesel_dynamic_schema/src/dynamic_value.rs101//! );
LOWdiesel_dynamic_schema/src/dynamic_value.rs121//! #[derive(PartialEq, Debug)]
LOWdiesel_dynamic_schema/src/dynamic_value.rs141//! }
LOWdiesel_dynamic_schema/src/lib.rs1//! # Diesel dynamic schema
LOWdiesel_dynamic_schema/src/lib.rs21//! for actually exist, or that the types you state are correct.
LOWdiesel_dynamic_schema/src/lib.rs41//! #
LOWdiesel_dynamic_schema/src/lib.rs61//! #
LOWdiesel_dynamic_schema/src/lib.rs101///
LOWdiesel_dynamic_schema/src/table.rs41 }
LOWdiesel_dynamic_schema/src/table.rs61 /// assert_eq!(table_with_schema.name(), &"posts");
LOWdsl_auto_type/src/auto_type/local_variables_map.rs121 LetStatementInferredType {
LOWdiesel/src/data_types.rs1//! Structs to represent the primitive equivalent of SQL types where
LOWdiesel/src/reexport_ambiguities.rs1// This macro exists to workaround
LOWdiesel/src/backend.rs21/// A database backend
LOWdiesel/src/backend.rs41/// details how the newly implemented backend may communicate with diesel. As of this,
1395 more matches not shown…
Decorative Section Separators5 hits · 20 pts
SeverityFileLineSnippet
MEDIUM.github/dependabot.yml3 # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
MEDIUM.github/dependabot.yml5 # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
MEDIUM.github/dependabot.yml28 # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
MEDIUM.github/dependabot.yml30 # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
MEDIUM.github/dependabot.yml38 # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Fake / Example Data8 hits · 12 pts
SeverityFileLineSnippet
LOWdiesel/src/sqlite/connection/mod.rs660 /// sql_query("INSERT INTO users (name, email) VALUES ('John Doe', 'john.doe@example.com'), ('Jane Doe', 'jane.doe@e
LOWdiesel/src/sqlite/connection/mod.rs660 /// sql_query("INSERT INTO users (name, email) VALUES ('John Doe', 'john.doe@example.com'), ('Jane Doe', 'jane.doe@e
LOWdiesel/src/sqlite/connection/mod.rs1141 "John Doe".to_string(),
LOWdiesel/src/sqlite/connection/mod.rs1146 "Jane Doe".to_string(),
LOWdiesel/src/sqlite/connection/mod.rs1155 let _ = crate::sql_query("INSERT INTO users (name, email) VALUES ('John Doe', 'john.doe@example.com'), ('Jane Do
LOWdiesel/src/sqlite/connection/mod.rs1155 let _ = crate::sql_query("INSERT INTO users (name, email) VALUES ('John Doe', 'john.doe@example.com'), ('Jane Do
LOWdiesel/src/expression/mod.rs1048/// .select(selection(NameOrConst::Const("Jane Doe".into())))
LOWdiesel/src/expression/mod.rs1050/// assert_eq!(String::from("Jane Doe"), with_name);
AI Slop Vocabulary2 hits · 6 pts
SeverityFileLineSnippet
MEDIUMdiesel/src/connection/statement_cache/mod.rs401/// Essentially a customized version of [`Cow`]
MEDIUMdiesel_derives/src/sql_function.rs1325/// Essentially the same as ArgCaptured, but only allowing ident patterns
Example Usage Blocks4 hits · 6 pts
SeverityFileLineSnippet
LOWdiesel/src/query_source/aliasing/macros.rs5/// Example usage
LOWdiesel/src/expression/operators.rs210/// ## Example usage
LOWdiesel_derives/src/lib.rs1306/// Example usage
LOWdiesel_derives/src/lib.rs1569/// Example usage
Self-Referential Comments1 hit · 3 pts
SeverityFileLineSnippet
MEDIUM.github/workflows/release.yml287 # Create a GitHub Release while uploading all files to it
Hyper-Verbose Identifiers1 hit · 1 pts
SeverityFileLineSnippet
LOWexamples/sqlite/wasm/server.py5class RequestHandler(SimpleHTTPRequestHandler):