Repository Analysis

slint-ui/slint

Slint is an open-source declarative GUI toolkit to build native user interfaces for Rust, C++, JavaScript, or Python apps.

2.2 Likely human-written View on GitHub
2.2
Adjusted Score
2.2
Raw Score
100%
Time Factor
2026-05-30
Last Push
22,729
Stars
Rust
Language
373,996
Lines of Code
1611
Files
756
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 2HIGH 0MEDIUM 20LOW 734

Pattern Findings

756 matches across 13 categories. Click a row to expand file-level details.

Over-Commented Block575 hits · 564 pts
SeverityFileLineSnippet
LOW.clippy.toml1# Copyright © SixtyFPS GmbH <info@slint.dev>
LOWtools/lsp/preview.rs81
LOWtools/lsp/language.rs241 #[allow(unused)]
LOWtools/lsp/fmt/fmt.rs1521}
LOWtools/lsp/preview/debug.rs101
LOWtools/lsp/preview/outline.rs21trait Tree {
LOW…s/lsp/preview/connector/remote/remote_notifications.rs1// Copyright © SixtyFPS GmbH <info@slint.dev>
LOWtools/slintpad/playwright.config.ts61 },
LOWtools/slintpad/tests/populate-command.spec.ts1// Copyright © SixtyFPS GmbH <info@slint.dev>
LOWtools/viewer/main.rs61 #[arg(short = 'L', value_name = "library=path", number_of_values = 1, action)]
LOWtools/viewer/main.rs101 #[arg(long, value_name = "json file", action)]
LOWtools/viewer/ci_scripts/ci_post_clone.sh1#!/bin/bash
LOWtools/compiler/main.rs41 /// Embed in a format optimized for the software renderer. This
LOWtools/compiler/main.rs61 #[cfg(feature = "slint-sc")]
LOWtools/compiler/main.rs81 #[arg(long, name = "style name")]
LOWtools/compiler/main.rs101 output: std::path::PathBuf,
LOWtools/figma-inspector/src/vite-env.d.ts1// Copyright © SixtyFPS GmbH <info@slint.dev>
LOWeditors/tree-sitter-slint/test-to-corpus.py1#!/usr/bin/env python3
LOWeditors/vscode/src/lsp_commands.ts1// Copyright © SixtyFPS GmbH <info@slint.dev>
LOWeditors/vscode/src/snippets.ts1// Copyright © Danny Tuppeny <danny@tuppeny.com>
LOWtests/driver/rust/template.rs1// Copyright © SixtyFPS GmbH <info@slint.dev>
LOWtests/driver/rust/tests/crashes.rs1// Copyright © SixtyFPS GmbH <info@slint.dev>
LOWtests/driver/rust/tests/widgets-fluent.rs1// Copyright © SixtyFPS GmbH <info@slint.dev>
LOWtests/driver/rust/tests/imports.rs1// Copyright © SixtyFPS GmbH <info@slint.dev>
LOWtests/driver/rust/tests/types.rs1// Copyright © SixtyFPS GmbH <info@slint.dev>
LOWtests/driver/rust/tests/elements.rs1// Copyright © SixtyFPS GmbH <info@slint.dev>
LOWtests/driver/rust/tests/layout.rs1// Copyright © SixtyFPS GmbH <info@slint.dev>
LOWtests/driver/rust/tests/lookup.rs1// Copyright © SixtyFPS GmbH <info@slint.dev>
LOWtests/driver/rust/tests/translations.rs1// Copyright © SixtyFPS GmbH <info@slint.dev>
LOWtests/driver/rust/tests/globals.rs1// Copyright © SixtyFPS GmbH <info@slint.dev>
LOWtests/driver/rust/tests/children.rs1// Copyright © SixtyFPS GmbH <info@slint.dev>
LOWtests/driver/rust/tests/properties.rs1// Copyright © SixtyFPS GmbH <info@slint.dev>
LOWtests/driver/rust/tests/models.rs1// Copyright © SixtyFPS GmbH <info@slint.dev>
LOWtests/driver/rust/tests/exports.rs1// Copyright © SixtyFPS GmbH <info@slint.dev>
LOWtests/driver/rust/tests/widgets-material.rs1// Copyright © SixtyFPS GmbH <info@slint.dev>
LOWtests/driver/rust/tests/interfaces.rs1// Copyright © SixtyFPS GmbH <info@slint.dev>
LOWtests/driver/rust/tests/issues.rs1// Copyright © SixtyFPS GmbH <info@slint.dev>
LOWtests/driver/rust/tests/widgets-cupertino.rs1// Copyright © SixtyFPS GmbH <info@slint.dev>
LOWtests/driver/rust/tests/expr.rs1// Copyright © SixtyFPS GmbH <info@slint.dev>
LOWtests/driver/rust/tests/focus.rs1// Copyright © SixtyFPS GmbH <info@slint.dev>
LOWtests/driver/rust/tests/accessibility.rs1// Copyright © SixtyFPS GmbH <info@slint.dev>
LOWtests/driver/rust/tests/conditional.rs1// Copyright © SixtyFPS GmbH <info@slint.dev>
LOWtests/driver/rust/tests/widgets-cosmic.rs1// Copyright © SixtyFPS GmbH <info@slint.dev>
LOWtests/driver/rust/tests/testing.rs1// Copyright © SixtyFPS GmbH <info@slint.dev>
LOWtests/driver/rust/tests/widgets-qt.rs1// Copyright © SixtyFPS GmbH <info@slint.dev>
LOWtests/driver/rust/tests/subcomponents.rs1// Copyright © SixtyFPS GmbH <info@slint.dev>
LOWtests/driver/rust/tests/callbacks.rs1// Copyright © SixtyFPS GmbH <info@slint.dev>
LOWtests/driver/rust/tests/text.rs1// Copyright © SixtyFPS GmbH <info@slint.dev>
LOWtests/driver/rust/tests/7guis.rs1// Copyright © SixtyFPS GmbH <info@slint.dev>
LOWtests/driver/rust/tests/input.rs1// Copyright © SixtyFPS GmbH <info@slint.dev>
LOWtests/driver/rust/tests/examples.rs1// Copyright © SixtyFPS GmbH <info@slint.dev>
LOWtests/driver/rust/tests/bindings.rs1// Copyright © SixtyFPS GmbH <info@slint.dev>
LOWinternal/interpreter/ffi.rs681}
LOWinternal/interpreter/dynamic_type.rs21}
LOWinternal/interpreter/api.rs81 }
LOWinternal/interpreter/api.rs101 #[default]
LOWinternal/interpreter/api.rs121 /// An easing curve
LOWinternal/interpreter/api.rs621 as *const VecModel<SharedString>
LOWinternal/interpreter/api.rs641/// use core::convert::TryInto;
LOWinternal/interpreter/api.rs721 /// Use the "material" style as widget style when compiling:
515 more matches not shown…
Hyper-Verbose Identifiers74 hits · 82 pts
SeverityFileLineSnippet
LOWtools/figma-inspector/backend/utils/export-variables.ts134async function followChainToConcreteValue(
LOWtools/figma-inspector/backend/utils/export-variables.ts273function generateStructsAndInstances(
LOWtools/figma-inspector/backend/utils/export-variables.ts815export async function exportFigmaVariablesToSeparateFiles(
LOWtools/figma-inspector/backend/utils/property-parsing.ts398export function generateUnsupportedNodeSnippet(sceneNode: SceneNode): string {
LOWeditors/vscode/src/common.ts81export function updateRemoteViewerStatusBarItem(newItem: vscode.StatusBarItem) {
LOWeditors/vscode/src/common.ts89export function setRemoteViewerStatusBarItemState(
LOWeditors/vscode/src/common.ts406async function maybeSendStartupTelemetryEvent(
LOWdocs/python/tests/test_gen_mdx.py34def test_parse_inventory_keeps_only_py_type_roles():
LOWdocs/python/tests/test_gen_mdx.py53def test_docstring_to_mdx_links_escapes_and_preserves_code():
LOWdocs/python/tests/test_gen_mdx.py70def test_render_annotation_forward_ref_string():
LOWdocs/python/tests/test_gen_mdx.py103def test_collect_pages_routes_by_kind_and_respects_all(sample):
LOWdocs/python/tests/test_gen_mdx.py120def test_class_members_inherit_and_hide(sample):
LOWdocs/python/tests/test_gen_mdx.py131def test_generic_title_and_docstring_links(sample):
LOWdocs/python/tests/test_gen_mdx.py139def test_import_statement_top_level(sample):
LOWdocs/python/tests/test_gen_mdx.py150def test_import_statement_submodule(sample):
LOWdocs/common/src/utils/thirdparty.ts76export function generateThirdPartyMarkdown(options: {
LOW…ommon/src/utils/starlight-expand-all-sidebar-groups.ts21export function starlightExpandAllSidebarGroups() {
LOWdocs/common/src/utils/starlight-site-defaults.ts14export function slintStarlightMarkdownRehypeExternalLinksOnly() {
LOWdocs/common/src/utils/starlight-site-defaults.ts23export function slintStarlightLinksValidatorPlugin(
LOWdocs/common/src/utils/starlight-favicon-head.ts13export function slintStarlightFaviconHead(
LOWdocs/common/src/testing/playwright-starlight-base.ts8export function starlightPlaywrightProjects(): PlaywrightTestConfig["projects"] {
LOWdocs/common/src/testing/playwright-starlight-base.ts21export function starlightPlaywrightSharedOptions(
LOWdocs/astro/src/components/editor/codemirror.js161function initializePreviewContainers(previewContainer, _content) {
LOWexamples/system_tray/main.py59 def tray_menu_enabled_changed(self, value: bool) -> None:
LOWapi/python/slint/tests/test_load_file.py99def test_system_tray_has_no_window_attribute() -> None:
LOWapi/python/slint/tests/test_logical_position.py13def test_logical_position_construct_and_access() -> None:
LOWapi/python/slint/tests/test_logical_position.py20def test_logical_position_defaults_to_zero() -> None:
LOWapi/python/slint/tests/test_logical_position.py26def test_logical_position_equality_and_hash() -> None:
LOWapi/python/slint/tests/test_logical_position.py35def test_logical_position_repr() -> None:
LOWapi/python/slint/tests/test_logical_position.py39def test_logical_size_construct_and_access() -> None:
LOWapi/python/slint/tests/test_logical_position.py46def test_logical_size_defaults_to_zero() -> None:
LOWapi/python/slint/tests/test_logical_position.py52def test_round_trip_through_slint_property(tmp_path: Path) -> None:
LOWapi/python/slint/tests/test_int_types.py26def test_callback_int_arg_is_int_in_python() -> None:
LOWapi/python/slint/tests/test_int_types.py51def test_callback_int_return_round_trips_as_int() -> None:
LOWapi/python/slint/tests/test_int_types.py67def test_invoke_function_returning_int() -> None:
LOWapi/python/slint/tests/test_int_types.py86def test_struct_int_field_in_callback_arg() -> None:
LOWapi/python/slint/tests/test_int_types.py104def test_global_callback_int_arg_is_int() -> None:
LOWapi/python/slint/tests/test_int_types.py121def test_int_property_get_returns_int() -> None:
LOWapi/python/slint/tests/test_int_types.py138def test_int_property_set_then_get_returns_int() -> None:
LOWapi/python/slint/tests/test_int_types.py152def test_struct_int_field_preserves_type() -> None:
LOWapi/python/slint/tests/test_int_types.py168def test_int_model_iteration_yields_ints() -> None:
LOWapi/python/slint/tests/test_int_types.py181def test_struct_model_int_field_in_iteration() -> None:
LOWapi/python/slint/tests/test_int_types.py197def test_set_row_data_from_slint_preserves_int() -> None:
LOWapi/python/slint/tests/test_api_match.py51def test_incompatible_changes() -> None:
LOWapi/python/slint/tests/test_data_transfer.py22def test_plaintext_round_trip() -> None:
LOWapi/python/slint/tests/test_data_transfer.py29def test_set_plaintext_overwrites() -> None:
LOWapi/python/slint/tests/test_data_transfer.py48def test_user_data_round_trip_dict() -> None:
LOWapi/python/slint/tests/test_data_transfer.py58def test_user_data_round_trip_custom_class() -> None:
LOWapi/python/slint/tests/test_data_transfer.py71def test_user_data_overwrites() -> None:
LOWapi/python/slint/tests/test_data_transfer.py78def test_user_data_assign_none_clears() -> None:
LOWapi/python/slint/tests/test_data_transfer.py86def test_plaintext_and_user_data_coexist() -> None:
LOWapi/python/slint/tests/test_data_transfer.py113def test_user_data_cycle_is_collectable() -> None:
LOWapi/python/slint/tests/test_language_enums.py13def test_color_scheme_is_an_enum() -> None:
LOWapi/python/slint/tests/test_language_enums.py18def test_pointer_event_button_variants() -> None:
LOWapi/python/slint/tests/test_language_enums.py29def test_pointer_event_kind_variants() -> None:
LOWapi/python/slint/tests/test_language_enums.py33def test_color_scheme_round_trip(tmp_path: Path) -> None:
LOWapi/python/slint/tests/test_async.py167def test_loop_close_while_main_future_runs() -> None:
LOWapi/python/slint/tests/test_async.py185def test_loop_continues_when_main_coro_finished() -> None:
LOWapi/python/slint/tests/test_async.py265 def test_signal_wakes_idle_loop() -> None:
LOWapi/python/slint/tests/test_timers.py14 def quit_after_two_invocations() -> None:
14 more matches not shown…
Verbosity Indicators19 hits · 35 pts
SeverityFileLineSnippet
LOWtools/lsp/preview/eval.rs290/// The purpose of this function is to be able to show some not totally useless representation of
LOWinternal/core/graphics/brush.rs389 // Step 1: Apply rotation by adding from_angle and wrapping to [0, 1) range
LOWinternal/core/graphics/brush.rs401 // Step 2: Separate duplicate positions with different colors to avoid flickering
LOWinternal/core/graphics/brush.rs412 // Step 3: Sort by rotated position
LOWinternal/core/graphics/brush.rs417 // Step 4: Add boundary stops at 0.0 and 1.0 if missing
LOW…les/mcu-board-support/m5stack_cores3/m5stack_cores3.rs167 // Step 1: Configure charge LED (register 0x69 = 105 decimal)
LOW…les/mcu-board-support/m5stack_cores3/m5stack_cores3.rs174 // Step 2: Enable ALDO outputs (register 0x90 = 144 decimal)
LOW…les/mcu-board-support/m5stack_cores3/m5stack_cores3.rs181 // Step 3: Configure ALDO4 voltage (register 0x95 = 149 decimal)
LOW…les/mcu-board-support/m5stack_cores3/m5stack_cores3.rs201 // Step 1: Configure Port 0 Configuration (register 0x02) <- 0b00000101 (0x05)
LOW…les/mcu-board-support/m5stack_cores3/m5stack_cores3.rs208 // Step 2: Configure Port 1 Configuration (register 0x03) <- 0b00000011 (0x03)
LOW…les/mcu-board-support/m5stack_cores3/m5stack_cores3.rs215 // Step 3: Configure Port 0 Output (register 0x04) <- 0b00011000 (0x18)
LOW…les/mcu-board-support/m5stack_cores3/m5stack_cores3.rs222 // Step 4: Configure Port 1 Output (register 0x05) <- 0b00001100 (0x0C)
LOW…les/mcu-board-support/m5stack_cores3/m5stack_cores3.rs229 // Step 5: Configure register 0x11 <- 0b00010000 (0x10)
LOW…les/mcu-board-support/m5stack_cores3/m5stack_cores3.rs236 // Step 6: Configure register 0x13 <- 0b11111111 (0xFF)
LOWapi/slint-sc/tests/driver.rs141 // Step 1: Run slint-compiler
LOWapi/slint-sc/tests/driver.rs155 // Step 2: Extract test code from ```rust blocks in comments
LOWapi/slint-sc/tests/driver.rs163 // Step 3: Create test .rs file
LOWapi/slint-sc/tests/driver.rs178 // Step 4: Compile with rustc
LOWapi/slint-sc/tests/driver.rs206 // Step 5: Run the test binary
Fake / Example Data19 hits · 27 pts
SeverityFileLineSnippet
LOWdemos/printerdemo/node/main.js38 owner: "user@example.com",
LOWdemos/usecases/rust/src/lib.rs75 let message = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labo
LOWdemos/usecases/rust/src/lib.rs75 let message = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labo
LOWdemos/usecases/cpp/main.cpp22 "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do "
LOWdemos/usecases/cpp/main.cpp22 "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do "
LOWdemos/usecases/cpp/main.cpp27 "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do "
LOWdemos/usecases/cpp/main.cpp27 "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do "
LOWdemos/usecases/cpp/main.cpp32 "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do "
LOWdemos/usecases/cpp/main.cpp32 "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do "
LOWdemos/usecases/cpp/main.cpp37 "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do "
LOWdemos/usecases/cpp/main.cpp37 "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do "
LOWdemos/usecases/cpp/main.cpp42 "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do "
LOWdemos/usecases/cpp/main.cpp42 "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do "
LOWdemos/usecases/cpp/main.cpp47 "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do "
LOWdemos/usecases/cpp/main.cpp47 "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do "
LOWdemos/usecases/cpp/main.cpp52 "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do "
LOWdemos/usecases/cpp/main.cpp52 "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do "
LOWdemos/usecases/cpp/main.cpp57 "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do "
LOWdemos/usecases/cpp/main.cpp57 "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do "
Unused Imports24 hits · 24 pts
SeverityFileLineSnippet
LOWdocs/python/gen_mdx.py23
LOWdocs/astro/src/content/code/main_game_logic.py5
LOWdocs/astro/src/content/code/main_game_logic.py6
LOWdocs/astro/src/content/code/main_tiles_from_python.py5
LOWdocs/astro/src/content/code/main_tiles_from_python.py6
LOWdocs/astro/src/content/code/main_tiles_from_python.py10
LOWexamples/memory/main.py5
LOWexamples/memory/main.py6
LOWexamples/memory/main.py11
LOWexamples/memory/main.py11
LOWexamples/async-io/main.py5
LOWapi/python/slint/slint/__init__.py11
LOWapi/python/slint/slint/__init__.py19
LOWapi/python/slint/slint/__init__.py19
LOWapi/python/slint/slint/__init__.py20
LOWapi/python/slint/slint/__init__.py20
LOWapi/python/slint/slint/__init__.py20
LOWapi/python/slint/slint/__init__.py20
LOWapi/python/slint/slint/__init__.py20
LOWapi/python/slint/slint/__init__.py20
LOWapi/python/slint/slint/__init__.py20
LOWapi/python/slint/slint/__init__.py20
LOWapi/python/slint/slint/__init__.py20
LOWapi/python/slint/slint/__init__.py20
Decorative Section Separators5 hits · 22 pts
SeverityFileLineSnippet
MEDIUMtools/lsp/preview.rs88/// ┌─────────────┐
MEDIUMtools/lsp/preview.rs90/// │ └─────────────┘ │
MEDIUMtools/lsp/preview.rs92/// ┌─────────────┐ ┌─────────────┐ ┌─────────────┐
MEDIUMtools/lsp/preview.rs94/// └─────────────┘ └─────────────┘ └─────────────┘
MEDIUMtools/lsp/preview.rs97/// └───────────────────────────────────────┘
Hallucination Indicators2 hits · 20 pts
SeverityFileLineSnippet
CRITICALinternal/interpreter/dynamic_item_tree.rs2093 for extra_init_code in self.0.description.original.init_code.borrow().iter() {
CRITICALapi/python/slint/tests/test_loader.py19 instance = loader.demos.printerdemo.ui.printerdemo.MainWindow()
Excessive Try-Catch Wrapping14 hits · 18 pts
SeverityFileLineSnippet
LOWinternal/core/gdb_pretty_printers.py17 except Exception as e:
LOWinternal/core/gdb_pretty_printers.py32 except Exception as e:
LOWinternal/core/gdb_pretty_printers.py84 except Exception as e:
LOWinternal/core/gdb_pretty_printers.py97 except Exception as e:
MEDIUMinternal/core/gdb_pretty_printers.py13def to_string(self):
MEDIUMinternal/core/gdb_pretty_printers.py20def children(self):
MEDIUMinternal/core/gdb_pretty_printers.py81def to_string(self):
MEDIUMinternal/core/gdb_pretty_printers.py87def children(self):
LOWdocs/python/gen_mdx.py264 except Exception:
LOWapi/python/slint/tests/test_async.py66 except Exception as e:
LOWapi/python/slint/tests/test_async.py157 except Exception as e:
LOWapi/python/slint/tests/test_async.py181 except Exception:
LOWapi/python/slint/tests/test_async.py220 except Exception as e:
LOWdemos/printerdemo/python/main.py77 except Exception:
Slop Phrases7 hits · 14 pts
SeverityFileLineSnippet
LOWinternal/core/items.rs16 - Don't forget to update the documentation
LOWinternal/core/model.rs87/// // don't forget to call row_changed
LOWinternal/backends/qt/qt_widgets.rs16 - Don't forget to update the documentation
MEDIUMexamples/slide_puzzle/index.html42 build is done for demonstration purposes. Native applications are the real target of the toolkit.
MEDIUMui-libraries/material/docs/src/config.yaml50 pathname: 'blog' # Blog main path, you can change this to "articles" (/articles)
MEDIUMui-libraries/material/docs/src/config.yaml56 pathname: 'category' # Category main path /category/some-category, you can change this to "group" (/group/some-cat
MEDIUMui-libraries/material/docs/src/config.yaml62 pathname: 'tag' # Tag main path /tag/some-tag, you can change this to "topics" (/topics/some-category)
AI Slop Vocabulary4 hits · 9 pts
SeverityFileLineSnippet
LOWtests/backends/Cargo.toml19# the right backend and doesn't accidentally just use the default backend!
MEDIUMtests/backends/Cargo.toml27# Unfortunately we need to provide our own test harness, so that we can run each test in a separate process and on the m
MEDIUM.github/workflows/node_test_reusable.yaml57 # Release is only applied to the harness that drives the node.js invocations, but needed
LOWapi/rs/slint/Cargo.toml66## environment, we need a replacement. Using this feature, Slint will just use static variable
Self-Referential Comments5 hits · 8 pts
SeverityFileLineSnippet
MEDIUMtests/driver/python/python.rs94 pop_front_if("# This file is auto-generated");
MEDIUMinternal/compiler/generator/python.rs425 writeln!(f, "# This file is auto-generated\n")?;
MEDIUMapi/python/slint/slint/__init__.py309 """This function is the low-level entry point into Slint for instantiating components. It loads the `.slint` file at
MEDIUMapi/python/slint/slint/__init__.py385 """This function is the low-level entry point into Slint for instantiating components. It loads the `.slint` file at
MEDIUMxtask/src/license_headers_check.rs173 let end_line = "# This file is distributed under the same license as the ";
Deep Nesting7 hits · 7 pts
SeverityFileLineSnippet
LOWeditors/tree-sitter-slint/test-to-corpus.py32
LOWinternal/core/gdb_pretty_printers.py39
LOWdocs/python/gen_mdx.py183
LOWdocs/python/gen_mdx.py503
LOWapi/python/slint/slint/__init__.py157
LOWapi/python/slint/slint/__init__.py299
LOWapi/python/slint/slint/__init__.py160
Example Usage Blocks1 hit · 2 pts
SeverityFileLineSnippet
LOWeditors/tree-sitter-slint/test-to-corpus.py7# Usage: