Repository Analysis

siyuan-note/siyuan

A privacy-first, self-hosted, fully open source personal knowledge management software, written in typescript and golang.

9.6 Low AI signal View on GitHub
9.6
Adjusted Score
9.6
Raw Score
100%
Time Factor
2026-05-30
Last Push
44,199
Stars
TypeScript
Language
332,815
Lines of Code
1393
Files
537
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 253HIGH 2MEDIUM 6LOW 276

Pattern Findings

537 matches across 8 categories. Click a row to expand file-level details.

Hallucination Indicators253 hits · 2905 pts
SeverityFileLineSnippet
CRITICALapp/stage/protyle/js/echarts/echarts-gl.min.js1!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("echarts")):"function"==typeof
CRITICALapp/src/card/openCard.ts868 options.editor.protyle.element.classList.remove("fn__none");
CRITICALapp/src/card/openCard.ts869 options.editor.protyle.element.nextElementSibling.classList.add("fn__none");
CRITICALapp/src/card/viewCards.ts296 edit.protyle.element.nextElementSibling.classList.remove("fn__none");
CRITICALapp/src/card/viewCards.ts300 edit.protyle.element.nextElementSibling.classList.add("fn__none");
CRITICALapp/src/boot/onGetConfig.ts219 if (window.siyuan.config.export.pdfFooter.trim()) {
CRITICALapp/src/boot/globalEvent/keyup.ts21 if (window.siyuan.config.keymap.general.goToEditTabNext.custom.endsWith(Constants.KEYCODELIST[event.keyCode]) ||
CRITICALapp/src/boot/globalEvent/keyup.ts22 window.siyuan.config.keymap.general.goToEditTabPrev.custom.endsWith(Constants.KEYCODELIST[event.keyCode])) {
CRITICALapp/src/boot/globalEvent/keyup.ts95 } else if (window.siyuan.config.keymap.general.goToEditTabNext.custom.startsWith(Constants.KEYCODELIST[event.key
CRITICALapp/src/boot/globalEvent/keyup.ts96 window.siyuan.config.keymap.general.goToEditTabPrev.custom.startsWith(Constants.KEYCODELIST[event.keyCode]))
CRITICALapp/src/boot/globalEvent/mousemove.ts67 item.protyle.breadcrumb.element.classList.remove("protyle-breadcrumb__bar--hide");
CRITICALapp/src/boot/globalEvent/mousemove.ts181 if (item.editor.protyle.wysiwyg.element.contains(eventPath0)) {
CRITICALapp/src/boot/globalEvent/keydown.ts1427 if (!window.siyuan.menus.menu.element.classList.contains("fn__none")) {
CRITICALapp/src/boot/globalEvent/searchKeydown.ts83 if (!window.siyuan.menus.menu.element.classList.contains("fn__none")) {
CRITICALapp/src/boot/globalEvent/searchKeydown.ts212 if (!window.siyuan.menus.menu.element.classList.contains("fn__none")) {
CRITICALapp/src/boot/globalEvent/searchKeydown.ts245 currentList.parentElement.nextElementSibling.nextElementSibling.firstElementChild.classList.add("b3-
CRITICALapp/src/boot/globalEvent/searchKeydown.ts282 currentList.parentElement.previousElementSibling.previousElementSibling.lastElementChild.classList.a
CRITICALapp/src/boot/globalEvent/click.ts13 if (!window.siyuan.menus.menu.element.contains(element) && !hasClosestByAttribute(element, "data-menu", "true")) {
CRITICALapp/src/boot/globalEvent/click.ts14 if (getSelection().rangeCount > 0 && window.siyuan.menus.menu.element.contains(getSelection().getRangeAt(0).star
CRITICALapp/src/boot/globalEvent/click.ts15 window.siyuan.menus.menu.element.contains(document.activeElement)) {
CRITICALapp/src/boot/globalEvent/click.ts78 !item.pdfObject.appConfig.appContainer.classList.contains("fn__none")) {
CRITICALapp/src/boot/globalEvent/command/panel.ts445 if (protyle.title?.editElement.contains(range.startContainer) || !nodeElement || window.siyuan.menus.men
CRITICALapp/src/boot/globalEvent/command/protyle.ts18 updateReadonly(options.protyle.breadcrumb.element.parentElement.querySelector('.block__icon[data-type="readonly"
CRITICALapp/src/asset/pdf/app.js2831 if (([92, 91, 68].includes(evt.keyCode) || evt.ctrlKey || evt.altKey) && pdfInstance.appConfig.toolbar.rectAnno.clas
CRITICALapp/src/asset/pdf/app.js2870 !pdfInstance.appConfig.toolbar.rectAnno.classList.contains('toggled')) {
CRITICALapp/src/asset/pdf/app.js2880 !pdfInstance.appConfig.toolbar.rectAnno.classList.contains('toggled')) {
CRITICALapp/src/util/pathName.ts383 if (window.siyuan.menus.menu.element.getAttribute("data-name") === Constants.MENU_MOVE_PATH_HISTORY) {
CRITICALapp/src/util/noRelyPCFunction.ts64 window.siyuan.mobile.docks.tag.update();
CRITICALapp/src/util/noRelyPCFunction.ts123 return pathPosix().basename(window.siyuan.config.system.workspaceDir.replace(/\\/g, "/"));
CRITICALapp/src/util/backForward.ts118 stack.protyle.model.parent.parent.switchTab(stack.protyle.model.parent.headElement);
CRITICALapp/src/util/backForward.ts136 stack.protyle.model.parent.parent.switchTab(stack.protyle.model.parent.headElement);
CRITICALapp/src/util/backForward.ts157 if (!blockElement && !stack.zoomId && !stack.protyle.scroll.element.classList.contains("fn__none")) {
CRITICALapp/src/util/Tree.ts314 item.parentElement.parentElement.nextElementSibling.classList.remove("fn__none");
CRITICALapp/src/util/Tree.ts319 item.parentElement.parentElement.nextElementSibling.classList.add("fn__none");
CRITICALapp/src/config/publish.ts97 window.siyuan.config.publish.auth.accounts.push({
CRITICALapp/src/config/publish.ts207 window.siyuan.config.publish.auth.accounts.splice(index, 1);
CRITICALapp/src/config/editor.ts416 spellcheckLanguagesHTML += `<div class="fn__pointer b3-chip b3-chip--middle${window.siyuan.config.editor.spe
CRITICALapp/src/config/editor.ts593 let isFullWidth = item.editor.protyle.wysiwyg.element.getAttribute(Constants.CUSTOM_SY_FULLWIDTH);
CRITICALapp/src/config/util/snippets.ts141 target.parentElement.nextElementSibling.firstElementChild.classList.remove("fn__none");
CRITICALapp/src/config/util/snippets.ts142 target.parentElement.nextElementSibling.lastElementChild.classList.add("fn__none");
CRITICALapp/src/config/util/snippets.ts146 target.parentElement.nextElementSibling.firstElementChild.classList.add("fn__none");
CRITICALapp/src/config/util/snippets.ts147 target.parentElement.nextElementSibling.lastElementChild.classList.remove("fn__none");
CRITICALapp/src/layout/status.ts41 if (!window.siyuan.menus.menu.element.classList.contains("fn__none") &&
CRITICALapp/src/layout/status.ts42 window.siyuan.menus.menu.element.getAttribute("data-name") === Constants.MENU_STATUS_BACKGROUND_TASK
CRITICALapp/src/layout/status.ts47 window.siyuan.menus.menu.element.setAttribute("data-name", Constants.MENU_STATUS_BACKGROUND_TASK);
CRITICALapp/src/layout/status.ts60 if (!window.siyuan.menus.menu.element.classList.contains("fn__none") &&
CRITICALapp/src/layout/status.ts61 window.siyuan.menus.menu.element.getAttribute("data-name") === Constants.MENU_STATUS_HELP) {
CRITICALapp/src/layout/status.ts66 window.siyuan.menus.menu.element.setAttribute("data-name", Constants.MENU_STATUS_HELP);
CRITICALapp/src/layout/topBar.ts81 if (!window.siyuan.menus.menu.element.classList.contains("fn__none") &&
CRITICALapp/src/layout/topBar.ts82 window.siyuan.menus.menu.element.getAttribute("data-name") === Constants.MENU_BAR_MORE) {
CRITICALapp/src/layout/topBar.ts87 window.siyuan.menus.menu.element.setAttribute("data-name", Constants.MENU_BAR_MORE);
CRITICALapp/src/layout/topBar.ts133 if (!window.siyuan.menus.menu.element.classList.contains("fn__none") &&
CRITICALapp/src/layout/topBar.ts134 window.siyuan.menus.menu.element.getAttribute("data-name") === Constants.MENU_BAR_MODE) {
CRITICALapp/src/layout/topBar.ts139 window.siyuan.menus.menu.element.setAttribute("data-name", Constants.MENU_BAR_MODE);
CRITICALapp/src/layout/topBar.ts197 if (!window.siyuan.menus.menu.element.classList.contains("fn__none") &&
CRITICALapp/src/layout/topBar.ts198 window.siyuan.menus.menu.element.getAttribute("data-name") === Constants.MENU_BAR_ZOOM) {
CRITICALapp/src/layout/topBar.ts203 window.siyuan.menus.menu.element.setAttribute("data-name", Constants.MENU_BAR_ZOOM);
CRITICALapp/src/layout/getAll.ts184 window.siyuan.config.uiLayout.left.data.forEach((item) => {
CRITICALapp/src/layout/getAll.ts189 window.siyuan.config.uiLayout.right.data.forEach((item) => {
CRITICALapp/src/layout/getAll.ts194 window.siyuan.config.uiLayout.bottom.data.forEach((item) => {
193 more matches not shown…
Over-Commented Block254 hits · 254 pts
SeverityFileLineSnippet
LOWapp/stage/protyle/js/highlight.js/styles/agate.min.css1pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*!
LOWapp/electron/main.js1// SiYuan - Refactor your thinking
LOWapp/src/asset/pdf/pdf_find_bar.js181 if (total > 0) {
LOWapp/src/asset/pdf/ui_utils.js341 * before the first visible element in `views`, but not by too much. (Usually,
LOWapp/src/asset/pdf/ui_utils.js361
LOWapp/src/asset/pdf/ui_utils.js381 // Initially assume that we need to find the beginning of the current row
LOWapp/src/asset/pdf/viewer.js281// document.readyState === "complete"
LOWapp/src/asset/pdf/pdf_history.js561 // In practice, it seems that the event is arriving too late in order for
LOWapp/src/asset/pdf/pdf_find_controller.js161 // The goal is to obtain the array: [[0, 0], [3, -1], [4, -2],
LOWapp/src/asset/pdf/pdf_viewer.js241 #resizeObserver = new ResizeObserver(this.#resizeObserverCallback.bind(this));
LOWapp/src/asset/pdf/app.js441 foreground: AppOptions.get("pageColorsForeground"),
LOWapp/src/asset/pdf/app.js2581 }
LOWapp/src/util/iOSPurchase.ts21 // -2:Server communication failed, need to retry 服务器通讯失败,需要重试
LOWkernel/main.go1// SiYuan - Refactor your thinking
LOWkernel/cmd/closews.go1// SiYuan - Refactor your thinking
LOWkernel/cmd/cmd.go1// SiYuan - Refactor your thinking
LOWkernel/cmd/ping.go1// SiYuan - Refactor your thinking
LOWkernel/treenode/blocktree.go1// SiYuan - Refactor your thinking
LOWkernel/treenode/tree.go1// SiYuan - Refactor your thinking
LOWkernel/treenode/blocktree_fix.go1// SiYuan - Refactor your thinking
LOWkernel/treenode/av.go1// SiYuan - Refactor your thinking
LOWkernel/treenode/heading.go1// SiYuan - Refactor your thinking
LOWkernel/treenode/marker.go1// SiYuan - Refactor your thinking
LOWkernel/treenode/node.go1// SiYuan - Refactor your thinking
LOWkernel/av/layout_gallery.go1// SiYuan - Refactor your thinking
LOWkernel/av/layout.go1// SiYuan - Refactor your thinking
LOWkernel/av/sort.go1// SiYuan - Refactor your thinking
LOWkernel/av/layout_table.go1// SiYuan - Refactor your thinking
LOWkernel/av/filter.go1// SiYuan - Refactor your thinking
LOWkernel/av/calc.go1// SiYuan - Refactor your thinking
LOWkernel/av/group.go1// SiYuan - Refactor your thinking
LOWkernel/av/av.go1// SiYuan - Refactor your thinking
LOWkernel/av/layout_kanban.go1// SiYuan - Refactor your thinking
LOWkernel/av/av_fix.go1// SiYuan - Refactor your thinking
LOWkernel/av/value.go1// SiYuan - Refactor your thinking
LOWkernel/cache/asset.go1// SiYuan - Refactor your thinking
LOWkernel/cache/tree.go1// SiYuan - Refactor your thinking
LOWkernel/cache/ial.go1// SiYuan - Refactor your thinking
LOWkernel/util/cloud.go1// SiYuan - Refactor your thinking
LOWkernel/util/misc.go1// SiYuan - Refactor your thinking
LOWkernel/util/lute.go1// SiYuan - Refactor your thinking
LOWkernel/util/disk.go1// SiYuan - Refactor your thinking
LOWkernel/util/statusbar.go1// SiYuan - Refactor your thinking
LOWkernel/util/time.go1// SiYuan - Refactor your thinking
LOWkernel/util/disk_mobile.go1// SiYuan - Refactor your thinking
LOWkernel/util/crypt.go1// SiYuan - Refactor your thinking
LOWkernel/util/runtime.go1// SiYuan - Refactor your thinking
LOWkernel/util/font.go1// SiYuan - Refactor your thinking
LOWkernel/util/etag.go1// SiYuan - Refactor your thinking
LOWkernel/util/clipboard_darwin.go1// SiYuan - Refactor your thinking
LOWkernel/util/clipboard_darwin.go21//
LOWkernel/util/session.go1// SiYuan - Refactor your thinking
LOWkernel/util/working_mobile.go1// SiYuan - Refactor your thinking
LOWkernel/util/os.go1// SiYuan - Refactor your thinking
LOWkernel/util/net.go1// SiYuan - Refactor your thinking
LOWkernel/util/sort.go1// SiYuan - Refactor your thinking
LOWkernel/util/clipboard_windows.go1// SiYuan - Refactor your thinking
LOWkernel/util/pandoc.go1// SiYuan - Refactor your thinking
LOWkernel/util/rhy.go1// SiYuan - Refactor your thinking
LOWkernel/util/os_mobile.go1// SiYuan - Refactor your thinking
194 more matches not shown…
Excessive Try-Catch Wrapping9 hits · 18 pts
SeverityFileLineSnippet
LOWscripts/check-lang-keys.py86 except Exception as e:
MEDIUMscripts/check-lang-keys.py87 print(f"Error: Failed to check duplicate keys in {file_path}: {e}")
LOWscripts/check-lang-keys.py172 except Exception as e:
MEDIUMscripts/check-lang-keys.py194 print(f"Error: Failed to parse file {file_path}: {e}")
LOWscripts/check-lang-keys.py196 except Exception as e:
MEDIUMscripts/check-lang-keys.py197 print(f"Error: Failed to read file {file_path}: {e}")
MEDIUMscripts/check-lang-keys.py217 print(f"Error: Directory does not exist: {langs_dir}")
MEDIUMscripts/check-lang-keys.py235 print("Error: No language files found")
MEDIUMscripts/check-lang-keys.py240 print("Error: No valid language files found")
Cross-Language Confusion (JS/TS)2 hits · 10 pts
SeverityFileLineSnippet
HIGHapp/src/types/index.d.ts266 print(title: string, html: string): void
HIGHapp/src/types/index.d.ts286 print(title: string, html: string): void
Hyper-Verbose Identifiers10 hits · 10 pts
SeverityFileLineSnippet
LOWapp/src/asset/pdf/ui_utils.js345function backtrackBeforeAllVisibleElements(index, views, top) {
LOWapp/src/asset/pdf/ui_utils.js476 function isElementBottomAfterViewTop(view) {
LOWapp/src/asset/pdf/ui_utils.js482 function isElementNextAfterViewHorizontally(view) {
LOWapp/src/asset/pdf/ui_utils.js594function normalizeWheelEventDirection(evt) {
LOWapp/src/asset/pdf/ui_utils.js760function getActiveOrFocusedElement() {
LOWapp/src/asset/pdf/ui_utils.js779function apiPageLayoutToViewerModes(layout) {
LOWapp/src/asset/pdf/pdf_viewer.js77function isValidAnnotationEditorMode(mode) {
LOWapp/src/asset/pdf/app.js2042 function addWindowResolutionChange(evt = null) {
LOWscripts/check-lang-keys.py33def find_duplicate_keys_recursive(data, prefix="", duplicates=None):
LOWscripts/_pkg/Utils.py47def generate_header_from_repo(repo_name, tag_name, lastestRelease, electron_version, action_file, HEADER=''):
Unused Imports4 hits · 4 pts
SeverityFileLineSnippet
LOWscripts/parse-changelog.py2
LOWscripts/check-lang-keys.py26
LOWscripts/check-lang-keys.py30
LOWscripts/parse-changelog-HEAD.py1
Deep Nesting4 hits · 4 pts
SeverityFileLineSnippet
LOWscripts/check-lang-keys.py33
LOWscripts/check-lang-keys.py91
LOWscripts/check-lang-keys.py120
LOWscripts/check-lang-keys.py201
Redundant / Tautological Comments1 hit · 2 pts
SeverityFileLineSnippet
LOWscripts/check-lang-keys.py285 # Output results