From bb4f495ac126c99ecd93ef1db79c41708a6805fb Mon Sep 17 00:00:00 2001 From: Ivan Hanloth Date: Sun, 26 Jul 2026 12:33:27 +0100 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=89=98=E7=9B=98=E5=9B=BE=E6=A0=87?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=8A=B6=E6=80=81=E6=98=BE=E7=A4=BA=EF=BC=8C?= =?UTF-8?q?=E5=8F=B3=E9=94=AE=E6=89=98=E7=9B=98=E8=8F=9C=E5=8D=95=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E5=88=87=E6=8D=A2=E8=87=AA=E5=8A=A8=E9=9A=90=E8=97=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/config/src-tauri/src/lib.rs | 5 + .../src/components/NotificationsPanel.svelte | 78 + apps/config/ui/src/lib/ipc.js | 15 +- apps/config/ui/src/lib/state.svelte.js | 18 +- apps/config/ui/src/locales/en.js | 20 +- apps/config/ui/src/locales/zh-CN.js | 19 +- apps/config/ui/src/locales/zh-TW.js | 19 +- crates/common/src/config.rs | 133 + crates/common/src/ipc.rs | 5 + crates/core/src/agent.rs | 91 +- crates/core/src/i18n.rs | 7 +- crates/core/src/icon.rs | 2 +- crates/core/src/lib.rs | 1 + crates/core/src/tray.rs | 29 + crates/core/src/tray_badge.rs | 428 + crates/core/tests/agent_ipc.rs | 18 +- docs/.vitepress/config.mts | 6 +- docs/dev/config-reference.md | 15 + docs/dev/frontend.md | 2 +- docs/en/dev/config-reference.md | 15 + docs/en/dev/frontend.md | 2 +- docs/en/guide/getting-started.md | 3 +- docs/en/guide/hotkeys.md | 1 + docs/en/guide/notifications.md | 32 +- docs/guide/getting-started.md | 3 +- docs/guide/hotkeys.md | 1 + docs/guide/notifications.md | 32 +- docs/zh-tw/dev/config-reference.md | 15 + docs/zh-tw/dev/frontend.md | 2 +- docs/zh-tw/guide/getting-started.md | 3 +- docs/zh-tw/guide/hotkeys.md | 1 + docs/zh-tw/guide/notifications.md | 32 +- qodana.sarif.json | 27547 ++++++++++++++++ qodana.yaml | 46 + 34 files changed, 28601 insertions(+), 45 deletions(-) create mode 100644 crates/core/src/tray_badge.rs create mode 100644 qodana.sarif.json create mode 100644 qodana.yaml diff --git a/apps/config/src-tauri/src/lib.rs b/apps/config/src-tauri/src/lib.rs index f8116fc..748491d 100644 --- a/apps/config/src-tauri/src/lib.rs +++ b/apps/config/src-tauri/src/lib.rs @@ -261,6 +261,8 @@ struct CoreStatus { elevated: bool, /// 核心是否正在监听热键与鼠标(由核心回报)。 monitoring: bool, + /// 自动隐藏当前是否启用(托盘菜单也可切换,须回读对齐界面)。 + auto_hide_enabled: bool, } const CORE_OFFLINE: CoreStatus = CoreStatus { @@ -268,6 +270,7 @@ const CORE_OFFLINE: CoreStatus = CoreStatus { hidden: false, elevated: false, monitoring: false, + auto_hide_enabled: false, }; /// 核心状态:单次管道往返 + 快速失败(核心未运行时立即返回,不重试)。 @@ -282,11 +285,13 @@ async fn core_status() -> CoreStatus { hidden, elevated, monitoring, + auto_hide_enabled, }) => CoreStatus { running: true, hidden, elevated, monitoring, + auto_hide_enabled, }, _ => CORE_OFFLINE, } diff --git a/apps/config/ui/src/components/NotificationsPanel.svelte b/apps/config/ui/src/components/NotificationsPanel.svelte index e0eb1b6..65128bf 100644 --- a/apps/config/ui/src/components/NotificationsPanel.svelte +++ b/apps/config/ui/src/components/NotificationsPanel.svelte @@ -3,9 +3,30 @@ import SettingRow from "./SettingRow.svelte"; import Toggle from "./Toggle.svelte"; import IconBell from "~icons/lucide/bell"; + import IconCircleDot from "~icons/lucide/circle-dot"; import { app } from "../lib/state.svelte.js"; const n = $derived(app.config.notifications); + const s = $derived(app.config.setting); + + // 四种角标颜色,顺序即优先级(红最高),与核心 tray_badge.rs 保持一致。 + const BADGE_COLORS = [ + { key: "red", labelKey: "notify.badgeRed", css: "#f44336" }, + { key: "green", labelKey: "notify.badgeGreen", css: "#4caf50" }, + { key: "yellow", labelKey: "notify.badgeYellow", css: "#ffc107" }, + { key: "blue", labelKey: "notify.badgeBlue", css: "#2196f3" }, + ]; + + // 可绑定的状态源;"" 表示不显示该颜色。取值与 crates/common 的 TRAY_STATUSES 一致。 + const BADGE_STATUSES = [ + { labelKey: "notify.statusNone", value: "" }, + { value: "hidden", labelKey: "notify.statusHidden" }, + { value: "auto_hide", labelKey: "notify.statusAutoHide" }, + { value: "hide_current", labelKey: "notify.statusHideCurrent" }, + { value: "freeze", labelKey: "notify.statusFreeze" }, + { value: "elevated", labelKey: "notify.statusElevated" }, + { value: "monitor_paused", labelKey: "notify.statusMonitorPaused" }, + ];
@@ -27,6 +48,28 @@ {#snippet control()}{/snippet} + +
+

{t("notify.trayCard")}

+ {#each BADGE_COLORS as color (color.key)} + + {#snippet control()} +
+ + +
+ {/snippet} +
+ {/each} +
{t("notify.trayPriorityNote")}
+ + {#snippet control()}{/snippet} + +
diff --git a/apps/config/ui/src/lib/ipc.js b/apps/config/ui/src/lib/ipc.js index 1dbed7e..55d4ea3 100644 --- a/apps/config/ui/src/lib/ipc.js +++ b/apps/config/ui/src/lib/ipc.js @@ -29,6 +29,8 @@ const mockConfig = { hide_current: true, click_to_hide: true, hide_icon_after_hide: false, + tray_badges: { red: "hidden", green: "auto_hide", yellow: "hide_current", blue: "freeze" }, + tray_show_tooltip: true, freeze_after_hide: false, enhanced_freeze: false, freeze_whole_tree: false, @@ -96,6 +98,8 @@ const mockWindows = [ /** mock 下的核心监控状态。 */ let mockMonitoring = true; +/** mock 下的自动隐藏开关(随 save_config 更新,供状态轮询回读联动)。 */ +let mockAutoHide = mockConfig.setting.auto_hide_enabled; /** mock 下的开机自启状态(有状态,供预览联动 UI)。 */ let mockAutostart = false; @@ -110,7 +114,16 @@ function mockInvoke(cmd, args) { case "autostart_status": return { enabled: mockAutostart, method: mockAutostart ? "task" : null }; case "core_status": - return { running: true, hidden: false, elevated: false, monitoring: mockMonitoring }; + return { + running: true, + hidden: false, + elevated: false, + monitoring: mockMonitoring, + auto_hide_enabled: mockAutoHide, + }; + case "save_config": + mockAutoHide = !!args?.config?.setting?.auto_hide_enabled; + return null; case "set_hotkeys_enabled": mockMonitoring = !!args?.enabled; return true; diff --git a/apps/config/ui/src/lib/state.svelte.js b/apps/config/ui/src/lib/state.svelte.js index c306df6..9038ebd 100644 --- a/apps/config/ui/src/lib/state.svelte.js +++ b/apps/config/ui/src/lib/state.svelte.js @@ -18,7 +18,7 @@ export const app = $state({ /** exe 路径 → PNG data URI;null 表示查询过但无图标(负缓存)。 */ icons: {}, /** 核心状态;running 为 null 表示首次检测尚未返回。monitoring 由核心回报。 */ - status: { running: null, hidden: false, elevated: false, monitoring: true }, + status: { running: null, hidden: false, elevated: false, monitoring: true, auto_hide_enabled: false }, autostart: false, /** 当前自启注册方式:"task"|"registry"|null(未注册)。 */ autostartMethod: null, @@ -173,11 +173,15 @@ async function loadIcons(windows) { // 自动保存:改动即存,带 debounce。 let saveTimer = null; +/** 有改动排队待存(debounce 期间为 true);状态回读不得覆盖未保存的改动。 */ +let savePending = false; /** 安排一次自动保存;连续改动只在停顿后写一次盘。 */ export function scheduleSave(delayMs = 600) { + savePending = true; clearTimeout(saveTimer); saveTimer = setTimeout(() => { + savePending = false; saveConfig(); }, delayMs); } @@ -287,13 +291,23 @@ export function reportError(message, detail = "") { app.errorReport = { message, detail: String(detail) }; } +/** 托盘菜单也能切换自动隐藏;以核心回报为准回读界面,但不覆盖用户尚未保存的改动。 */ +function syncAutoHideFromCore() { + if (!app.config || !app.status.running) return; + if (savePending || app.saving) return; + if (app.config.setting.auto_hide_enabled !== app.status.auto_hide_enabled) { + app.config.setting.auto_hide_enabled = app.status.auto_hide_enabled; + } +} + /** 刷新核心状态;失败时视为核心离线。 */ export async function refreshStatus() { try { app.status = await invoke("core_status"); } catch { - app.status = { running: false, hidden: false, elevated: false, monitoring: false }; + app.status = { running: false, hidden: false, elevated: false, monitoring: false, auto_hide_enabled: false }; } + syncAutoHideFromCore(); // 核心在停用期间重启过(新实例默认监听),重新按下停用。 if (suspenders.size > 0 && app.status.running && app.status.monitoring) { invoke("set_hotkeys_enabled", { enabled: false }).catch(() => {}); diff --git a/apps/config/ui/src/locales/en.js b/apps/config/ui/src/locales/en.js index 183cd16..4a38e9f 100644 --- a/apps/config/ui/src/locales/en.js +++ b/apps/config/ui/src/locales/en.js @@ -6,7 +6,7 @@ export default { "tab.binding": "Windows", "tab.hotkeys": "Hotkeys & Mouse", - "tab.notify": "Notifications", + "tab.notify": "Alerts", "tab.options": "Options", "tab.about": "About & Feedback", @@ -175,6 +175,24 @@ export default { "notify.onShow": "Notify when showing windows", "notify.onShowDesc": "Show a notification each time windows are restored", + "notify.trayCard": "Tray icon status", + "notify.badgeRed": "Red", + "notify.badgeGreen": "Green", + "notify.badgeYellow": "Yellow", + "notify.badgeBlue": "Blue", + "notify.statusNone": "Do not show", + "notify.statusHidden": "Windows are hidden", + "notify.statusAutoHide": "Auto hide is enabled", + "notify.statusHideCurrent": "Also-hide-active-window is enabled", + "notify.statusFreeze": "Process freezing is enabled", + "notify.statusElevated": "Running as administrator", + "notify.statusMonitorPaused": "Hotkey monitoring is paused", + "notify.trayPriorityNote": + "Bind a state to each colored dot badge; the badge appears in the bottom-right corner of the tray icon. When several bound states are active at once, only one dot is shown, in red > green > yellow > blue priority order. Choose “Do not show” to disable a color.", + "notify.trayTooltip": "Show the tray icon tooltip", + "notify.trayTooltipDesc": + "Show “Boss Key” when hovering over the tray icon; turn this off to show no text for extra discretion.", + "options.generalCard": "General", "options.muteAfterHide": "Mute after hiding", "options.muteAfterHideDesc": diff --git a/apps/config/ui/src/locales/zh-CN.js b/apps/config/ui/src/locales/zh-CN.js index 083eed5..b8afbaa 100644 --- a/apps/config/ui/src/locales/zh-CN.js +++ b/apps/config/ui/src/locales/zh-CN.js @@ -7,7 +7,7 @@ export default { "tab.binding": "窗口绑定", "tab.hotkeys": "热键与鼠标", - "tab.notify": "通知设置", + "tab.notify": "提示设置", "tab.options": "其他选项", "tab.about": "关于与反馈", @@ -171,6 +171,23 @@ export default { "notify.onShow": "显示窗口时通知", "notify.onShowDesc": "每次恢复显示时弹出通知", + "notify.trayCard": "图标状态提示", + "notify.badgeRed": "红色", + "notify.badgeGreen": "绿色", + "notify.badgeYellow": "黄色", + "notify.badgeBlue": "蓝色", + "notify.statusNone": "不显示", + "notify.statusHidden": "存在隐藏中的窗口", + "notify.statusAutoHide": "启用了自动隐藏", + "notify.statusHideCurrent": "启用了同时隐藏当前窗口", + "notify.statusFreeze": "启用了进程冻结", + "notify.statusElevated": "以管理员身份运行", + "notify.statusMonitorPaused": "热键监控已暂停", + "notify.trayPriorityNote": + "为每种颜色的圆点角标绑定一个状态,角标显示在托盘图标右下角;多个状态同时满足时,按红 > 绿 > 黄 > 蓝的优先级只显示一个圆点。选择「不显示」可置空该颜色。", + "notify.trayTooltip": "显示图标悬浮名称", + "notify.trayTooltipDesc": "鼠标悬停在托盘图标上时显示「Boss Key」;关闭后不显示任何文字,更隐蔽。", + "options.generalCard": "常规", "options.muteAfterHide": "隐藏窗口后静音", "options.muteAfterHideDesc": "隐藏时静音目标进程的音频,恢复显示时自动取消静音。", diff --git a/apps/config/ui/src/locales/zh-TW.js b/apps/config/ui/src/locales/zh-TW.js index 1e3ce1d..4ce2a6a 100644 --- a/apps/config/ui/src/locales/zh-TW.js +++ b/apps/config/ui/src/locales/zh-TW.js @@ -6,7 +6,7 @@ export default { "tab.binding": "視窗綁定", "tab.hotkeys": "快速鍵與滑鼠", - "tab.notify": "通知設定", + "tab.notify": "提示設定", "tab.options": "其他選項", "tab.about": "關於與意見回饋", @@ -170,6 +170,23 @@ export default { "notify.onShow": "顯示視窗時通知", "notify.onShowDesc": "每次復原顯示時顯示通知", + "notify.trayCard": "圖示狀態提示", + "notify.badgeRed": "紅色", + "notify.badgeGreen": "綠色", + "notify.badgeYellow": "黃色", + "notify.badgeBlue": "藍色", + "notify.statusNone": "不顯示", + "notify.statusHidden": "存在隱藏中的視窗", + "notify.statusAutoHide": "已啟用自動隱藏", + "notify.statusHideCurrent": "已啟用同時隱藏目前視窗", + "notify.statusFreeze": "已啟用程序凍結", + "notify.statusElevated": "以系統管理員身分執行", + "notify.statusMonitorPaused": "快速鍵監控已暫停", + "notify.trayPriorityNote": + "為每種顏色的圓點角標繫結一個狀態,角標顯示在通知區域圖示右下角;多個狀態同時滿足時,依紅 > 綠 > 黃 > 藍的優先順序僅顯示一個圓點。選擇「不顯示」可停用該顏色。", + "notify.trayTooltip": "顯示圖示懸浮名稱", + "notify.trayTooltipDesc": "滑鼠停留在通知區域圖示上時顯示「Boss Key」;關閉後不顯示任何文字,更為隱密。", + "options.generalCard": "一般", "options.muteAfterHide": "隱藏視窗後靜音", "options.muteAfterHideDesc": "隱藏時將目標程序靜音,復原顯示時自動取消靜音。", diff --git a/crates/common/src/config.rs b/crates/common/src/config.rs index b97659e..1ad23f5 100644 --- a/crates/common/src/config.rs +++ b/crates/common/src/config.rs @@ -212,6 +212,79 @@ impl MouseSetting { } } +/// 托盘角标可绑定的状态源取值(空串 = 不显示该颜色)。 +pub const TRAY_STATUS_HIDDEN: &str = "hidden"; +pub const TRAY_STATUS_AUTO_HIDE: &str = "auto_hide"; +pub const TRAY_STATUS_HIDE_CURRENT: &str = "hide_current"; +pub const TRAY_STATUS_FREEZE: &str = "freeze"; +pub const TRAY_STATUS_ELEVATED: &str = "elevated"; +pub const TRAY_STATUS_MONITOR_PAUSED: &str = "monitor_paused"; +/// 全部合法的非空状态源。 +pub const TRAY_STATUSES: [&str; 6] = [ + TRAY_STATUS_HIDDEN, + TRAY_STATUS_AUTO_HIDE, + TRAY_STATUS_HIDE_CURRENT, + TRAY_STATUS_FREEZE, + TRAY_STATUS_ELEVATED, + TRAY_STATUS_MONITOR_PAUSED, +]; + +fn default_badge_red() -> String { + TRAY_STATUS_HIDDEN.to_string() +} +fn default_badge_green() -> String { + TRAY_STATUS_AUTO_HIDE.to_string() +} +fn default_badge_yellow() -> String { + TRAY_STATUS_HIDE_CURRENT.to_string() +} +fn default_badge_blue() -> String { + TRAY_STATUS_FREEZE.to_string() +} + +/// 托盘图标状态角标:四种颜色各自绑定一个状态源。 +/// +/// 多个绑定状态同时活跃时按 **红 > 绿 > 黄 > 蓝** 的优先级只显示一个圆点; +/// 置空(`""`)表示该颜色不显示。 +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct TrayBadges { + #[serde(default = "default_badge_red")] + pub red: String, + #[serde(default = "default_badge_green")] + pub green: String, + #[serde(default = "default_badge_yellow")] + pub yellow: String, + #[serde(default = "default_badge_blue")] + pub blue: String, +} + +impl Default for TrayBadges { + fn default() -> Self { + Self { + red: default_badge_red(), + green: default_badge_green(), + yellow: default_badge_yellow(), + blue: default_badge_blue(), + } + } +} + +impl TrayBadges { + /// 未知状态源一律归一为置空(不显示),避免手改配置后角标行为不可预测。幂等。 + pub fn normalize(&mut self) { + for v in [ + &mut self.red, + &mut self.green, + &mut self.yellow, + &mut self.blue, + ] { + if !v.is_empty() && !TRAY_STATUSES.contains(&v.as_str()) { + v.clear(); + } + } + } +} + #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct Setting { #[serde(default = "default_true")] @@ -224,6 +297,12 @@ pub struct Setting { pub click_to_hide: bool, #[serde(default)] pub hide_icon_after_hide: bool, + /// 托盘图标状态角标的颜色绑定,见 [`TrayBadges`]。 + #[serde(default)] + pub tray_badges: TrayBadges, + /// 是否显示托盘图标的悬浮名称(Boss Key);关闭后悬停不显示任何文字。 + #[serde(default = "default_true")] + pub tray_show_tooltip: bool, #[serde(default)] pub freeze_after_hide: bool, #[serde(default)] @@ -281,6 +360,8 @@ impl Default for Setting { hide_current: true, click_to_hide: true, hide_icon_after_hide: false, + tray_badges: TrayBadges::default(), + tray_show_tooltip: true, freeze_after_hide: false, enhanced_freeze: false, freeze_whole_tree: false, @@ -315,6 +396,7 @@ impl Setting { self.middle_button_hide = false; self.side_button1_hide = false; self.side_button2_hide = false; + self.tray_badges.normalize(); self.mouse.normalize(); self.language = crate::i18n::normalize_pref(&self.language); } @@ -672,6 +754,57 @@ mod tests { assert!(!c.setting.autostart_admin, "自启默认普通权限"); } + #[test] + fn tray_badges_default_bindings() { + let d = TrayBadges::default(); + assert_eq!( + d.red, TRAY_STATUS_HIDDEN, + "红色默认绑定「存在隐藏中的窗口」" + ); + assert_eq!( + d.green, TRAY_STATUS_AUTO_HIDE, + "绿色默认绑定「启用了自动隐藏」" + ); + assert_eq!( + d.yellow, TRAY_STATUS_HIDE_CURRENT, + "黄色默认绑定「同时隐藏当前窗口」" + ); + assert_eq!(d.blue, TRAY_STATUS_FREEZE, "蓝色默认绑定「启用了进程冻结」"); + assert!(Setting::default().tray_show_tooltip, "悬浮名称默认显示"); + } + + #[test] + fn tray_badges_round_trip_including_empty() { + let c = Config::from_json( + r#"{"setting": {"tray_badges": {"red": "", "green": "freeze"}, "tray_show_tooltip": false}}"#, + ) + .unwrap(); + assert_eq!(c.setting.tray_badges.red, "", "置空表示不显示该颜色"); + assert_eq!(c.setting.tray_badges.green, TRAY_STATUS_FREEZE); + assert_eq!( + c.setting.tray_badges.yellow, TRAY_STATUS_HIDE_CURRENT, + "缺失的颜色用默认绑定" + ); + assert!(!c.setting.tray_show_tooltip); + let back = Config::from_json(&c.to_json().unwrap()).unwrap(); + assert_eq!( + back.setting.tray_badges, c.setting.tray_badges, + "写回后应保留" + ); + assert!(!back.setting.tray_show_tooltip, "写回后应保留"); + } + + #[test] + fn tray_badges_unknown_status_normalizes_to_empty() { + let c = Config::from_json(r#"{"setting": {"tray_badges": {"red": "no_such_status"}}}"#) + .unwrap(); + assert_eq!(c.setting.tray_badges.red, "", "未知状态源应归一为置空"); + assert_eq!( + c.setting.tray_badges.blue, TRAY_STATUS_FREEZE, + "其余颜色不受影响" + ); + } + #[test] fn autostart_admin_round_trips() { assert!(!Setting::default().autostart_admin, "默认关(普通权限)"); diff --git a/crates/common/src/ipc.rs b/crates/common/src/ipc.rs index 68d8d9c..3b58667 100644 --- a/crates/common/src/ipc.rs +++ b/crates/common/src/ipc.rs @@ -41,10 +41,13 @@ pub enum Response { elevated: bool, }, /// `monitoring`:核心是否正在监听热键与鼠标(被 `SetHotkeys` 停用时为 false)。 + /// `auto_hide_enabled`:自动隐藏当前是否启用(托盘菜单与设置界面均可切换,须回传对齐)。 Status { hidden: bool, elevated: bool, monitoring: bool, + #[serde(default)] + auto_hide_enabled: bool, }, Error { message: String, @@ -198,11 +201,13 @@ mod tests { hidden: true, elevated: false, monitoring: true, + auto_hide_enabled: false, }, Response::Status { hidden: false, elevated: true, monitoring: false, + auto_hide_enabled: true, }, Response::Error { message: "出错了".to_string(), diff --git a/crates/core/src/agent.rs b/crates/core/src/agent.rs index 211c201..7b379df 100644 --- a/crates/core/src/agent.rs +++ b/crates/core/src/agent.rs @@ -32,6 +32,7 @@ use crate::keyboard_hook::{self, KeyboardHook, WM_KEY_TRIGGER}; use crate::mouse_hook::{self, MouseHook, TRIGGER_CORNER, WM_MOUSE_TRIGGER}; use crate::platform::win32::WindowsWindowManager; use crate::tray::TrayIcon; +use crate::tray_badge::TrayIconSet; use crate::util::append_menu_item; use crate::{idle, ipc_server, logging, recovery}; @@ -50,6 +51,7 @@ const MENU_QUIT: usize = 1003; const MENU_AUTOSTART: usize = 1004; const MENU_RESTORE: usize = 1005; const MENU_ABOUT: usize = 1006; +const MENU_AUTO_HIDE: usize = 1007; const AUTO_QUIT_TIMER_ID: usize = 10; const AUTO_HIDE_TIMER_ID: usize = 11; @@ -85,6 +87,8 @@ struct AgentState { recovery_path: PathBuf, controller: HideController, tray: Option, + /// 托盘图标的角标变体缓存;未启用托盘时为 None。 + tray_icons: Option, ipc_rx: Receiver<(Command, Sender)>, mouse_hook: Option, float_window: Option, @@ -239,20 +243,44 @@ impl AgentState { } else { self.float_window = None; } + + self.update_tray_icon(); } fn sync_tray(&mut self) { - if !self.config.setting.hide_icon_after_hide { - return; - } let hidden = self.controller.is_hidden(); - if let Some(tray) = &mut self.tray { + if self.config.setting.hide_icon_after_hide + && let Some(tray) = &mut self.tray + { if hidden { tray.hide(); } else { tray.show(); } } + self.update_tray_icon(); + } + + /// 让托盘图标的状态角标与悬浮提示对齐当前配置与运行状态。均未变化时开销为零。 + fn update_tray_icon(&mut self) { + let (Some(tray), Some(icons)) = (&mut self.tray, &mut self.tray_icons) else { + return; + }; + let status = crate::tray_badge::TrayStatus { + hidden: self.controller.is_hidden(), + auto_hide: self.config.setting.auto_hide_enabled, + hide_current: self.config.setting.hide_current, + freeze: self.config.setting.freeze_after_hide, + elevated: crate::elevation::is_elevated(), + monitor_paused: !self.monitoring, + }; + let badge = crate::tray_badge::active_badge(&self.config.setting.tray_badges, &status); + tray.set_icon(icons.icon(badge)); + tray.set_tip(if self.config.setting.tray_show_tooltip { + APP_NAME + } else { + "" + }); } /// 隐藏状态落盘:崩溃后下次启动据此找回窗口。快照为空时清除文件。 @@ -398,6 +426,7 @@ impl AgentState { hidden: self.controller.is_hidden(), elevated: crate::elevation::is_elevated(), monitoring: self.monitoring, + auto_hide_enabled: self.config.setting.auto_hide_enabled, }, false, ), @@ -531,6 +560,25 @@ fn set_autostart(enabled: bool, admin: bool) -> Response { } } +/// 托盘菜单切换自动隐藏:翻转配置并落盘,与在设置界面切换等效。 +/// 设置界面经 2 秒一次的状态轮询回读该值,保持两侧一致。 +fn toggle_auto_hide(state: &mut AgentState, hwnd: HWND) { + let enabled = !state.config.setting.auto_hide_enabled; + state.config.setting.auto_hide_enabled = enabled; + logging::info(if enabled { + "托盘菜单:已启用自动隐藏" + } else { + "托盘菜单:已暂停自动隐藏" + }); + if let Err(e) = state.config.save(&state.config_path) { + logging::warn(&format!( + "自动隐藏开关写入配置失败,核心重启后将丢失本次切换: {e}" + )); + } + // 重新武装/停掉空闲检测定时器,并刷新托盘角标。 + state.refresh_runtime(hwnd); +} + fn toggle_autostart(state: &AgentState) { let Ok(auto) = crate::autostart::Autostart::standard() else { return; @@ -567,7 +615,7 @@ fn state_mut<'a>(hwnd: HWND) -> Option<&'a mut AgentState> { } } -fn show_tray_menu(hwnd: HWND, hidden: bool) -> bool { +fn show_tray_menu(hwnd: HWND, hidden: bool, auto_hide_on: bool) -> bool { let autostart_on = crate::autostart::Autostart::standard() .map(|a| a.status().is_some()) .unwrap_or(false); @@ -580,15 +628,28 @@ fn show_tray_menu(hwnd: HWND, hidden: bool) -> bool { } else { Msg::MenuHideWindows }; - let autostart_flags = if autostart_on { - MF_STRING | MF_CHECKED - } else { - MF_STRING + let checked = |on: bool| { + if on { + MF_STRING | MF_CHECKED + } else { + MF_STRING + } }; append_menu_item(menu, MF_STRING, MENU_SETTINGS, Msg::MenuSettings); append_menu_item(menu, MF_STRING, MENU_TOGGLE, toggle_label); append_menu_item(menu, MF_STRING, MENU_RESTORE, Msg::MenuRestoreTool); - append_menu_item(menu, autostart_flags, MENU_AUTOSTART, Msg::MenuAutostart); + append_menu_item( + menu, + checked(auto_hide_on), + MENU_AUTO_HIDE, + Msg::MenuAutoHide, + ); + append_menu_item( + menu, + checked(autostart_on), + MENU_AUTOSTART, + Msg::MenuAutostart, + ); append_menu_item(menu, MF_STRING, MENU_ABOUT, Msg::MenuAbout); let _ = AppendMenuW(menu, MF_SEPARATOR, 0, PCWSTR::null()); append_menu_item(menu, MF_STRING, MENU_QUIT, Msg::MenuQuit); @@ -731,7 +792,11 @@ unsafe extern "system" fn wndproc(hwnd: HWND, msg: u32, wparam: WPARAM, lparam: } } WM_RBUTTONUP => { - show_tray_menu(hwnd, state.controller.is_hidden()); + show_tray_menu( + hwnd, + state.controller.is_hidden(), + state.config.setting.auto_hide_enabled, + ); } _ => {} } @@ -759,6 +824,7 @@ unsafe extern "system" fn wndproc(hwnd: HWND, msg: u32, wparam: WPARAM, lparam: MENU_RESTORE => launch_settings(state, Some(ARG_RESTORE)), MENU_ABOUT => launch_settings(state, Some(ARG_ABOUT)), MENU_TOGGLE => state.apply_toggle(), + MENU_AUTO_HIDE => toggle_auto_hide(state, hwnd), MENU_AUTOSTART => toggle_autostart(state), MENU_QUIT => quit(state, hwnd), _ => {} @@ -971,12 +1037,15 @@ pub fn run(options: AgentOptions) { .config_path .with_file_name(recovery::RECOVERY_FILE_NAME); + let tray_icons = tray.as_ref().map(|_| TrayIconSet::new()); + let mut state = Box::new(AgentState { config, config_path: options.config_path.clone(), recovery_path, controller: HideController::new(WindowsWindowManager, WinEffects::new(exe_dir)), tray, + tray_icons, ipc_rx, mouse_hook: None, float_window: None, diff --git a/crates/core/src/i18n.rs b/crates/core/src/i18n.rs index a1d4710..db163b2 100644 --- a/crates/core/src/i18n.rs +++ b/crates/core/src/i18n.rs @@ -14,6 +14,7 @@ pub enum Msg { MenuShowWindows, MenuHideWindows, MenuRestoreTool, + MenuAutoHide, MenuAutostart, MenuAbout, MenuQuit, @@ -59,6 +60,7 @@ impl Msg { Msg::MenuShowWindows => "显示窗口", Msg::MenuHideWindows => "隐藏窗口", Msg::MenuRestoreTool => "窗口恢复工具", + Msg::MenuAutoHide => "自动隐藏", Msg::MenuAutostart => "开机自启", Msg::MenuAbout => "关于", Msg::MenuQuit => "退出", @@ -95,6 +97,7 @@ impl Msg { Msg::MenuShowWindows => "Show Windows", Msg::MenuHideWindows => "Hide Windows", Msg::MenuRestoreTool => "Window Recovery Tool", + Msg::MenuAutoHide => "Auto Hide", Msg::MenuAutostart => "Start with Windows", Msg::MenuAbout => "About", Msg::MenuQuit => "Exit", @@ -131,6 +134,7 @@ impl Msg { Msg::MenuShowWindows => "顯示視窗", Msg::MenuHideWindows => "隱藏視窗", Msg::MenuRestoreTool => "視窗復原工具", + Msg::MenuAutoHide => "自動隱藏", Msg::MenuAutostart => "開機自動啟動", Msg::MenuAbout => "關於", Msg::MenuQuit => "結束", @@ -210,11 +214,12 @@ mod tests { use super::*; /// 全部文案键;新增 Msg 变体后必须同步登记,否则跨语言校验会漏掉它。 - const ALL_MSGS: [Msg; 31] = [ + const ALL_MSGS: [Msg; 32] = [ Msg::MenuSettings, Msg::MenuShowWindows, Msg::MenuHideWindows, Msg::MenuRestoreTool, + Msg::MenuAutoHide, Msg::MenuAutostart, Msg::MenuAbout, Msg::MenuQuit, diff --git a/crates/core/src/icon.rs b/crates/core/src/icon.rs index 5499932..2447045 100644 --- a/crates/core/src/icon.rs +++ b/crates/core/src/icon.rs @@ -56,7 +56,7 @@ pub fn extract_icon_rgba(path: &str) -> Option { rgba } -fn hicon_to_rgba(hicon: HICON) -> Option { +pub(crate) fn hicon_to_rgba(hicon: HICON) -> Option { unsafe { let mut icon_info = ICONINFO::default(); GetIconInfo(hicon, &mut icon_info).ok()?; diff --git a/crates/core/src/lib.rs b/crates/core/src/lib.rs index 49efa8c..1e10722 100644 --- a/crates/core/src/lib.rs +++ b/crates/core/src/lib.rs @@ -20,5 +20,6 @@ pub mod recovery; pub mod shell; pub mod single_instance; pub mod tray; +pub mod tray_badge; mod util; diff --git a/crates/core/src/tray.rs b/crates/core/src/tray.rs index 2a8f307..aa334fc 100644 --- a/crates/core/src/tray.rs +++ b/crates/core/src/tray.rs @@ -204,6 +204,35 @@ impl TrayIcon { self.visible } + /// 替换托盘图标(状态角标变化时调用)。已挂载时立即 NIM_MODIFY 生效, + /// 未挂载时仅记下句柄,待补挂时一并带上。图标未变化时不重复提交。 + pub fn set_icon(&mut self, icon: HICON) { + if self.icon == icon { + return; + } + self.icon = icon; + self.modify_if_visible(); + } + + /// 替换悬浮提示文字(空串 = 悬停不显示任何文字)。文字未变化时不重复提交。 + pub fn set_tip(&mut self, tip: &str) { + if self.tip == tip { + return; + } + self.tip = tip.to_string(); + self.modify_if_visible(); + } + + fn modify_if_visible(&self) { + if !self.visible { + return; + } + let data = self.base_data(); + unsafe { + let _ = Shell_NotifyIconW(NIM_MODIFY, &data); + } + } + pub fn balloon(&self, title: &str, message: &str) { if !self.visible { return; diff --git a/crates/core/src/tray_badge.rs b/crates/core/src/tray_badge.rs new file mode 100644 index 0000000..8d1c933 --- /dev/null +++ b/crates/core/src/tray_badge.rs @@ -0,0 +1,428 @@ +//! 托盘图标状态角标:在基础图标右下角叠加一个彩色圆点,反映核心当前状态。 +//! +//! 四种颜色各自绑定一个状态源(见 `TrayBadges`),多个绑定状态同时活跃时 +//! 按 **红 > 绿 > 黄 > 蓝** 的优先级只显示一个圆点;置空的颜色不参与。 + +use std::collections::HashMap; + +use bosskey_common::config::{ + TRAY_STATUS_AUTO_HIDE, TRAY_STATUS_ELEVATED, TRAY_STATUS_FREEZE, TRAY_STATUS_HIDDEN, + TRAY_STATUS_HIDE_CURRENT, TRAY_STATUS_MONITOR_PAUSED, TrayBadges, +}; +use windows::Win32::Graphics::Gdi::{ + BI_RGB, BITMAPINFO, BITMAPINFOHEADER, CreateBitmap, CreateDIBSection, DIB_RGB_COLORS, + DeleteObject, GetDC, ReleaseDC, +}; +use windows::Win32::UI::WindowsAndMessaging::{CreateIconIndirect, HICON, ICONINFO}; + +use crate::icon::IconRgba; + +/// 角标描边:白色,用于在深浅任务栏背景上都能衬出圆点边界。 +const BADGE_RING: [u8; 4] = [0xFF, 0xFF, 0xFF, 0xFF]; + +/// 角标颜色,declaration 顺序即显示优先级(红最高)。 +#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +pub enum BadgeColor { + Red, + Green, + Yellow, + Blue, +} + +impl BadgeColor { + const fn rgba(self) -> [u8; 4] { + match self { + BadgeColor::Red => [0xF4, 0x43, 0x36, 0xFF], + BadgeColor::Green => [0x4C, 0xAF, 0x50, 0xFF], + BadgeColor::Yellow => [0xFF, 0xC1, 0x07, 0xFF], + BadgeColor::Blue => [0x21, 0x96, 0xF3, 0xFF], + } + } +} + +/// 核心当前的状态快照,供角标绑定判断。 +#[derive(Debug, Clone, Copy, Default)] +pub struct TrayStatus { + /// 当前有窗口被隐藏。 + pub hidden: bool, + /// 空闲自动隐藏已启用。 + pub auto_hide: bool, + /// 「同时隐藏当前活动窗口」已启用。 + pub hide_current: bool, + /// 「隐藏窗口时冻结进程」已启用。 + pub freeze: bool, + /// 核心正以管理员身份运行。 + pub elevated: bool, + /// 热键与鼠标监控已被临时停用(见 `Command::SetHotkeys`)。 + pub monitor_paused: bool, +} + +/// 某个状态源当前是否活跃;空串与未知取值一律视为不活跃。 +fn status_active(key: &str, s: &TrayStatus) -> bool { + match key { + TRAY_STATUS_HIDDEN => s.hidden, + TRAY_STATUS_AUTO_HIDE => s.auto_hide, + TRAY_STATUS_HIDE_CURRENT => s.hide_current, + TRAY_STATUS_FREEZE => s.freeze, + TRAY_STATUS_ELEVATED => s.elevated, + TRAY_STATUS_MONITOR_PAUSED => s.monitor_paused, + _ => false, + } +} + +/// 按红 > 绿 > 黄 > 蓝的优先级选出当前应显示的角标颜色;都不活跃时不显示。 +pub fn active_badge(badges: &TrayBadges, status: &TrayStatus) -> Option { + [ + (BadgeColor::Red, badges.red.as_str()), + (BadgeColor::Green, badges.green.as_str()), + (BadgeColor::Yellow, badges.yellow.as_str()), + (BadgeColor::Blue, badges.blue.as_str()), + ] + .into_iter() + .find(|(_, key)| status_active(key, status)) + .map(|(color, _)| color) +} + +/// 在顶到底 RGBA 像素的右下角叠加一个带白色描边的实心圆点。 +/// +/// 圆点直径约为图标边长的 44%,紧贴右下角;边缘做 1px 线性过渡抗锯齿。 +/// `pixels` 长度必须等于 `width*height*4`,否则不做任何修改。 +fn overlay_badge(pixels: &mut [u8], width: u32, height: u32, color: [u8; 4]) { + if width == 0 || height == 0 || pixels.len() != (width * height * 4) as usize { + return; + } + let size = width.min(height) as f32; + let radius = (size * 0.22).max(2.5); + let ring = (size * 0.05).max(1.0); + let cx = width as f32 - radius - ring - 0.5; + let cy = height as f32 - radius - ring - 0.5; + + for y in 0..height { + for x in 0..width { + let dx = x as f32 - cx; + let dy = y as f32 - cy; + let dist = (dx * dx + dy * dy).sqrt(); + // 覆盖率:圆内 1,圆外 0,边界 1px 内线性过渡。 + let dot = (radius + 0.5 - dist).clamp(0.0, 1.0); + let outline = (radius + ring + 0.5 - dist).clamp(0.0, 1.0) - dot; + if dot <= 0.0 && outline <= 0.0 { + continue; + } + let i = ((y * width + x) * 4) as usize; + let px = &mut pixels[i..i + 4]; + blend(px, BADGE_RING, outline); + blend(px, color, dot); + } + } +} + +/// 把 `src` 以 `coverage`(0..=1)的强度 alpha 混合到 `dst`(均为直通 alpha 的 RGBA)。 +fn blend(dst: &mut [u8], src: [u8; 4], coverage: f32) { + if coverage <= 0.0 { + return; + } + let a = coverage * (src[3] as f32 / 255.0); + for c in 0..3 { + dst[c] = (src[c] as f32 * a + dst[c] as f32 * (1.0 - a)).round() as u8; + } + dst[3] = ((255.0 * a) + dst[3] as f32 * (1.0 - a)).round() as u8; +} + +/// 把指定颜色的圆点叠加到基础图标像素上。 +fn compose(base: &IconRgba, color: BadgeColor) -> IconRgba { + let mut out = base.clone(); + overlay_badge(&mut out.pixels, out.width, out.height, color.rgba()); + out +} + +/// 顶到底 RGBA 像素 → HICON(32 位 ARGB,直通 alpha)。 +fn rgba_to_hicon(icon: &IconRgba) -> Option { + if icon.width == 0 + || icon.height == 0 + || icon.pixels.len() != (icon.width * icon.height * 4) as usize + { + return None; + } + unsafe { + let bmi = BITMAPINFO { + bmiHeader: BITMAPINFOHEADER { + biSize: std::mem::size_of::() as u32, + biWidth: icon.width as i32, + biHeight: -(icon.height as i32), // 负值 = 顶到底行序 + biPlanes: 1, + biBitCount: 32, + biCompression: BI_RGB.0, + ..Default::default() + }, + ..Default::default() + }; + let mut bits: *mut std::ffi::c_void = std::ptr::null_mut(); + let hdc = GetDC(None); + let color = CreateDIBSection(Some(hdc), &bmi, DIB_RGB_COLORS, &mut bits, None, 0); + ReleaseDC(None, hdc); + let color = color.ok()?; + if bits.is_null() { + let _ = DeleteObject(color.into()); + return None; + } + // RGBA → BGRA。 + let dst = std::slice::from_raw_parts_mut(bits as *mut u8, icon.pixels.len()); + for (d, s) in dst.chunks_exact_mut(4).zip(icon.pixels.chunks_exact(4)) { + d[0] = s[2]; + d[1] = s[1]; + d[2] = s[0]; + d[3] = s[3]; + } + let mask = CreateBitmap(icon.width as i32, icon.height as i32, 1, 1, None); + let info = ICONINFO { + fIcon: true.into(), + hbmMask: mask, + hbmColor: color, + ..Default::default() + }; + let hicon = CreateIconIndirect(&info).ok(); + let _ = DeleteObject(color.into()); + if !mask.is_invalid() { + let _ = DeleteObject(mask.into()); + } + hicon + } +} + +/// 基础图标 + 各颜色角标的 HICON 缓存。 +/// +/// 颜色数量有限(4 种),生成后缓存复用;缓存的 HICON 随进程存活,不逐个销毁。 +pub struct TrayIconSet { + base: HICON, + base_rgba: Option, + variants: HashMap, +} + +impl TrayIconSet { + pub fn new() -> Self { + let base = crate::tray::load_app_icon(); + Self { + base, + base_rgba: crate::icon::hicon_to_rgba(base), + variants: HashMap::new(), + } + } + + /// 指定角标颜色的图标;无角标、像素提取或生成失败时回退基础图标。 + pub fn icon(&mut self, badge: Option) -> HICON { + let Some(color) = badge else { + return self.base; + }; + if let Some(icon) = self.variants.get(&color) { + return *icon; + } + let Some(base_rgba) = &self.base_rgba else { + return self.base; + }; + match rgba_to_hicon(&compose(base_rgba, color)) { + Some(icon) => { + self.variants.insert(color, icon); + icon + } + None => self.base, + } + } +} + +impl Default for TrayIconSet { + fn default() -> Self { + Self::new() + } +} + +#[cfg(test)] +mod tests { + use super::*; + + fn all_bound() -> TrayBadges { + TrayBadges::default() + } + + #[test] + fn default_bindings_pick_expected_colors() { + let b = all_bound(); + let s = |st: TrayStatus| active_badge(&b, &st); + assert_eq!( + s(TrayStatus { + hidden: true, + ..Default::default() + }), + Some(BadgeColor::Red), + "存在隐藏窗口时应显示红色" + ); + assert_eq!( + s(TrayStatus { + auto_hide: true, + ..Default::default() + }), + Some(BadgeColor::Green), + "启用自动隐藏时应显示绿色" + ); + assert_eq!( + s(TrayStatus { + hide_current: true, + ..Default::default() + }), + Some(BadgeColor::Yellow), + "启用同时隐藏当前窗口时应显示黄色" + ); + assert_eq!( + s(TrayStatus { + freeze: true, + ..Default::default() + }), + Some(BadgeColor::Blue), + "启用进程冻结时应显示蓝色" + ); + assert_eq!(s(TrayStatus::default()), None, "无活跃状态时不显示角标"); + } + + #[test] + fn priority_red_over_green_over_yellow_over_blue() { + let b = all_bound(); + let all_on = TrayStatus { + hidden: true, + auto_hide: true, + hide_current: true, + freeze: true, + ..Default::default() + }; + assert_eq!( + active_badge(&b, &all_on), + Some(BadgeColor::Red), + "全部活跃时红色优先级最高" + ); + let no_hidden = TrayStatus { + hidden: false, + ..all_on + }; + assert_eq!( + active_badge(&b, &no_hidden), + Some(BadgeColor::Green), + "红色不活跃时轮到绿色" + ); + let only_low = TrayStatus { + hide_current: true, + freeze: true, + ..Default::default() + }; + assert_eq!( + active_badge(&b, &only_low), + Some(BadgeColor::Yellow), + "黄色优先于蓝色" + ); + } + + #[test] + fn empty_binding_skips_color_and_falls_through() { + // 红色置空:即使有隐藏窗口,也应轮到下一个活跃颜色。 + let b = TrayBadges { + red: String::new(), + ..TrayBadges::default() + }; + let st = TrayStatus { + hidden: true, + freeze: true, + ..Default::default() + }; + assert_eq!( + active_badge(&b, &st), + Some(BadgeColor::Blue), + "置空的颜色不显示,由更低优先级的活跃颜色顶上" + ); + } + + #[test] + fn extended_statuses_can_be_bound() { + let b = TrayBadges { + red: String::new(), + green: TRAY_STATUS_MONITOR_PAUSED.to_string(), + yellow: String::new(), + blue: TRAY_STATUS_ELEVATED.to_string(), + }; + let admin_only = TrayStatus { + elevated: true, + ..Default::default() + }; + assert_eq!( + active_badge(&b, &admin_only), + Some(BadgeColor::Blue), + "管理员身份可绑定为角标状态" + ); + let paused = TrayStatus { + elevated: true, + monitor_paused: true, + ..Default::default() + }; + assert_eq!( + active_badge(&b, &paused), + Some(BadgeColor::Green), + "监控暂停可绑定为角标状态,且绿色优先于蓝色" + ); + } + + #[test] + fn rebinding_a_color_changes_its_trigger() { + // 绿色改绑「存在隐藏窗口」:隐藏时显示绿点(红色已置空)。 + let b = TrayBadges { + red: String::new(), + green: bosskey_common::config::TRAY_STATUS_HIDDEN.to_string(), + ..TrayBadges::default() + }; + let st = TrayStatus { + hidden: true, + ..Default::default() + }; + assert_eq!(active_badge(&b, &st), Some(BadgeColor::Green)); + } + + fn blank(width: u32, height: u32) -> IconRgba { + IconRgba { + width, + height, + pixels: vec![0u8; (width * height * 4) as usize], + } + } + + fn pixel(icon: &IconRgba, x: u32, y: u32) -> [u8; 4] { + let i = ((y * icon.width + x) * 4) as usize; + icon.pixels[i..i + 4].try_into().unwrap() + } + + #[test] + fn badge_paints_bottom_right_dot_and_leaves_far_corner_untouched() { + let icon = compose(&blank(32, 32), BadgeColor::Red); + let px = pixel(&icon, 24, 24); + assert_eq!(&px[..3], &BadgeColor::Red.rgba()[..3], "圆心应为角标颜色"); + assert_eq!(px[3], 255, "圆心应完全不透明"); + assert_eq!(pixel(&icon, 2, 2), [0, 0, 0, 0], "对角像素应保持原样"); + } + + #[test] + fn badge_survives_small_icons() { + let icon = compose(&blank(16, 16), BadgeColor::Blue); + assert!( + icon.pixels.chunks_exact(4).any(|px| px[3] == 255), + "16×16 图标上也应画出角标" + ); + } + + #[test] + fn mismatched_buffer_is_left_untouched() { + let mut pixels = vec![0u8; 10]; + overlay_badge(&mut pixels, 32, 32, BadgeColor::Red.rgba()); + assert_eq!(pixels, vec![0u8; 10], "长度不符时不得越界或修改"); + } + + #[test] + fn compose_does_not_mutate_base() { + let base = blank(32, 32); + let _ = compose(&base, BadgeColor::Yellow); + assert!(base.pixels.iter().all(|b| *b == 0), "compose 不得修改原图"); + } +} diff --git a/crates/core/tests/agent_ipc.rs b/crates/core/tests/agent_ipc.rs index ed7ebd3..5eb1253 100644 --- a/crates/core/tests/agent_ipc.rs +++ b/crates/core/tests/agent_ipc.rs @@ -7,9 +7,10 @@ use bosskey_core::agent::{self, AgentOptions}; fn agent_answers_ipc_and_quits_cleanly() { let dir = tempfile::tempdir().unwrap(); let config_path = dir.path().join("config.json"); - bosskey_common::Config::default() - .save(&config_path) - .unwrap(); + let mut config = bosskey_common::Config::default(); + // 开启自动隐藏,验证 GetStatus 会如实回传该开关(供设置界面与托盘对齐)。 + config.setting.auto_hide_enabled = true; + config.save(&config_path).unwrap(); let pipe = r"\\.\pipe\bosskey_test_agent_e2e"; let options = AgentOptions { @@ -32,8 +33,15 @@ fn agent_answers_ipc_and_quits_cleanly() { let status = client.send(&Command::GetStatus).unwrap(); assert!( - matches!(status, Response::Status { hidden: false, .. }), - "合并状态应一次往返返回隐藏态与权限: {status:?}" + matches!( + status, + Response::Status { + hidden: false, + auto_hide_enabled: true, + .. + } + ), + "合并状态应一次往返返回隐藏态、权限与自动隐藏开关: {status:?}" ); let reload = client.send(&Command::ReloadConfig).unwrap(); diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts index caeeadd..0031f49 100644 --- a/docs/.vitepress/config.mts +++ b/docs/.vitepress/config.mts @@ -84,7 +84,7 @@ export default defineConfig(async () => { { text: '热键与鼠标手势', link: '/guide/hotkeys' }, { text: '进程冻结', link: '/guide/freeze' }, { text: '其他选项', link: '/guide/options' }, - { text: '通知设置', link: '/guide/notifications' }, + { text: '提示设置', link: '/guide/notifications' }, { text: '开机自启', link: '/guide/autostart' }, ], }, @@ -192,7 +192,7 @@ export default defineConfig(async () => { { text: 'Hotkeys & mouse gestures', link: '/en/guide/hotkeys' }, { text: 'Process freezing', link: '/en/guide/freeze' }, { text: 'Other options', link: '/en/guide/options' }, - { text: 'Notifications', link: '/en/guide/notifications' }, + { text: 'Alerts', link: '/en/guide/notifications' }, { text: 'Start with Windows', link: '/en/guide/autostart' }, ], }, @@ -290,7 +290,7 @@ export default defineConfig(async () => { { text: '快速鍵與滑鼠手勢', link: '/zh-tw/guide/hotkeys' }, { text: '程序凍結', link: '/zh-tw/guide/freeze' }, { text: '其他選項', link: '/zh-tw/guide/options' }, - { text: '通知設定', link: '/zh-tw/guide/notifications' }, + { text: '提示設定', link: '/zh-tw/guide/notifications' }, { text: '開機自動啟動', link: '/zh-tw/guide/autostart' }, ], }, diff --git a/docs/dev/config-reference.md b/docs/dev/config-reference.md index 90df20b..e733bdb 100644 --- a/docs/dev/config-reference.md +++ b/docs/dev/config-reference.md @@ -49,6 +49,8 @@ Boss Key 的配置保存在与可执行文件**同目录**的 `config.json` 中 | `hide_current` | bool | `true` | [同时隐藏当前活动窗口](/guide/options#同时隐藏当前活动窗口) | | `click_to_hide` | bool | `true` | [单击托盘切换隐藏](/guide/options#单击托盘图标切换隐藏) | | `hide_icon_after_hide` | bool | `false` | [隐藏后同时隐藏托盘图标](/guide/options#隐藏后同时隐藏托盘图标) | +| `tray_badges` | object | 见下 | [图标状态提示](/guide/notifications#图标状态提示) | +| `tray_show_tooltip` | bool | `true` | [显示图标悬浮名称](/guide/notifications#显示图标悬浮名称) | | `freeze_after_hide` | bool | `false` | [进程冻结总开关](/guide/freeze#隐藏窗口时冻结进程) | | `enhanced_freeze` | bool | `false` | [增强冻结](/guide/freeze#使用增强冻结) | | `freeze_whole_tree` | bool | `false` | [冻结完整进程](/guide/freeze#冻结完整进程) | @@ -85,6 +87,19 @@ Boss Key 的配置保存在与可执行文件**同目录**的 `config.json` 中 全新安装默认开启**中键单击**(`middle.enabled = true`,`clicks = 1`),其余四颗关闭。配置文件缺 `mouse` 一节的老配置读进来则**全关**。 ::: +### `setting.tray_badges` + +[图标状态提示](/guide/notifications#图标状态提示):四种颜色的圆点角标各自绑定一个状态源,多个状态同时活跃时按**红 > 绿 > 黄 > 蓝**的优先级只显示一个圆点。 + +| 字段 | 默认 | 默认含义 | +| --- | --- | --- | +| `red` | `"hidden"` | 存在隐藏中的窗口 | +| `green` | `"auto_hide"` | 启用了自动隐藏 | +| `yellow` | `"hide_current"` | 启用了同时隐藏当前窗口 | +| `blue` | `"freeze"` | 启用了进程冻结 | + +每项取值:`hidden`(存在隐藏中的窗口)|`auto_hide`(启用了自动隐藏)|`hide_current`(启用了同时隐藏当前窗口)|`freeze`(启用了进程冻结)|`elevated`(以管理员身份运行)|`monitor_paused`(热键监控已暂停)|`""`(置空 = 不显示该颜色);未知取值读取时归一为置空。 + ## `notifications` | 字段 | 默认 | 说明 | diff --git a/docs/dev/frontend.md b/docs/dev/frontend.md index af2938a..619435e 100644 --- a/docs/dev/frontend.md +++ b/docs/dev/frontend.md @@ -43,7 +43,7 @@ apps/config/ui/ | --- | --- | --- | | 窗口绑定 | `BindingPanel` | 窗口列表 + 窗口/进程规则 | | 热键与鼠标 | `HotkeysPanel` | 键盘热键、鼠标连击、四角、空闲自动隐藏 | -| 通知设置 | `NotificationsPanel` | 逐事件通知开关 | +| 提示设置 | `NotificationsPanel` | 逐事件通知开关与图标状态角标 | | 其他选项 | `OptionsPanel` | 静音/暂停/冻结/权限/日志/工具 | | 关于与反馈 | `AboutPanel` | 版本、更新、公告、反馈 | diff --git a/docs/en/dev/config-reference.md b/docs/en/dev/config-reference.md index 0d073a5..76f8b69 100644 --- a/docs/en/dev/config-reference.md +++ b/docs/en/dev/config-reference.md @@ -49,6 +49,8 @@ The settings window reads and writes the configuration automatically. This page | `hide_current` | bool | `true` | [Also hide the active window](/en/guide/options) | | `click_to_hide` | bool | `true` | [Toggle hiding by clicking the tray icon](/en/guide/options) | | `hide_icon_after_hide` | bool | `false` | [Also hide the tray icon](/en/guide/options) | +| `tray_badges` | object | See below | [Tray icon status](/en/guide/notifications#tray-icon-status) | +| `tray_show_tooltip` | bool | `true` | [Tray icon tooltip](/en/guide/notifications#tray-icon-tooltip) | | `freeze_after_hide` | bool | `false` | [Freezing master switch](/en/guide/freeze) | | `enhanced_freeze` | bool | `false` | [Enhanced freezing](/en/guide/freeze) | | `freeze_whole_tree` | bool | `false` | [Freeze the whole process tree](/en/guide/freeze) | @@ -85,6 +87,19 @@ Each button is a `MouseButton`: `{ enabled: bool, clicks: 1..=3, modifiers: stri A fresh installation enables **a middle-button single click** (`middle.enabled = true`, `clicks = 1`) and leaves the other four off. An old configuration without a `mouse` section reads as **all off**. ::: +### `setting.tray_badges` + +[Tray icon status](/en/guide/notifications#tray-icon-status): each of the four colored dot badges is bound to a state source; when several bound states are active at once, only one dot is shown, in **red > green > yellow > blue** priority order. + +| Field | Default | Default meaning | +| --- | --- | --- | +| `red` | `"hidden"` | Windows are hidden | +| `green` | `"auto_hide"` | Auto hide is enabled | +| `yellow` | `"hide_current"` | Also-hide-active-window is enabled | +| `blue` | `"freeze"` | Process freezing is enabled | + +Each field accepts `hidden` (windows are hidden) \| `auto_hide` (auto hide is enabled) \| `hide_current` (also-hide-active-window is enabled) \| `freeze` (process freezing is enabled) \| `elevated` (running as administrator) \| `monitor_paused` (hotkey monitoring is paused) \| `""` (empty = do not show that color); unknown values are normalised to empty on read. + ## `notifications` | Field | Default | Description | diff --git a/docs/en/dev/frontend.md b/docs/en/dev/frontend.md index c7b1e2b..77597af 100644 --- a/docs/en/dev/frontend.md +++ b/docs/en/dev/frontend.md @@ -43,7 +43,7 @@ The settings window is organised as tabs, one panel component each: | --- | --- | --- | | Windows | `BindingPanel` | Window list + window/process rules | | Hotkeys & Mouse | `HotkeysPanel` | Keyboard hotkeys, mouse clicks, corners, auto-hide on idle | -| Notifications | `NotificationsPanel` | Per-event notification switches | +| Alerts | `NotificationsPanel` | Per-event notification switches and tray icon badges | | Options | `OptionsPanel` | Muting/pausing/freezing/privileges/logs/tools | | About & Feedback | `AboutPanel` | Version, updates, announcements, feedback | diff --git a/docs/en/guide/getting-started.md b/docs/en/guide/getting-started.md index a87b3a1..e44c24e 100644 --- a/docs/en/guide/getting-started.md +++ b/docs/en/guide/getting-started.md @@ -16,7 +16,7 @@ The **first time** you open Boss Key after installing or updating, the **setting | --- | --- | --- | | **Windows** | Choose the windows / processes to hide | [Binding windows & processes](/en/guide/binding) | | **Hotkeys & Mouse** | Keyboard hotkeys, mouse clicks, corner gestures, auto-hide on idle | [Hotkeys & mouse gestures](/en/guide/hotkeys) | -| **Notifications** | Per-event control of tray notifications | [Notifications](/en/guide/notifications) | +| **Alerts** | Notifications and tray icon status badges | [Alerts](/en/guide/notifications) | | **Options** | Muting, pause key, freezing, privileges, logs, recovery tool, and more | [Other options](/en/guide/options) | | **About & Feedback** | Version information, update checks, announcements, feedback | [Updates & feedback](/en/guide/update) | @@ -72,6 +72,7 @@ Day to day, **right-click the tray icon** to open the menu. It offers: - **Settings**: open the settings window. - **Hide Windows / Show Windows**: quickly hide or show the bound windows. - **Window Recovery Tool**: open the settings window on the window recovery tool — see [Window recovery & crash self-healing](/en/guide/recovery). +- **Auto Hide**: pause / resume [auto-hide on idle](/en/guide/hotkeys#auto-hide-when-idle); a check mark means it is currently enabled. - **Start with Windows**: toggle starting automatically when you sign in. - **Exit**: end the core process. diff --git a/docs/en/guide/hotkeys.md b/docs/en/guide/hotkeys.md index e3d9290..a8b8f06 100644 --- a/docs/en/guide/hotkeys.md +++ b/docs/en/guide/hotkeys.md @@ -92,6 +92,7 @@ Corner hiding relies on a low-level mouse hook (`WH_MOUSE_LL`), installed only w With **Enable auto-hide** on, Boss Key hides the bound windows automatically once the keyboard and mouse have been **idle** for the configured time. - **Idle time**: the period without input (in minutes) that triggers it. Default **5 minutes**. +- **Quick toggle from the tray menu**: right-click the tray icon and click **Auto Hide** to pause / resume auto-hide without opening the settings window. A check mark means it is currently enabled, and the change stays in sync with the settings window. The tray icon can also show this state as a badge — see [Tray icon status](/en/guide/notifications#tray-icon-status). ## Summary diff --git a/docs/en/guide/notifications.md b/docs/en/guide/notifications.md index aadd82e..7371368 100644 --- a/docs/en/guide/notifications.md +++ b/docs/en/guide/notifications.md @@ -1,10 +1,10 @@ --- -title: Notifications +title: Alerts --- -# Notifications +# Alerts -Boss Key shows **tray notifications** when certain events happen. The **Notifications** tab of the settings window lets you control which ones appear, so you stay informed without being interrupted. +Boss Key reflects the core's state through two kinds of hints: **tray notifications** and **tray icon badges**. The **Alerts** tab of the settings window lets you control which notifications appear and which states the icon badge shows, so you stay informed without being interrupted. ## Controllable events @@ -16,11 +16,35 @@ Boss Key shows **tray notifications** when certain events happen. The **Notifica | **Windows hidden** | Shown each time windows are hidden | Off | | **Windows shown** | Shown each time windows are restored | Off | +## Tray icon status + +The tray icon can overlay **a colored dot badge in its bottom-right corner** that reflects the core's current state. Each of the four colors is bound to a state source; the defaults are: + +| Color | Default binding | +| --- | --- | +| Red | Windows are hidden | +| Green | Auto hide is enabled | +| Yellow | Also-hide-active-window is enabled | +| Blue | Process freezing is enabled | + +- Each color can be rebound to another state (besides the four above, **Running as administrator** and **Hotkey monitoring is paused** are also available), or set to "Do not show" to disable it. +- When several bound states are active at once, only one dot is shown, in **red > green > yellow > blue** priority order. + +::: warning Discretion note +Badges — especially "Windows are hidden" — also reveal the core's state to onlookers. Disable the corresponding color if discretion matters more to you. +::: + +## Tray icon tooltip + +Hovering over the tray icon shows "Boss Key" by default. Turn this option off to show no text at all for extra discretion. + +- **On** by default. + ## Recommendations - **Hide / show notifications are off by default**: a notification on every hide would rather defeat the purpose, so they are not shown. Turn them on if you want explicit feedback. - **Start / exit / startup notifications are on by default**: these are infrequent events, and keeping them helps you confirm the core's state. ::: info Not the same as "Also hide the tray icon" -[Also hide the tray icon](/en/guide/options) controls whether **the icon itself is visible**; this page controls whether **notifications appear**. The two are independent. +[Also hide the tray icon](/en/guide/options) controls whether **the icon itself is visible**; this page controls **notifications and icon badges**. They are independent. ::: diff --git a/docs/guide/getting-started.md b/docs/guide/getting-started.md index ab820db..317824f 100644 --- a/docs/guide/getting-started.md +++ b/docs/guide/getting-started.md @@ -16,7 +16,7 @@ title: 快速上手 | --- | --- | --- | | **窗口绑定** | 选择要隐藏的窗口 / 进程 | [绑定窗口与进程](/guide/binding) | | **热键与鼠标** | 键盘热键、鼠标连击、四角手势、空闲自动隐藏 | [热键与鼠标手势](/guide/hotkeys) | -| **通知设置** | 逐事件控制托盘气泡通知 | [通知设置](/guide/notifications) | +| **提示设置** | 控制气泡通知与图标状态角标 | [提示设置](/guide/notifications) | | **其他选项** | 静音、暂停键、冻结、权限、日志、恢复工具等 | [其他选项](/guide/options) | | **关于与反馈** | 版本信息、检查更新、公告、问题反馈 | [检查更新与反馈](/guide/update) | @@ -72,6 +72,7 @@ title: 快速上手 - **设置**:打开配置界面。 - **隐藏窗口 / 显示窗口**:快速隐藏或显示已绑定的窗口。 - **窗口恢复工具**:打开配置页面并切换至窗口恢复工具,查看[窗口恢复与崩溃防护](/guide/recovery)。 +- **自动隐藏**:暂停 / 启用[空闲自动隐藏](/guide/hotkeys#空闲自动隐藏),勾选标记表示当前已启用。 - **开机自启**:切换是否随系统登录自动启动。 - **退出**:结束核心进程。 diff --git a/docs/guide/hotkeys.md b/docs/guide/hotkeys.md index 2ce8864..3c83958 100644 --- a/docs/guide/hotkeys.md +++ b/docs/guide/hotkeys.md @@ -92,6 +92,7 @@ Boss Key 默认使用系统的 `RegisterHotKey` 注册全局热键。若某个 开启 **启用自动隐藏** 后,当键盘和鼠标在设定时长内**无任何操作**时,Boss Key 会自动隐藏已绑定的窗口——适合临时离开工位的场景。 - **空闲时长**:无操作达到该时长(分钟)后触发,默认 **5 分钟**。 +- **托盘菜单快速切换**:右键托盘图标,点击 **自动隐藏** 菜单项即可暂停 / 启用自动隐藏,无需打开设置界面;勾选标记表示当前已启用,切换结果与设置界面保持同步。托盘图标还可叠加角标显示该状态,见[图标状态提示](/guide/notifications#图标状态提示)。 ## 小结 diff --git a/docs/guide/notifications.md b/docs/guide/notifications.md index 20413f4..1d62659 100644 --- a/docs/guide/notifications.md +++ b/docs/guide/notifications.md @@ -1,10 +1,10 @@ --- -title: 通知设置 +title: 提示设置 --- -# 通知设置 +# 提示设置 -Boss Key 会在一些事件发生时弹出**托盘气泡通知**。在配置界面的 **通知设置** 标签页,你可以控制是否弹出通知,做到既知情又不打扰。 +Boss Key 通过**托盘气泡通知**与**托盘图标角标**两类提示反映核心状态。在配置界面的 **提示设置** 标签页,你可以控制各类通知是否弹出、图标角标显示哪些状态,做到既知情又不打扰。 ## 可控制的通知事件 @@ -16,11 +16,35 @@ Boss Key 会在一些事件发生时弹出**托盘气泡通知**。在配置界 | **隐藏窗口** | 每次隐藏窗口时提示 | 关闭 | | **显示窗口** | 每次显示窗口时提示 | 关闭 | +## 图标状态提示 + +托盘图标可在**右下角叠加一个彩色圆点角标**,直观反映核心当前状态。四种颜色各自绑定一个状态源,默认绑定如下: + +| 颜色 | 默认绑定状态 | +| --- | --- | +| 红色 | 存在隐藏中的窗口 | +| 绿色 | 启用了自动隐藏 | +| 黄色 | 启用了同时隐藏当前窗口 | +| 蓝色 | 启用了进程冻结 | + +- 每种颜色都可以改绑为其他状态(除上表四种外,还可绑定**以管理员身份运行**、**热键监控已暂停**),或选择「不显示」置空该颜色。 +- 多个绑定状态同时满足时,按 **红 > 绿 > 黄 > 蓝** 的优先级只显示一个圆点。 + +::: warning 隐蔽性提示 +角标(尤其是「存在隐藏中的窗口」)也会向旁人透露核心状态。若你更在意隐蔽性,可将相应颜色置空。 +::: + +## 显示图标悬浮名称 + +鼠标悬停在托盘图标上时默认显示「Boss Key」。关闭该选项后,悬停不显示任何文字,更隐蔽。 + +- 默认**开启**。 + ## 使用建议 - **隐藏 / 显示通知默认关闭**:因为摸鱼场景下,每次隐藏都弹通知反而容易"暴露",因此默认不提示。若你希望有明确反馈可自行开启。 - **启动 / 退出 / 自启通知默认开启**:这些是低频事件,保留提示有助于你确认核心状态。 ::: info 与"隐藏托盘图标"的区别 -[隐藏后同时隐藏托盘图标](/guide/options#隐藏后同时隐藏托盘图标) 控制的是**图标本身是否可见**;本页控制的是**气泡通知是否弹出**,两者相互独立。 +[隐藏后同时隐藏托盘图标](/guide/options#隐藏后同时隐藏托盘图标) 控制的是**图标本身是否可见**;本页控制的是**气泡通知与图标角标**,三者相互独立。 ::: diff --git a/docs/zh-tw/dev/config-reference.md b/docs/zh-tw/dev/config-reference.md index 79c2448..a4ae92f 100644 --- a/docs/zh-tw/dev/config-reference.md +++ b/docs/zh-tw/dev/config-reference.md @@ -49,6 +49,8 @@ Boss Key 的設定儲存在與執行檔**同資料夾**的 `config.json` 中。* | `hide_current` | bool | `true` | [同時隱藏目前使用中的視窗](/zh-tw/guide/options) | | `click_to_hide` | bool | `true` | [按一下通知區域圖示切換隱藏](/zh-tw/guide/options) | | `hide_icon_after_hide` | bool | `false` | [隱藏後一併隱藏通知區域圖示](/zh-tw/guide/options) | +| `tray_badges` | object | 見下 | [圖示狀態提示](/zh-tw/guide/notifications#圖示狀態提示) | +| `tray_show_tooltip` | bool | `true` | [顯示圖示懸浮名稱](/zh-tw/guide/notifications#顯示圖示懸浮名稱) | | `freeze_after_hide` | bool | `false` | [程序凍結總開關](/zh-tw/guide/freeze) | | `enhanced_freeze` | bool | `false` | [增強凍結](/zh-tw/guide/freeze) | | `freeze_whole_tree` | bool | `false` | [凍結完整程序](/zh-tw/guide/freeze) | @@ -85,6 +87,19 @@ Boss Key 的設定儲存在與執行檔**同資料夾**的 `config.json` 中。* 全新安裝預設開啟**中鍵按一下**(`middle.enabled = true`,`clicks = 1`),其餘四顆關閉。設定檔缺 `mouse` 一節的舊設定讀進來則**全關**。 ::: +### `setting.tray_badges` + +[圖示狀態提示](/zh-tw/guide/notifications#圖示狀態提示):四種顏色的圓點角標各自繫結一個狀態來源,多個狀態同時活躍時依**紅 > 綠 > 黃 > 藍**的優先順序僅顯示一個圓點。 + +| 欄位 | 預設 | 預設含義 | +| --- | --- | --- | +| `red` | `"hidden"` | 存在隱藏中的視窗 | +| `green` | `"auto_hide"` | 已啟用自動隱藏 | +| `yellow` | `"hide_current"` | 已啟用同時隱藏目前視窗 | +| `blue` | `"freeze"` | 已啟用程序凍結 | + +每項取值:`hidden`(存在隱藏中的視窗)|`auto_hide`(已啟用自動隱藏)|`hide_current`(已啟用同時隱藏目前視窗)|`freeze`(已啟用程序凍結)|`elevated`(以系統管理員身分執行)|`monitor_paused`(快速鍵監控已暫停)|`""`(留空 = 不顯示該顏色);未知取值讀取時正規化為留空。 + ## `notifications` | 欄位 | 預設 | 說明 | diff --git a/docs/zh-tw/dev/frontend.md b/docs/zh-tw/dev/frontend.md index 1c9ee78..c807bd9 100644 --- a/docs/zh-tw/dev/frontend.md +++ b/docs/zh-tw/dev/frontend.md @@ -43,7 +43,7 @@ apps/config/ui/ | --- | --- | --- | | 視窗綁定 | `BindingPanel` | 視窗清單 + 視窗/程序規則 | | 快速鍵與滑鼠 | `HotkeysPanel` | 鍵盤快速鍵、滑鼠連按、四角、閒置自動隱藏 | -| 通知設定 | `NotificationsPanel` | 逐事件通知開關 | +| 提示設定 | `NotificationsPanel` | 逐事件通知開關與圖示狀態角標 | | 其他選項 | `OptionsPanel` | 靜音/暫停/凍結/權限/記錄檔/工具 | | 關於與意見回饋 | `AboutPanel` | 版本、更新、公告、意見回饋 | diff --git a/docs/zh-tw/guide/getting-started.md b/docs/zh-tw/guide/getting-started.md index dd541fc..99ae408 100644 --- a/docs/zh-tw/guide/getting-started.md +++ b/docs/zh-tw/guide/getting-started.md @@ -16,7 +16,7 @@ title: 快速上手 | --- | --- | --- | | **視窗綁定** | 選擇要隱藏的視窗/程序 | [綁定視窗與程序](/zh-tw/guide/binding) | | **快速鍵與滑鼠** | 鍵盤快速鍵、滑鼠連按、四角手勢、閒置自動隱藏 | [快速鍵與滑鼠手勢](/zh-tw/guide/hotkeys) | -| **通知設定** | 逐事件控制通知區域通知 | [通知設定](/zh-tw/guide/notifications) | +| **提示設定** | 控制氣泡通知與圖示狀態角標 | [提示設定](/zh-tw/guide/notifications) | | **其他選項** | 靜音、暫停鍵、凍結、權限、記錄檔、復原工具等 | [其他選項](/zh-tw/guide/options) | | **關於與意見回饋** | 版本資訊、檢查更新、公告、問題回報 | [檢查更新與意見回饋](/zh-tw/guide/update) | @@ -72,6 +72,7 @@ title: 快速上手 - **設定**:開啟設定介面。 - **隱藏視窗/顯示視窗**:快速隱藏或顯示已綁定的視窗。 - **視窗復原工具**:開啟設定頁面並切換至視窗復原工具,參閱[視窗復原與當機防護](/zh-tw/guide/recovery)。 +- **自動隱藏**:暫停/啟用[閒置自動隱藏](/zh-tw/guide/hotkeys#閒置自動隱藏),勾選標記表示目前已啟用。 - **開機自動啟動**:切換是否隨系統登入自動啟動。 - **結束**:結束核心程序。 diff --git a/docs/zh-tw/guide/hotkeys.md b/docs/zh-tw/guide/hotkeys.md index d279e40..437d2b0 100644 --- a/docs/zh-tw/guide/hotkeys.md +++ b/docs/zh-tw/guide/hotkeys.md @@ -92,6 +92,7 @@ Boss Key 預設使用系統的 `RegisterHotKey` 註冊全域快速鍵。若某 開啟 **啟用自動隱藏** 後,當鍵盤和滑鼠在設定時間內**無任何操作**時,Boss Key 會自動隱藏已綁定的視窗。 - **閒置時間**:無操作達到該時間(分鐘)後觸發,預設 **5 分鐘**。 +- **通知區域選單快速切換**:以右鍵按一下通知區域圖示,點選 **自動隱藏** 選單項目即可暫停/啟用自動隱藏,不需開啟設定介面;勾選標記表示目前已啟用,切換結果與設定介面保持同步。通知區域圖示還可疊加角標顯示該狀態,見[圖示狀態提示](/zh-tw/guide/notifications#圖示狀態提示)。 ## 小結 diff --git a/docs/zh-tw/guide/notifications.md b/docs/zh-tw/guide/notifications.md index 233c3d9..837f00c 100644 --- a/docs/zh-tw/guide/notifications.md +++ b/docs/zh-tw/guide/notifications.md @@ -1,10 +1,10 @@ --- -title: 通知設定 +title: 提示設定 --- -# 通知設定 +# 提示設定 -Boss Key 會在一些事件發生時顯示**通知區域通知**。在設定介面的 **通知設定** 標籤頁,您可以控制是否顯示通知,做到既知情又不打擾。 +Boss Key 透過**通知區域氣泡通知**與**圖示角標**兩類提示反映核心狀態。在設定介面的 **提示設定** 標籤頁,您可以控制各類通知是否顯示、圖示角標顯示哪些狀態,做到既知情又不打擾。 ## 可控制的通知事件 @@ -16,11 +16,35 @@ Boss Key 會在一些事件發生時顯示**通知區域通知**。在設定介 | **隱藏視窗** | 每次隱藏視窗時提示 | 關閉 | | **顯示視窗** | 每次顯示視窗時提示 | 關閉 | +## 圖示狀態提示 + +通知區域圖示可在**右下角疊加一個彩色圓點角標**,直觀反映核心目前狀態。四種顏色各自繫結一個狀態來源,預設繫結如下: + +| 顏色 | 預設繫結狀態 | +| --- | --- | +| 紅色 | 存在隱藏中的視窗 | +| 綠色 | 已啟用自動隱藏 | +| 黃色 | 已啟用同時隱藏目前視窗 | +| 藍色 | 已啟用程序凍結 | + +- 每種顏色都可以改繫結為其他狀態(除上表四種外,還可繫結**以系統管理員身分執行**、**快速鍵監控已暫停**),或選擇「不顯示」停用該顏色。 +- 多個繫結狀態同時滿足時,依 **紅 > 綠 > 黃 > 藍** 的優先順序僅顯示一個圓點。 + +::: warning 隱密性提示 +角標(尤其是「存在隱藏中的視窗」)也會向旁人透露核心狀態。若您更在意隱密性,可停用相應顏色。 +::: + +## 顯示圖示懸浮名稱 + +滑鼠停留在通知區域圖示上時預設顯示「Boss Key」。關閉該選項後,停留不顯示任何文字,更為隱密。 + +- 預設**開啟**。 + ## 使用建議 - **隱藏/顯示通知預設關閉**:因為摸魚情境下,每次隱藏都顯示通知反而容易「曝光」,因此預設不提示。若您希望有明確回饋可自行開啟。 - **啟動/結束/自動啟動通知預設開啟**:這些是低頻事件,保留提示有助於您確認核心狀態。 ::: info 與「隱藏通知區域圖示」的區別 -[隱藏後一併隱藏通知區域圖示](/zh-tw/guide/options) 控制的是**圖示本身是否可見**;本頁控制的是**通知是否顯示**,兩者相互獨立。 +[隱藏後一併隱藏通知區域圖示](/zh-tw/guide/options) 控制的是**圖示本身是否可見**;本頁控制的是**氣泡通知與圖示角標**,三者相互獨立。 ::: diff --git a/qodana.sarif.json b/qodana.sarif.json new file mode 100644 index 0000000..6f65109 --- /dev/null +++ b/qodana.sarif.json @@ -0,0 +1,27547 @@ +{ + "$schema": "https://raw.githubusercontent.com/schemastore/schemastore/master/src/schemas/json/sarif-2.1.0-rtm.5.json", + "version": "2.1.0", + "runs": [ + { + "tool": { + "driver": { + "name": "RR", + "fullName": "Qodana", + "version": "261.26222.73", + "rules": [], + "taxa": [ + { + "id": "JavaScript 和 TypeScript", + "name": "JavaScript 和 TypeScript" + }, + { + "id": "JavaScript 和 TypeScript/控制流问题", + "name": "控制流问题", + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript", + "index": 0, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HTTP 客户端", + "name": "HTTP 客户端" + }, + { + "id": "Rust", + "name": "Rust" + }, + { + "id": "Rust/Lint", + "name": "Lint", + "relationships": [ + { + "target": { + "id": "Rust", + "index": 3, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "Dockerfile", + "name": "Dockerfile" + }, + { + "id": "Rust/Lints", + "name": "Lints", + "relationships": [ + { + "target": { + "id": "Rust", + "index": 3, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "Rust/Lints/命名约定", + "name": "命名约定", + "relationships": [ + { + "target": { + "id": "Rust/Lints", + "index": 6, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "Angular", + "name": "Angular" + }, + { + "id": "PostCSS", + "name": "PostCSS" + }, + { + "id": "Svelte", + "name": "Svelte" + }, + { + "id": "XPath", + "name": "XPath" + }, + { + "id": "Sass_SCSS", + "name": "Sass/SCSS" + }, + { + "id": "Shell 脚本", + "name": "Shell 脚本" + }, + { + "id": "JavaScript 和 TypeScript/单元测试", + "name": "单元测试", + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript", + "index": 0, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "校对", + "name": "校对" + }, + { + "id": "JSON 和 JSON5", + "name": "JSON 和 JSON5" + }, + { + "id": "MongoJS", + "name": "MongoJS" + }, + { + "id": "JavaScript 和 TypeScript/常规", + "name": "常规", + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript", + "index": 0, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JavaScript 和 TypeScript/代码样式问题", + "name": "代码样式问题", + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript", + "index": 0, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MySQL", + "name": "MySQL" + }, + { + "id": "JavaScript 和 TypeScript/可能不合需要的代码结构", + "name": "可能不合需要的代码结构", + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript", + "index": 0, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JavaScript 和 TypeScript/Flow 类型检查器", + "name": "Flow 类型检查器", + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript", + "index": 0, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "Markdown", + "name": "Markdown" + }, + { + "id": "JetBrains Academy", + "name": "JetBrains Academy" + }, + { + "id": "JetBrains Academy/Yaml 配置", + "name": "Yaml 配置", + "relationships": [ + { + "target": { + "id": "JetBrains Academy", + "index": 24, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JavaScript 和 TypeScript/可能的 bug", + "name": "可能的 bug", + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript", + "index": 0, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HTML", + "name": "HTML" + }, + { + "id": "JavaScript 和 TypeScript/未使用的符号", + "name": "未使用的符号", + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript", + "index": 0, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JavaScript 和 TypeScript/数据流", + "name": "数据流", + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript", + "index": 0, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JavaScript 和 TypeScript/按位运算问题", + "name": "按位运算问题", + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript", + "index": 0, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JavaScript 和 TypeScript/ES2015 迁移协助", + "name": "ES2015 迁移协助", + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript", + "index": 0, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "常规", + "name": "常规" + }, + { + "id": "HTML/可访问性", + "name": "可访问性", + "relationships": [ + { + "target": { + "id": "HTML", + "index": 27, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JavaScript 和 TypeScript/React", + "name": "React", + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript", + "index": 0, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JavaScript 和 TypeScript/TypeScript", + "name": "TypeScript", + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript", + "index": 0, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JavaScript 和 TypeScript/有效性问题", + "name": "有效性问题", + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript", + "index": 0, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "Rust/Cargo.toml", + "name": "Cargo.toml", + "relationships": [ + { + "target": { + "id": "Rust", + "index": 3, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "Docker-compose", + "name": "Docker-compose" + }, + { + "id": "JavaScript 和 TypeScript/可能引起混淆的代码结构", + "name": "可能引起混淆的代码结构", + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript", + "index": 0, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SQL", + "name": "SQL" + }, + { + "id": "CSS", + "name": "CSS" + }, + { + "id": "CSS/无效元素", + "name": "无效元素", + "relationships": [ + { + "target": { + "id": "CSS", + "index": 41, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JavaScript 和 TypeScript/Try 语句问题", + "name": "Try 语句问题", + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript", + "index": 0, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "结构搜索", + "name": "结构搜索" + }, + { + "id": "JavaScript 和 TypeScript/函数指标", + "name": "函数指标", + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript", + "index": 0, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "YAML", + "name": "YAML" + }, + { + "id": "XML", + "name": "XML" + }, + { + "id": "JavaScript 和 TypeScript/赋值问题", + "name": "赋值问题", + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript", + "index": 0, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CSS/代码样式问题", + "name": "代码样式问题", + "relationships": [ + { + "target": { + "id": "CSS", + "index": 41, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "Less", + "name": "Less" + }, + { + "id": "正则表达式", + "name": "正则表达式" + }, + { + "id": "Vue", + "name": "Vue" + }, + { + "id": "JavaScript 和 TypeScript/Node.js", + "name": "Node.js", + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript", + "index": 0, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "XSLT", + "name": "XSLT" + }, + { + "id": "JavaScript 和 TypeScript/Import 和依赖项", + "name": "Import 和依赖项", + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript", + "index": 0, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "RELAX NG", + "name": "RELAX NG" + }, + { + "id": "CSS/可能的 bug", + "name": "可能的 bug", + "relationships": [ + { + "target": { + "id": "CSS", + "index": 41, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JavaScript 和 TypeScript/命名约定", + "name": "命名约定", + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript", + "index": 0, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JavaScript 和 TypeScript/switch 语句问题", + "name": "switch 语句问题", + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript", + "index": 0, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JavaScript 和 TypeScript/DOM 问题", + "name": "DOM 问题", + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript", + "index": 0, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JavaScript 和 TypeScript/Async 代码和 promise", + "name": "Async 代码和 promise", + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript", + "index": 0, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JavaScript 和 TypeScript/代码质量工具", + "name": "代码质量工具", + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript", + "index": 0, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "代码覆盖率", + "name": "代码覆盖率" + }, + { + "id": "GitHub 操作", + "name": "GitHub 操作" + }, + { + "id": "GitLab CI_CD", + "name": "GitLab CI/CD" + }, + { + "id": "Qodana", + "name": "Qodana" + }, + { + "id": "CSS/代码质量工具", + "name": "代码质量工具", + "relationships": [ + { + "target": { + "id": "CSS", + "index": 41, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PostgreSQL", + "name": "PostgreSQL" + }, + { + "id": "SQL Server", + "name": "SQL Server" + }, + { + "id": "Dev Container", + "name": "Dev Container" + }, + { + "id": "JSONPath", + "name": "JSONPath" + }, + { + "id": "安全性", + "name": "安全性" + }, + { + "id": "Oracle", + "name": "Oracle" + }, + { + "id": "国际化", + "name": "国际化" + }, + { + "id": "TOML", + "name": "TOML" + }, + { + "id": "版本控制", + "name": "版本控制" + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + "extensions": [ + { + "name": "JavaScript", + "version": "261.26222.73", + "rules": [ + { + "id": "ConstantConditionalExpressionJS", + "shortDescription": { + "text": "常量条件表达式" + }, + "fullDescription": { + "text": "报告格式为 'true? 的条件表达式 result1: result2' 或 'false? result1: result2。 建议简化该表达式。 Inspection ID: ConstantConditionalExpressionJS'", + "markdown": "报告格式为 `true? 的条件表达式 result1: result2` 或 `false? result1: result2``。\n建议简化该表达式。\n`\n\nInspection ID: ConstantConditionalExpressionJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ConstantConditionalExpressionJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/控制流问题", + "index": 1, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSTestFailedLine", + "shortDescription": { + "text": "在测试代码中高亮显示失败的行" + }, + "fullDescription": { + "text": "报告失败的方法调用或测试中的断言。 Inspection ID: JSTestFailedLine", + "markdown": "报告失败的方法调用或测试中的断言。\n\nInspection ID: JSTestFailedLine" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSTestFailedLine", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/单元测试", + "index": 14, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSValidateJSDoc", + "shortDescription": { + "text": "JSDoc 中的语法错误和未解析的引用" + }, + "fullDescription": { + "text": "报告文档注释中的语法差异。 Inspection ID: JSValidateJSDoc", + "markdown": "报告文档注释中的语法差异。\n\nInspection ID: JSValidateJSDoc" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSValidateJSDoc", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/常规", + "index": 18, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "IfStatementWithTooManyBranchesJS", + "shortDescription": { + "text": "'if' 语句的分支过多" + }, + "fullDescription": { + "text": "报告分支过多的 'if' 语句。 此类语句可能令人困惑,并且通常表明设计抽象级别不足。 使用下面的字段可指定预期的最大分支数。 Inspection ID: IfStatementWithTooManyBranchesJS", + "markdown": "报告分支过多的 `if` 语句。 此类语句可能令人困惑,并且通常表明设计抽象级别不足。\n\n\n使用下面的字段可指定预期的最大分支数。\n\nInspection ID: IfStatementWithTooManyBranchesJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "IfStatementWithTooManyBranchesJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/控制流问题", + "index": 1, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "NonBlockStatementBodyJS", + "shortDescription": { + "text": "没有大括号的语句体" + }, + "fullDescription": { + "text": "报告其语句体不是块语句的 'if'、'while'、'for' 或 'with' 语句。 在语句体中使用代码块通常对下游维护更安全。 Inspection ID: NonBlockStatementBodyJS", + "markdown": "报告其语句体不是块语句的 `if`、`while`、`for` 或 `with` 语句。 在语句体中使用代码块通常对下游维护更安全。\n\nInspection ID: NonBlockStatementBodyJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "NonBlockStatementBodyJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/代码样式问题", + "index": 19, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "BreakStatementJS", + "shortDescription": { + "text": "'break' 语句" + }, + "fullDescription": { + "text": "报告 'break' 语句。 忽略结束 case 块的 'break' 语句。 Inspection ID: BreakStatementJS", + "markdown": "报告 `break` 语句。 忽略结束 case 块的 `break` 语句。\n\nInspection ID: BreakStatementJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "BreakStatementJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/可能不合需要的代码结构", + "index": 21, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "FlowJSConfig", + "shortDescription": { + "text": "缺少 .flowconfig" + }, + "fullDescription": { + "text": "报告在项目中没有关联的 '.flowconfig' 文件且带有 '@flow' 标志的 JavaScript 文件。 Inspection ID: FlowJSConfig", + "markdown": "报告在项目中没有关联的 `.flowconfig` 文件且带有 `@flow` 标志的 JavaScript 文件。\n\nInspection ID: FlowJSConfig" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "FlowJSConfig", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/Flow 类型检查器", + "index": 22, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSPotentiallyInvalidUsageOfClassThis", + "shortDescription": { + "text": "从闭包对类中 'this' 的引用可能无效" + }, + "fullDescription": { + "text": "报告试图通过不是 lambda 的嵌套函数中的 'this.' 限定符,来引用 ECMAScript 类成员的情况。 不是 lambda 的嵌套函数中的 'this' 是函数自身的 'this',与外部类无关。 Inspection ID: JSPotentiallyInvalidUsageOfClassThis", + "markdown": "报告试图通过不是 lambda 的嵌套函数中的 `this.` 限定符,来引用 ECMAScript 类成员的情况。 \n不是 lambda 的嵌套函数中的 `this` 是函数自身的 ` this`,与外部类无关。\n\nInspection ID: JSPotentiallyInvalidUsageOfClassThis" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSPotentiallyInvalidUsageOfClassThis", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/可能的 bug", + "index": 26, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "DebuggerStatementJS", + "shortDescription": { + "text": "'debugger' 语句" + }, + "fullDescription": { + "text": "报告用于与 Javascript 调试器交互的 'debugger' 语句。 此类语句不应出现在生产代码中。 Inspection ID: DebuggerStatementJS", + "markdown": "报告用于与 Javascript 调试器交互的 `debugger` 语句。 此类语句不应出现在生产代码中。\n\nInspection ID: DebuggerStatementJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "DebuggerStatementJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/可能不合需要的代码结构", + "index": 21, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSUnusedAssignment", + "shortDescription": { + "text": "未使用的赋值" + }, + "fullDescription": { + "text": "报告赋值后从未使用其值的变量。 建议移除未使用的变量以缩短代码并避免冗余分配。 将报告以下情况: 变量赋值后从未读取。 在下次读取变量前,变量的值总是被另一个赋值覆盖。 变量的初始值设定项冗余(出于上述原因之一)。 Inspection ID: JSUnusedAssignment", + "markdown": "报告赋值后从未使用其值的变量。 \n建议移除未使用的变量以缩短代码并避免冗余分配。\n\n将报告以下情况:\n\n* 变量赋值后从未读取。\n* 在下次读取变量前,变量的值总是被另一个赋值覆盖。\n* 变量的初始值设定项冗余(出于上述原因之一)。\n\nInspection ID: JSUnusedAssignment" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSUnusedAssignment", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Performance" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/未使用的符号", + "index": 28, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ReuseOfLocalVariableJS", + "shortDescription": { + "text": "局部变量的重用" + }, + "fullDescription": { + "text": "报告重用局部变量并使用无关 初始变量用法的新值覆盖其值的情况。 以这种方式重用局部变量可能会造成混淆, 因为局部变量的预期语义可能随每种用法而变化。 如果代码更改导致预期被覆盖的值任然存在,那么也可能导致错误。 优良的作法是保持变量生命周期尽可能短,而不要为了简洁重用局部变量。 Inspection ID: ReuseOfLocalVariableJS", + "markdown": "报告重用局部变量并使用无关 初始变量用法的新值覆盖其值的情况。 以这种方式重用局部变量可能会造成混淆, 因为局部变量的预期语义可能随每种用法而变化。 如果代码更改导致预期被覆盖的值任然存在,那么也可能导致错误。 优良的作法是保持变量生命周期尽可能短,而不要为了简洁重用局部变量。\n\nInspection ID: ReuseOfLocalVariableJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ReuseOfLocalVariableJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/数据流", + "index": 29, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ShiftOutOfRangeJS", + "shortDescription": { + "text": "通过可能错误的常量进行移位运算" + }, + "fullDescription": { + "text": "报告此类情况下的移位运算,即第二个操作数是合理范围外的常量,例如 '0..31' 范围外的整数移位运算,移位的值为负值或过大的值。 Inspection ID: ShiftOutOfRangeJS", + "markdown": "报告此类情况下的移位运算,即第二个操作数是合理范围外的常量,例如 `0..31` 范围外的整数移位运算,移位的值为负值或过大的值。\n\nInspection ID: ShiftOutOfRangeJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ShiftOutOfRangeJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/按位运算问题", + "index": 30, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSClosureCompilerSyntax", + "shortDescription": { + "text": "JSDoc 标记不正确的用法" + }, + "fullDescription": { + "text": "报告 Google Closure Compiler 注解隐含的警告,包括 '@abstract'、'@interface' 和 '@implement' 标记的正确使用情况。 Inspection ID: JSClosureCompilerSyntax", + "markdown": "报告 *Google Closure Compiler* 注解隐含的警告,包括 `@abstract`、`@interface` 和 `@implement` 标记的正确使用情况。\n\nInspection ID: JSClosureCompilerSyntax" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSClosureCompilerSyntax", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/常规", + "index": 18, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "UnnecessaryContinueJS", + "shortDescription": { + "text": "不必要的 'continue' 语句" + }, + "fullDescription": { + "text": "报告循环末尾不必要的 'continue' 语句。 建议移除这些语句。 Inspection ID: UnnecessaryContinueJS", + "markdown": "报告循环末尾不必要的 ` continue` 语句。 建议移除这些语句。\n\nInspection ID: UnnecessaryContinueJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "UnnecessaryContinueJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/控制流问题", + "index": 1, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ES6ConvertLetToConst", + "shortDescription": { + "text": "已使用 'let' 而不是 'const'" + }, + "fullDescription": { + "text": "报告可以设为 'const' 的 'let' 声明。 Inspection ID: ES6ConvertLetToConst", + "markdown": "报告可以设为 `const` 的 `let` 声明。 \n\nInspection ID: ES6ConvertLetToConst" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "ES6ConvertLetToConst", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/ES2015 迁移协助", + "index": 31, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSXDomNesting", + "shortDescription": { + "text": "无效的 DOM 元素嵌套" + }, + "fullDescription": { + "text": "检测 JSX 文件中未根据 DOM 规范正确嵌套的 HTML 元素。 React 会对不正确嵌套的元素报告运行时警告。 Inspection ID: JSXDomNesting", + "markdown": "检测 JSX 文件中未根据 DOM 规范正确嵌套的 HTML 元素。 React 会对不正确嵌套的元素报告运行时警告。\n\nInspection ID: JSXDomNesting" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSXDomNesting", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/React", + "index": 34, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "TypeScriptValidateTypes", + "shortDescription": { + "text": "类型不匹配" + }, + "fullDescription": { + "text": "报告类型不正确的形参、返回值或赋值表达式。 Inspection ID: TypeScriptValidateTypes", + "markdown": "报告类型不正确的形参、返回值或赋值表达式。\n\nInspection ID: TypeScriptValidateTypes" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "TypeScriptValidateTypes", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/TypeScript", + "index": 35, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "BadExpressionStatementJS", + "shortDescription": { + "text": "非赋值或调用的表达式语句" + }, + "fullDescription": { + "text": "报告既非赋值也非调用的表达式语句。 此类语句通常表明有错误。 Inspection ID: BadExpressionStatementJS", + "markdown": "报告既非赋值也非调用的表达式语句。 此类语句通常表明有错误。\n\nInspection ID: BadExpressionStatementJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "BadExpressionStatementJS", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/有效性问题", + "index": 36, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ConfusingFloatingPointLiteralJS", + "shortDescription": { + "text": "浮点字面量会引起混淆" + }, + "fullDescription": { + "text": "报告任何没有小数点的浮点数或小数点前的任何数字 或小数点后的任何数字。 此类字面量可能令人困惑,并且违反多种编码标准。 Inspection ID: ConfusingFloatingPointLiteralJS", + "markdown": "报告任何没有小数点的浮点数或小数点前的任何数字 或小数点后的任何数字。 此类字面量可能令人困惑,并且违反多种编码标准。\n\nInspection ID: ConfusingFloatingPointLiteralJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ConfusingFloatingPointLiteralJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/可能引起混淆的代码结构", + "index": 39, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "BreakStatementWithLabelJS", + "shortDescription": { + "text": "带标签的 'break' 语句" + }, + "fullDescription": { + "text": "报告 'break' 标签语句。 Inspection ID: BreakStatementWithLabelJS", + "markdown": "报告 `break` 标签语句。\n\nInspection ID: BreakStatementWithLabelJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "BreakStatementWithLabelJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/可能不合需要的代码结构", + "index": 21, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ContinueOrBreakFromFinallyBlockJS", + "shortDescription": { + "text": "'continue' 或 'break' 位于 'finally' 块内" + }, + "fullDescription": { + "text": "报告 'finally' 块中的 'break' 或 'continue' 语句。 此类语句非常令人困惑,可能隐藏异常,并导致调试复杂化。 Inspection ID: ContinueOrBreakFromFinallyBlockJS", + "markdown": "报告 `finally` 块中的 `break` 或 `continue` 语句。 此类语句非常令人困惑,可能隐藏异常,并导致调试复杂化。\n\nInspection ID: ContinueOrBreakFromFinallyBlockJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ContinueOrBreakFromFinallyBlockJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/Try 语句问题", + "index": 43, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "StatementsPerFunctionJS", + "shortDescription": { + "text": "函数过长" + }, + "fullDescription": { + "text": "报告过长的函数。 函数长度通过函数中非空语句的数量来计算。 太长的函数容易出错,而且难以测试。 使用下面的字段可指定函数中的可接受最大语句数量。 Inspection ID: StatementsPerFunctionJS", + "markdown": "报告过长的函数。 函数长度通过函数中非空语句的数量来计算。 太长的函数容易出错,而且难以测试。\n\n\n使用下面的字段可指定函数中的可接受最大语句数量。\n\nInspection ID: StatementsPerFunctionJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "FunctionTooLongJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/函数指标", + "index": 45, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "UnnecessaryLocalVariableJS", + "shortDescription": { + "text": "冗余局部变量" + }, + "fullDescription": { + "text": "报告不会让函数更易于理解的不必要局部变量: 立刻返回的局部变量 立刻赋值给另一个变量并且不再使用的局部变量 总是与另一个局部变量或形参的值相同的局部变量。 使用下面的复选框以使该检查忽略立刻返回或抛出的变量。 为清晰起见和易于调试,某些编码样式建议使用此类变量。 Inspection ID: UnnecessaryLocalVariableJS", + "markdown": "报告不会让函数更易于理解的不必要局部变量:\n\n* 立刻返回的局部变量\n* 立刻赋值给另一个变量并且不再使用的局部变量\n* 总是与另一个局部变量或形参的值相同的局部变量。\n\n\n使用下面的复选框以使该检查忽略立刻返回或抛出的变量。 为清晰起见和易于调试,某些编码样式建议使用此类变量。\n\nInspection ID: UnnecessaryLocalVariableJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "UnnecessaryLocalVariableJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/数据流", + "index": 29, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSMethodCanBeStatic", + "shortDescription": { + "text": "方法可以为 'static'" + }, + "fullDescription": { + "text": "报告可以安全地设为 'static' 的类方法。 如果某个方法未引用其类的任何非 static 方法和非 static 字段,并且未在子类中被重写, 则该方法可以为 'static' 方法。 使用下面的第一个复选框只检查 'private' 方法。 Inspection ID: JSMethodCanBeStatic", + "markdown": "报告可以安全地设为 `static` 的类方法。 如果某个方法未引用其类的任何非 static 方法和非 static 字段,并且未在子类中被重写, 则该方法可以为 `static` 方法。\n\n\n使用下面的第一个复选框只检查 `private` 方法。\n\nInspection ID: JSMethodCanBeStatic" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "JSMethodCanBeStatic", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/常规", + "index": 18, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSDeclarationsAtScopeStart", + "shortDescription": { + "text": "'var' 未在函数开头声明" + }, + "fullDescription": { + "text": "检查使用 var 声明的局部变量的声明是否位于函数范围的顶部。 默认情况下,在执行代码时,变量声明总是被隐形地移动(“提升”)到它所包含的范围的顶部。 因此,在范围顶部声明有助于在代码中表现出这种行为。 Inspection ID: JSDeclarationsAtScopeStart", + "markdown": "检查使用 **var** 声明的局部变量的声明是否位于函数范围的顶部。 \n\n默认情况下,在执行代码时,变量声明总是被隐形地移动(\"提升\")到它所包含的范围的顶部。 因此,在范围顶部声明有助于在代码中表现出这种行为。\n\nInspection ID: JSDeclarationsAtScopeStart" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "JSDeclarationsAtScopeStart", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/代码样式问题", + "index": 19, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ContinueStatementWithLabelJS", + "shortDescription": { + "text": "带标签的 'continue' 语句" + }, + "fullDescription": { + "text": "添加 'continue' 标签语句。 Inspection ID: ContinueStatementWithLabelJS", + "markdown": "添加 `continue` 标签语句。\n\nInspection ID: ContinueStatementWithLabelJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ContinueStatementWithLabelJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/可能不合需要的代码结构", + "index": 21, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSObjectNullOrUndefined", + "shortDescription": { + "text": "对象为 'null' 或 'undefined'" + }, + "fullDescription": { + "text": "报告对 'undefined' 或 'null' 对象调用方法、访问属性或调用函数所导致的错误。 Inspection ID: JSObjectNullOrUndefined", + "markdown": "报告对 `undefined` 或 `null` 对象调用方法、访问属性或调用函数所导致的错误。\n\nInspection ID: JSObjectNullOrUndefined" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSObjectNullOrUndefined", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/控制流问题", + "index": 1, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "TypeScriptMissingConfigOption", + "shortDescription": { + "text": "缺少 tsconfig.json 选项 " + }, + "fullDescription": { + "text": "报告 'tsconfig.json' 中需要显式选项的用法。 例如,要在 '.tsx' 文件中使用 JSX,'tsconfig.json' 必须包含 '\"jsx\"' 属性。 Inspection ID: TypeScriptMissingConfigOption", + "markdown": "报告 `tsconfig.json` 中需要显式选项的用法。 例如,要在 `.tsx` 文件中使用 JSX,`tsconfig.json` 必须包含 `\"jsx\"` 属性。\n\nInspection ID: TypeScriptMissingConfigOption" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "TypeScriptMissingConfigOption", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/TypeScript", + "index": 35, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSXUnresolvedComponent", + "shortDescription": { + "text": "未解析的 JSX 组件" + }, + "fullDescription": { + "text": "报告对 JSX 组件的未解析引用。 如果引用的组件在此项目或其依赖项中定义,则建议添加缺少的 import 语句,或创建采用此名称的新组件。 新组件的模板可以在“编辑器 | 文件和代码模板”中修改。 Inspection ID: JSXUnresolvedComponent", + "markdown": "报告对 JSX 组件的未解析引用。 如果引用的组件在此项目或其依赖项中定义,则建议添加缺少的 import 语句,或创建采用此名称的新组件。\n\n新组件的模板可以在\"编辑器 \\| 文件和代码模板\"中修改。\n\nInspection ID: JSXUnresolvedComponent" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "JSXUnresolvedComponent", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/常规", + "index": 18, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ES6ShorthandObjectProperty", + "shortDescription": { + "text": "属性可被替换为速记形式" + }, + "fullDescription": { + "text": "报告可以转换为 ES6 速记样式的对象属性,并提供快速修复来执行此操作。 示例: 'var obj = {foo:foo}' 应用快速修复后,代码如下所示: 'var obj = {foo}' Inspection ID: ES6ShorthandObjectProperty", + "markdown": "报告可以转换为 ES6 速记样式的对象属性,并提供快速修复来执行此操作。\n\n示例:\n\n\n var obj = {foo:foo}\n\n应用快速修复后,代码如下所示:\n\n\n var obj = {foo}\n\nInspection ID: ES6ShorthandObjectProperty" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "ES6ShorthandObjectProperty", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/常规", + "index": 18, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "UnnecessaryLabelOnBreakStatementJS", + "shortDescription": { + "text": "'break' 语句上的标签不必要" + }, + "fullDescription": { + "text": "报告可以在不更改控制流的情况下移除其标签的 'break' 标签语句。 Inspection ID: UnnecessaryLabelOnBreakStatementJS", + "markdown": "报告可以在不更改控制流的情况下移除其标签的 `break` 标签语句。\n\nInspection ID: UnnecessaryLabelOnBreakStatementJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "UnnecessaryLabelOnBreakStatementJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/控制流问题", + "index": 1, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ContinueStatementJS", + "shortDescription": { + "text": "'continue' 语句" + }, + "fullDescription": { + "text": "报告 'continue' 语句。 Inspection ID: ContinueStatementJS", + "markdown": "报告 `continue` 语句。\n\nInspection ID: ContinueStatementJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ContinueStatementJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/可能不合需要的代码结构", + "index": 21, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AssignmentToForLoopParameterJS", + "shortDescription": { + "text": "赋值给 'for' 循环形参" + }, + "fullDescription": { + "text": "报告对声明为 'for' 循环形参的变量的赋值。 虽然偶尔是有意为之,但此结构可能格外令人困惑,并且通常是由错误所致。 Inspection ID: AssignmentToForLoopParameterJS", + "markdown": "报告对声明为 ` for` 循环形参的变量的赋值。 虽然偶尔是有意为之,但此结构可能格外令人困惑,并且通常是由错误所致。\n\nInspection ID: AssignmentToForLoopParameterJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "AssignmentToForLoopParameterJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/赋值问题", + "index": 48, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSPotentiallyInvalidConstructorUsage", + "shortDescription": { + "text": "可能无效的构造函数用法" + }, + "fullDescription": { + "text": "报告可能无效的构造函数的用法,例如:'new' 后面不是构造函数的函数,使用 构造函数的原型或调用构造函数但没有使用 'new' 。 假定构造函数的名称采用大写(可选)或有显式的 JSDoc '@constructor' 标记。 Inspection ID: JSPotentiallyInvalidConstructorUsage", + "markdown": "报告可能无效的构造函数的用法,例如:`new` 后面不是构造函数的函数,使用 构造函数的原型或调用构造函数但没有使用 `new` 。 假定构造函数的名称采用大写(可选)或有显式的 JSDoc `@constructor` 标记。\n\nInspection ID: JSPotentiallyInvalidConstructorUsage" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSPotentiallyInvalidConstructorUsage", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/可能的 bug", + "index": 26, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PointlessArithmeticExpressionJS", + "shortDescription": { + "text": "无意义的算术表达式" + }, + "fullDescription": { + "text": "报告包括加零或减零、乘零或一、除一和零移位的算术表达式。 此类表达式可能是由于没有完全完成自动化重构而造成。 Inspection ID: PointlessArithmeticExpressionJS", + "markdown": "报告包括加零或减零、乘零或一、除一和零移位的算术表达式。 此类表达式可能是由于没有完全完成自动化重构而造成。\n\nInspection ID: PointlessArithmeticExpressionJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "PointlessArithmeticExpressionJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/可能引起混淆的代码结构", + "index": 39, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "NodeCoreCodingAssistance", + "shortDescription": { + "text": "未解析的 Node.js API" + }, + "fullDescription": { + "text": "建议为 Node.js 配置编码辅助,例如 'require' 和/或核心模块('path'、'http'、'fs' 等)。 有关完整列表,请参阅 https://nodejs.org/api/。 Inspection ID: NodeCoreCodingAssistance", + "markdown": "建议为 Node.js 配置编码辅助,例如 `require` 和/或核心模块('path'、'http'、'fs' 等)。\n\n\n有关完整列表,请参阅 。\n\nInspection ID: NodeCoreCodingAssistance" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "NodeCoreCodingAssistance", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Unspecified" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/Node.js", + "index": 53, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSUndeclaredVariable", + "shortDescription": { + "text": "隐式声明的全局 JavaScript 变量" + }, + "fullDescription": { + "text": "报告全局变量的隐式声明。 示例: 'var aaa = 1; // 优良\n bbb = 2; // 不良,如果未在某处用 'var' 声明 bbb' Inspection ID: JSUndeclaredVariable", + "markdown": "报告全局变量的隐式声明。\n\n示例:\n\n\n var aaa = 1; // 优良\n bbb = 2; // 不良,如果未在某处用 'var' 声明 bbb\n\nInspection ID: JSUndeclaredVariable" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "JSUndeclaredVariable", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/常规", + "index": 18, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "DivideByZeroJS", + "shortDescription": { + "text": "除以零" + }, + "fullDescription": { + "text": "报告除以 0 或对 0 取余。 Inspection ID: DivideByZeroJS", + "markdown": "报告除以 0 或对 0 取余。\n\nInspection ID: DivideByZeroJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "DivideByZeroJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/可能的 bug", + "index": 26, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSPrimitiveTypeWrapperUsage", + "shortDescription": { + "text": "使用了基元类型对象包装器" + }, + "fullDescription": { + "text": "报告基元类型包装器使用不当或基元类型属性被修改的情况,因为在后一种情况下,所赋之值将丢失。 Inspection ID: JSPrimitiveTypeWrapperUsage", + "markdown": "报告基元类型包装器使用不当或基元类型属性被修改的情况,因为在后一种情况下,所赋之值将丢失。\n\nInspection ID: JSPrimitiveTypeWrapperUsage" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSPrimitiveTypeWrapperUsage", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/常规", + "index": 18, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "TypeScriptSmartCast", + "shortDescription": { + "text": "范围缩小的类型" + }, + "fullDescription": { + "text": "报告通过类型防护缩小变量类型范围时的变量用法。 请注意,严重性级别不影响此检查。 Inspection ID: TypeScriptSmartCast", + "markdown": "报告通过类型防护缩小变量类型范围时的变量用法。 请注意,严重性级别不影响此检查。\n\nInspection ID: TypeScriptSmartCast" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "TypeScriptSmartCast", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Unspecified" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/TypeScript", + "index": 35, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ES6ConvertIndexedForToForOf", + "shortDescription": { + "text": "已使用索引的 'for' 而不是 'for..of'" + }, + "fullDescription": { + "text": "报告对数组使用的 'for' 索引循环。 建议将其替换为 'for..of' 循环。 'for..of' 循环 (在 ECMAScript 6 中引入) 对 'iterable' 对象进行迭代。 Inspection ID: ES6ConvertIndexedForToForOf", + "markdown": "报告对数组使用的 [for](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for) 索引循环。 建议将其替换为 [for..of](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of) 循环。 \n`for..of` 循环 (在 ECMAScript 6 中引入) 对 `iterable` 对象进行迭代。\n\nInspection ID: ES6ConvertIndexedForToForOf" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "ES6ConvertIndexedForToForOf", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/ES2015 迁移协助", + "index": 31, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSLastCommaInArrayLiteral", + "shortDescription": { + "text": "数组字面量中的最后一个逗号多余" + }, + "fullDescription": { + "text": "报告数组字面量中尾随逗号的用法。 只有将 JavaScript 语言版本设置为 ECMAScript 5.1 时才报告该警告。 尽管此规范允许在数组中使用尾随逗号,但在使用尾随逗号时,某些浏览器可能会抛出错误。 您可以在代码样式 | JavaScript 或 TypeScript | 标点符号中配置尾随逗号的格式设置选项。 Inspection ID: JSLastCommaInArrayLiteral", + "markdown": "报告数组字面量中尾随逗号的用法。\n\n只有将 JavaScript 语言版本设置为 ECMAScript 5.1 时才报告该警告。\n\n尽管此规范允许在数组中使用尾随逗号,但在使用尾随逗号时,某些浏览器可能会抛出错误。\n\n您可以在**代码样式** \\| **JavaScript** 或 **TypeScript** \\| **标点符号**中配置尾随逗号的格式设置选项。\n\nInspection ID: JSLastCommaInArrayLiteral" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSLastCommaInArrayLiteral", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/常规", + "index": 18, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ConditionalExpressionJS", + "shortDescription": { + "text": "条件表达式" + }, + "fullDescription": { + "text": "报告三元条件表达式。 有些编码标准禁止此类表达式, 而是支持显式的 'if' 语句。 Inspection ID: ConditionalExpressionJS", + "markdown": "报告三元条件表达式。 有些编码标准禁止此类表达式, 而是支持显式的 `if` 语句。\n\nInspection ID: ConditionalExpressionJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ConditionalExpressionJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/可能不合需要的代码结构", + "index": 21, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ES6ConvertVarToLetConst", + "shortDescription": { + "text": "已使用 'var' 而不是 'let' 或 'const'" + }, + "fullDescription": { + "text": "报告使用 'var' 而不是 'let' 或 'const' 的声明。 'let' 和 'const' 的作用范围都为块,行为更为严格。 建议将所有 'var' 声明替换为 'let' 或 'const' 声明,具体取决于特定值的语义。 为避免引用错误,可将声明移至函数顶部,或放在变量的第一个用法前。 选择'通过‘全部修复’操作保守地转换变量'选项,以防止使用“全部修复”操作时在这些复杂情况下出现任何更改。 Inspection ID: ES6ConvertVarToLetConst", + "markdown": "报告使用 `var` 而不是 `let` 或 `const` 的声明。 \n`let` 和 `const` 的作用范围都为块,行为更为严格。 \n\n建议将所有 `var` 声明替换为 `let` 或 `const` 声明,具体取决于特定值的语义。 为避免引用错误,可将声明移至函数顶部,或放在变量的第一个用法前。 \n选择'通过'全部修复'操作保守地转换变量'选项,以防止使用\"全部修复\"操作时在这些复杂情况下出现任何更改。\n\nInspection ID: ES6ConvertVarToLetConst" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "ES6ConvertVarToLetConst", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/ES2015 迁移协助", + "index": 31, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSReferencingMutableVariableFromClosure", + "shortDescription": { + "text": "从闭包中引用可变变量" + }, + "fullDescription": { + "text": "报告函数中对外部可变变量的访问。 示例: 'for (var i = 1; i <= 3; i++) {\n setTimeout(function() {\n console.log(i); // 不良\n }, 0);\n }' Inspection ID: JSReferencingMutableVariableFromClosure", + "markdown": "报告函数中对外部可变变量的访问。\n\n示例:\n\n\n for (var i = 1; i <= 3; i++) {\n setTimeout(function() {\n console.log(i); // 不良\n }, 0);\n }\n\nInspection ID: JSReferencingMutableVariableFromClosure" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSReferencingMutableVariableFromClosure", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/常规", + "index": 18, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PointlessBooleanExpressionJS", + "shortDescription": { + "text": "无意义的语句或布尔表达式" + }, + "fullDescription": { + "text": "报告无意义或复杂的没有意义的布尔表达式或语句。 示例: 'let a = !(false && x);\n let b = false || x;' 应用该快速修复后,结果将如下所示: 'let a = true;\n let b = x;' Inspection ID: PointlessBooleanExpressionJS", + "markdown": "报告无意义或复杂的没有意义的布尔表达式或语句。\n\n示例:\n\n\n let a = !(false && x);\n let b = false || x;\n\n应用该快速修复后,结果将如下所示:\n\n\n let a = true;\n let b = x;\n\nInspection ID: PointlessBooleanExpressionJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "PointlessBooleanExpressionJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/控制流问题", + "index": 1, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "DynamicallyGeneratedCodeJS", + "shortDescription": { + "text": "执行动态生成的代码" + }, + "fullDescription": { + "text": "报告 'eval()'、'setTimeout()' 或 'setInterval()' 函数的调用或 'Function' 对象的分配。 这些函数用于执行通常动态生成的 任意 JavaScript 文本字符串。 这可能非常令人困惑,并且可能存在安全风险。 忽略静态地向这些方法提供回调函数而不生成代码的情况。 Inspection ID: DynamicallyGeneratedCodeJS", + "markdown": "报告 `eval()`、`setTimeout()` 或 `setInterval()` 函数的调用或 `Function` 对象的分配。 这些函数用于执行通常动态生成的 任意 JavaScript 文本字符串。 这可能非常令人困惑,并且可能存在安全风险。 \n\n忽略静态地向这些方法提供回调函数而不生成代码的情况。\n\nInspection ID: DynamicallyGeneratedCodeJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "DynamicallyGeneratedCodeJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Security" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/可能引起混淆的代码结构", + "index": 39, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "NegatedConditionalExpressionJS", + "shortDescription": { + "text": "否定条件表达式" + }, + "fullDescription": { + "text": "报告条件被否定的条件表达式。 建议翻转条件表达式中分支的顺序以增加语句的清晰度。 示例:'!condition ? 2 : 1' Inspection ID: NegatedConditionalExpressionJS", + "markdown": "报告条件被否定的条件表达式。 建议翻转条件表达式中分支的顺序以增加语句的清晰度。 示例:`!condition ? 2 : 1`\n\nInspection ID: NegatedConditionalExpressionJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "NegatedConditionalExpressionJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/可能引起混淆的代码结构", + "index": 39, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSUrlImportUsage", + "shortDescription": { + "text": "使用了 URL 导入" + }, + "fullDescription": { + "text": "检查 JavaScript 语言中使用过的 URL import。 建议下载指定的远程 URL 的模块。 此类关联使 IDE 可以提供正确的代码补全和导航。 只有 JavaScript 语言中的 ECMAScript 模块支持 import 说明符中的 URL。 Inspection ID: JSUrlImportUsage", + "markdown": "检查 JavaScript 语言中使用过的 URL import。 建议下载指定的远程 URL 的模块。 此类关联使 IDE 可以提供正确的代码补全和导航。 \n\n只有 JavaScript 语言中的 ECMAScript 模块支持 import 说明符中的 URL。\n\nInspection ID: JSUrlImportUsage" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "JSUrlImportUsage", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info", + "codeQualityCategory": "Unspecified" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/Import 和依赖项", + "index": 55, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "UnnecessaryLabelOnContinueStatementJS", + "shortDescription": { + "text": "'continue' 语句上的不必要标签" + }, + "fullDescription": { + "text": "报告可以在不更改控制流的情况下移除其标签的 'continue' 标签语句。 Inspection ID: UnnecessaryLabelOnContinueStatementJS", + "markdown": "报告可以在不更改控制流的情况下移除其标签的 `continue` 标签语句。\n\nInspection ID: UnnecessaryLabelOnContinueStatementJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "UnnecessaryLabelOnContinueStatementJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/控制流问题", + "index": 1, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ChainedEqualityJS", + "shortDescription": { + "text": "链式相等" + }, + "fullDescription": { + "text": "报告链式相等比较(即 'a==b==c')。 此类比较令人困惑。 Inspection ID: ChainedEqualityJS", + "markdown": "报告链式相等比较(即 `a==b==c`)。 此类比较令人困惑。\n\nInspection ID: ChainedEqualityJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ChainedEqualityComparisonsJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/代码样式问题", + "index": 19, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SillyAssignmentJS", + "shortDescription": { + "text": "变量被赋值给自己" + }, + "fullDescription": { + "text": "报告 'x = x' 形式的赋值。 Inspection ID: SillyAssignmentJS", + "markdown": "报告 `x = x` 形式的赋值。\n\nInspection ID: SillyAssignmentJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SillyAssignmentJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/赋值问题", + "index": 48, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSPotentiallyInvalidTargetOfIndexedPropertyAccess", + "shortDescription": { + "text": "索引的属性访问的目标可能不正确" + }, + "fullDescription": { + "text": "报告可能无效的索引属性访问,例如 'Array[1]'。 Inspection ID: JSPotentiallyInvalidTargetOfIndexedPropertyAccess", + "markdown": "报告可能无效的索引属性访问,例如 `Array[1]`。\n\nInspection ID: JSPotentiallyInvalidTargetOfIndexedPropertyAccess" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSPotentiallyInvalidTargetOfIndexedPropertyAccess", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/可能的 bug", + "index": 26, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSAccessibilityCheck", + "shortDescription": { + "text": "已引用无法访问的 @private 和 @protected 成员" + }, + "fullDescription": { + "text": "报告对使用 '@private' 或 '@protected' 标记进行标记,但不符合这些标记所隐含的可见性规则的 JavaScript 成员的引用。 Inspection ID: JSAccessibilityCheck", + "markdown": "报告对使用 `@private` 或 `@protected` 标记进行标记,但不符合这些标记所隐含的可见性规则的 JavaScript 成员的引用。\n\nInspection ID: JSAccessibilityCheck" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSAccessibilityCheck", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/常规", + "index": 18, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ES6ConvertRequireIntoImport", + "shortDescription": { + "text": "使用了 'require()' 而不是 'import'" + }, + "fullDescription": { + "text": "报告 'require()' 语句。 建议使用 'import' 语句将其转换为 'require()' 调用。 启用“使用‘全部修复’操作转换内部范围中的 require()”, 在使用“全部修复”操作时转换嵌套函数和语句内部的所有 'require()' 调用。 请注意,将内部范围中的 'require()' 语句转换为 'import' 语句 可能会导致代码语义更改。 Import 语句是 static 模块依赖项,它们获得了提升, 这表明它们被移至当前模块的顶部。 'require()' 调用动态加载模块。 它们可以有条件地执行,其范围由使用它们的表达式来定义。 清除“使用‘全部修复’操作转换内部范围中的 require()”复选框,以防止在使用“全部修复”操作时对这些复杂情况进行任何更改。 Inspection ID: ES6ConvertRequireIntoImport", + "markdown": "报告 `require()` 语句。 建议使用 `import` 语句将其转换为 `require()` 调用。 \n\n启用\"使用'全部修复'操作转换内部范围中的 require()\", 在使用\"全部修复\"操作时转换嵌套函数和语句内部的所有 `require()` 调用。 \n\n请注意,将内部范围中的 `require()` 语句转换为 `import` 语句 可能会导致代码语义更改。 Import 语句是 static 模块依赖项,它们获得了提升, 这表明它们被移至当前模块的顶部。 `require()` 调用动态加载模块。 它们可以有条件地执行,其范围由使用它们的表达式来定义。 \n清除\"使用'全部修复'操作转换内部范围中的 require()\"复选框,以防止在使用\"全部修复\"操作时对这些复杂情况进行任何更改。\n\nInspection ID: ES6ConvertRequireIntoImport" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "ES6ConvertRequireIntoImport", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/ES2015 迁移协助", + "index": 31, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "FunctionWithMultipleLoopsJS", + "shortDescription": { + "text": "函数具有多个循环" + }, + "fullDescription": { + "text": "报告具有多个循环语句的函数。 Inspection ID: FunctionWithMultipleLoopsJS", + "markdown": "报告具有多个循环语句的函数。\n\nInspection ID: FunctionWithMultipleLoopsJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "FunctionWithMultipleLoopsJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/函数指标", + "index": 45, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "LabeledStatementJS", + "shortDescription": { + "text": "标记语句" + }, + "fullDescription": { + "text": "报告标签语句。 Inspection ID: LabeledStatementJS", + "markdown": "报告标签语句。\n\nInspection ID: LabeledStatementJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "LabeledStatementJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/可能不合需要的代码结构", + "index": 21, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "NpmUsedModulesInstalled", + "shortDescription": { + "text": "缺少模块依赖关系" + }, + "fullDescription": { + "text": "报告未安装或未在 package.json 依赖项中列出的 'require()' 调用或 'import' 语句中的模块。 建议安装此模块和/或将其包含到 package.json 中。 对于 'require()' 调用,仅在Node.js Core JavaScript 库范围内的文件中起作用。 Inspection ID: NpmUsedModulesInstalled", + "markdown": "报告未安装或未在 package.json 依赖项中列出的 `require()` 调用或 `import` 语句中的模块。\n\n建议安装此模块和/或将其包含到 package.json 中。\n\n对于 `require()` 调用,仅在*Node.js Core* JavaScript 库范围内的文件中起作用。\n\nInspection ID: NpmUsedModulesInstalled" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "NpmUsedModulesInstalled", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/Import 和依赖项", + "index": 55, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "UnusedCatchParameterJS", + "shortDescription": { + "text": "未使用的 'catch' 形参" + }, + "fullDescription": { + "text": "报告未在相应的块中使用的 'catch' 形参。 将忽略名称为 'ignore' 或 'ignored' 的 'catch' 形参。 使用下面的复选框对包含注释的 'catch' 块禁用此检查。 Inspection ID: UnusedCatchParameterJS", + "markdown": "报告未在相应的块中使用的 `catch` 形参。 将忽略名称为 `ignore` 或 `ignored` 的 `catch` 形参。\n\n\n使用下面的复选框对包含注释的\n`catch` 块禁用此检查。\n\nInspection ID: UnusedCatchParameterJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "UnusedCatchParameterJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/Try 语句问题", + "index": 43, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "WithStatementJS", + "shortDescription": { + "text": "'with' 语句" + }, + "fullDescription": { + "text": "报告 'with' 语句。 此类语句会导致可能令人困惑的隐式绑定,并且在设置新变量时可能会表现出奇怪的行为。 Inspection ID: WithStatementJS", + "markdown": "报告 `with` 语句。 此类语句会导致可能令人困惑的隐式绑定,并且在设置新变量时可能会表现出奇怪的行为。\n\nInspection ID: WithStatementJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "WithStatementJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/可能不合需要的代码结构", + "index": 21, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSConstantReassignment", + "shortDescription": { + "text": "尝试分配给常量或只读变量" + }, + "fullDescription": { + "text": "报告将值重新赋给常量或只读变量的情况。 Inspection ID: JSConstantReassignment", + "markdown": "报告将值重新赋给常量或只读变量的情况。\n\nInspection ID: JSConstantReassignment" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "JSConstantReassignment", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/有效性问题", + "index": 36, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "TypeScriptCheckImport", + "shortDescription": { + "text": "未解析的已导入名称" + }, + "fullDescription": { + "text": "报告 TypeScript 代码的 'import' 声明中未解析的名称或绑定。 Inspection ID: TypeScriptCheckImport", + "markdown": "报告 TypeScript 代码的 `import` 声明中未解析的名称或绑定。\n\nInspection ID: TypeScriptCheckImport" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "TypeScriptCheckImport", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/TypeScript", + "index": 35, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MagicNumberJS", + "shortDescription": { + "text": "幻数" + }, + "fullDescription": { + "text": "报告使用数值字面量但未通过常量声明来命名的“幻数”。 幻数可能导致生成意图不明确的代码,如果一个代码位置中的幻数被更改,但在另一个代码位置未被更改,则可能导致错误。 数字 0、1、2、3、4、5、6、7、8、9、10、100、1000、 0.0 和 1.0 将被忽略。 Inspection ID: MagicNumberJS", + "markdown": "报告使用数值字面量但未通过常量声明来命名的\"幻数\"。 幻数可能导致生成意图不明确的代码,如果一个代码位置中的幻数被更改,但在另一个代码位置未被更改,则可能导致错误。 数字 0、1、2、3、4、5、6、7、8、9、10、100、1000、 0.0 和 1.0 将被忽略。\n\nInspection ID: MagicNumberJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "MagicNumberJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/可能引起混淆的代码结构", + "index": 39, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "FunctionNamingConventionJS", + "shortDescription": { + "text": "函数命名约定" + }, + "fullDescription": { + "text": "报告名称太短、太长或不符合 指定正则表达式模式的函数。 使用下面提供的字段来指定函数名称的最小长度、 最大长度以及正则表达式。 对正则表达式使用标准的 'java.util.regex' 格式。 Inspection ID: FunctionNamingConventionJS", + "markdown": "报告名称太短、太长或不符合 指定正则表达式模式的函数。\n\n\n使用下面提供的字段来指定函数名称的最小长度、\n最大长度以及正则表达式。 对正则表达式使用标准的 `java.util.regex` 格式。\n\nInspection ID: FunctionNamingConventionJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "FunctionNamingConventionJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/命名约定", + "index": 58, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSXSyntaxUsed", + "shortDescription": { + "text": "已使用 JSX 语法" + }, + "fullDescription": { + "text": "报告 JavaScript 代码中 JSX 标记的用法。 Inspection ID: JSXSyntaxUsed", + "markdown": "报告 JavaScript 代码中 JSX 标记的用法。\n\nInspection ID: JSXSyntaxUsed" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "JSXSyntaxUsed", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/常规", + "index": 18, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSJoinVariableDeclarationAndAssignment", + "shortDescription": { + "text": "变量声明可与变量的第一个赋值合并" + }, + "fullDescription": { + "text": "报告在没有初始值设定项的情况下声明并且在代码或单个嵌套范围中使用多得多的变量。 建议将此变量移到更靠近其用法的位置,并将其与初始值设定项表达式联接起来。 Inspection ID: JSJoinVariableDeclarationAndAssignment", + "markdown": "报告在没有初始值设定项的情况下声明并且在代码或单个嵌套范围中使用多得多的变量。 建议将此变量移到更靠近其用法的位置,并将其与初始值设定项表达式联接起来。\n\nInspection ID: JSJoinVariableDeclarationAndAssignment" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "JSJoinVariableDeclarationAndAssignment", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/常规", + "index": 18, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSRedundantSwitchStatement", + "shortDescription": { + "text": "'switch' 语句冗余,可以替换" + }, + "fullDescription": { + "text": "报告语句体为空或仅有一个 'case' 分支或仅有一个 'default' 分支的 'switch' 语句。 Inspection ID: JSRedundantSwitchStatement", + "markdown": "报告语句体为空或仅有一个 `case` 分支或仅有一个 `default` 分支的 `switch` 语句。\n\nInspection ID: JSRedundantSwitchStatement" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "JSRedundantSwitchStatement", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/switch 语句问题", + "index": 59, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "TypeScriptLibrary", + "shortDescription": { + "text": "缺少全局库" + }, + "fullDescription": { + "text": "报告符号必须具备但未在 'tsconfig.json' 中的 'lib' 编译器选项下列出的 TypeScript 库文件。 Inspection ID: TypeScriptLibrary", + "markdown": "报告符号必须具备但未在 `tsconfig.json` 中的 `lib` 编译器选项下列出的 TypeScript 库文件。\n\nInspection ID: TypeScriptLibrary" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "TypeScriptLibrary", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/TypeScript", + "index": 35, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "TypeScriptMissingAugmentationImport", + "shortDescription": { + "text": "缺少扩大导入" + }, + "fullDescription": { + "text": "报告没有显式 import 的 增强模块的用法。 Inspection ID: TypeScriptMissingAugmentationImport", + "markdown": "报告没有显式 import 的 [增强模块](https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation)的用法。\n\nInspection ID: TypeScriptMissingAugmentationImport" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "TypeScriptMissingAugmentationImport", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/TypeScript", + "index": 35, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSUnusedGlobalSymbols", + "shortDescription": { + "text": "未使用的全局符号" + }, + "fullDescription": { + "text": "报告未使用的可以全局访问的 public 函数、变量、类或属性。 Inspection ID: JSUnusedGlobalSymbols", + "markdown": "报告未使用的可以全局访问的 public 函数、变量、类或属性。\n\nInspection ID: JSUnusedGlobalSymbols" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSUnusedGlobalSymbols", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/未使用的符号", + "index": 28, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ES6ConvertModuleExportToExport", + "shortDescription": { + "text": "使用了 'module.exports' 而不是 'export'" + }, + "fullDescription": { + "text": "报告 'module.export' 语句。 建议将其替换为 'export' 或 'export default' 语句。 请注意,用于将 'module.export' 转换为 'export' 的快速修复不适用于函数或语句内部的 'module.export',因为 'export' 语句只能位于模块顶层。 Inspection ID: ES6ConvertModuleExportToExport", + "markdown": "报告 `module.export` 语句。 建议将其替换为 `export` 或 `export default` 语句。 \n\n请注意,用于将 `module.export` 转换为 `export` 的快速修复不适用于函数或语句内部的 `module.export`,因为 `export` 语句只能位于模块顶层。\n\nInspection ID: ES6ConvertModuleExportToExport" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "ES6ConvertModuleExportToExport", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/ES2015 迁移协助", + "index": 31, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "DocumentWriteJS", + "shortDescription": { + "text": "调用 'document.write()'" + }, + "fullDescription": { + "text": "报告对 'document.write()' 或 'document.writeln()' 的方法调用。 在采用显式 DOM 调用(例如 'getElementByID()' 和 'createElement()')时, 此类调用的大多数用法执行效果更好。 此外,'write()' 和 'writeln()' 调用不适用于 XML DOM,包括用于 XHTML 的 DOM(如果以 XML 格式查看)。 这会导致难以指出错误。 Inspection ID: DocumentWriteJS", + "markdown": "报告对 `document.write()` 或 `document.writeln()` 的方法调用。 在采用显式 DOM 调用(例如 `getElementByID()` 和 `createElement()`)时, 此类调用的大多数用法执行效果更好。 此外,`write()` 和 `writeln()` 调用不适用于 XML DOM,包括用于 XHTML 的 DOM(如果以 XML 格式查看)。 这会导致难以指出错误。\n\nInspection ID: DocumentWriteJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "DocumentWriteJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/DOM 问题", + "index": 60, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AnonymousFunctionJS", + "shortDescription": { + "text": "匿名函数" + }, + "fullDescription": { + "text": "报告匿名函数。 函数表达式的显式名称可能有助于调试。 如果 ECMAScript 6 标准中指定了 'name' 属性,则忽略没有名称的函数表达式。 例如,不会报告 'var bar = function() {};'。 Inspection ID: AnonymousFunctionJS", + "markdown": "报告匿名函数。 函数表达式的显式名称可能有助于调试。 如果 ECMAScript 6 标准中指定了 `name` 属性,则忽略没有名称的函数表达式。 例如,不会报告 `var bar = function() {};`。\n\nInspection ID: AnonymousFunctionJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "AnonymousFunctionJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/可能不合需要的代码结构", + "index": 21, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "BlockStatementJS", + "shortDescription": { + "text": "不必要的块语句" + }, + "fullDescription": { + "text": "报告不用作 'if' 、'for' 、'while' 、'do' 、 'with' 或 'try' 语句体,也不用作函数声明体的块语句。 从 ECMAScript 6 开始,JavaScript 块为 'let' 和 'const' 变量引入了新的范围, 但独立的块语句在与 'var' 变量一起使用时仍然会引起混淆,并导致难以捉摸的错误。 Inspection ID: BlockStatementJS", + "markdown": "报告不用作 `if` 、`for` 、`while` 、`do` 、 `with` 或 `try` 语句体,也不用作函数声明体的块语句。 从 ECMAScript 6 开始,JavaScript 块为 `let` 和 `const` 变量引入了新的范围, 但独立的块语句在与 `var` 变量一起使用时仍然会引起混淆,并导致难以捉摸的错误。\n\nInspection ID: BlockStatementJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "BlockStatementJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/可能引起混淆的代码结构", + "index": 39, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ObjectAllocationIgnoredJS", + "shortDescription": { + "text": "对象分配的结果已忽略" + }, + "fullDescription": { + "text": "报告所分配对象的结果被忽略的对象分配,例如 'new Error();' 作为不带任何赋值的语句。 此类分配表达式可以指示奇怪的对象初始化策略。 Inspection ID: ObjectAllocationIgnoredJS", + "markdown": "报告所分配对象的结果被忽略的对象分配,例如 `new Error();` 作为不带任何赋值的语句。 此类分配表达式可以指示奇怪的对象初始化策略。\n\nInspection ID: ObjectAllocationIgnoredJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ObjectAllocationIgnored", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/可能的 bug", + "index": 26, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "InfiniteRecursionJS", + "shortDescription": { + "text": "无限递归" + }, + "fullDescription": { + "text": "报告肯定会无限递归或 抛出异常的函数。 此类函数可能无法正常返回。 Inspection ID: InfiniteRecursionJS", + "markdown": "报告肯定会无限递归或 抛出异常的函数。 此类函数可能无法正常返回。\n\nInspection ID: InfiniteRecursionJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "InfiniteRecursionJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/可能的 bug", + "index": 26, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSTypeOfValues", + "shortDescription": { + "text": "包含非标准值的 'typeof' 比较" + }, + "fullDescription": { + "text": "报告 'typeof' 表达式与不是以下标准类型之一的字面量字符串的比较:'undefined'、'object'、'boolean'、'number'、'string'、'function' 或 'symbol'。 此类比较始终返回 'false'。 Inspection ID: JSTypeOfValues", + "markdown": "报告 `typeof` 表达式与不是以下标准类型之一的字面量字符串的比较:`undefined`、`object`、`boolean`、`number`、`string`、`function` 或 `symbol`。 此类比较始终返回 `false`。\n\nInspection ID: JSTypeOfValues" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSTypeOfValues", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/可能的 bug", + "index": 26, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "NestedConditionalExpressionJS", + "shortDescription": { + "text": "嵌套条件表达式" + }, + "fullDescription": { + "text": "报告另一个三元条件中的三元条件表达式。 此类嵌套条件可能极其令人困惑,最好替换为更显式的条件逻辑。 Inspection ID: NestedConditionalExpressionJS", + "markdown": "报告另一个三元条件中的三元条件表达式。 此类嵌套条件可能极其令人困惑,最好替换为更显式的条件逻辑。\n\nInspection ID: NestedConditionalExpressionJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "NestedConditionalExpressionJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/可能引起混淆的代码结构", + "index": 39, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "IncompatibleMaskJS", + "shortDescription": { + "text": "不兼容的按位掩码运算" + }, + "fullDescription": { + "text": "报告确定评估为 'true' 或 'false' 的按位掩码表达式。 表达式的形式为 '(var & constant1) == constant2' 或 '(var | constant1) == constant2',其中 'constant1' 和 'constant2' 是不兼容的位掩码常量。 示例: '// 不兼容的掩码:由于掩码中的最后一个字节为零,\n// 0x1200 是可能的,但 0x1234 不可能\nif ((mask & 0xFF00) == 0x1234) {...}' Inspection ID: IncompatibleMaskJS", + "markdown": "报告确定评估为 `true` 或 `false` 的按位掩码表达式。 表达式的形式为 `(var & constant1) == constant2` 或 `(var | constant1) == constant2`,其中 `constant1` 和 `constant2` 是不兼容的位掩码常量。\n\n示例:\n\n\n // 不兼容的掩码:由于掩码中的最后一个字节为零,\n // 0x1200 是可能的,但 0x1234 不可能\n if ((mask & 0xFF00) == 0x1234) {...}\n\nInspection ID: IncompatibleMaskJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "IncompatibleBitwiseMaskOperation", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/按位运算问题", + "index": 30, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "TextLabelInSwitchStatementJS", + "shortDescription": { + "text": "'switch' 语句中的文本标签" + }, + "fullDescription": { + "text": "报告 'switch' 语句内部的标签语句, 这通常是由于拼写错误所致。 示例: 'switch(x)\n {\n case 1:\n case2: //拼写错误!\n case 3:\n break;\n }' Inspection ID: TextLabelInSwitchStatementJS", + "markdown": "报告 `switch` 语句内部的标签语句, 这通常是由于拼写错误所致。\n\n示例:\n\n\n switch(x)\n {\n case 1:\n case2: //拼写错误!\n case 3:\n break;\n }\n\nInspection ID: TextLabelInSwitchStatementJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "TextLabelInSwitchStatementJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/switch 语句问题", + "index": 59, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ES6PossiblyAsyncFunction", + "shortDescription": { + "text": "非异步函数中的 'await'" + }, + "fullDescription": { + "text": "报告可能想要异步但其实缺少 'async' 修饰符的函数中的 'await' 用法。 虽然 'await' 可以用作标识符,但很可能是打算将其用作运算符, 因此应将包含函数设为 'async' 。 Inspection ID: ES6PossiblyAsyncFunction", + "markdown": "报告可能想要异步但其实缺少 `async` 修饰符的函数中的 `await` 用法。 虽然 `await` 可以用作标识符,但很可能是打算将其用作运算符, 因此应将包含函数设为 `async` 。\n\nInspection ID: ES6PossiblyAsyncFunction" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "ES6PossiblyAsyncFunction", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/Async 代码和 promise", + "index": 61, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "EmptyCatchBlockJS", + "shortDescription": { + "text": "空 'catch' 块" + }, + "fullDescription": { + "text": "报告空的 'catch' 块。 这表明错误未加处理就被直接忽略。 'catch' 块中的任何注释都会禁止该检查。 Inspection ID: EmptyCatchBlockJS", + "markdown": "报告空的 `catch` 块。 这表明错误未加处理就被直接忽略。 \n\n`catch` 块中的任何注释都会禁止该检查。\n\nInspection ID: EmptyCatchBlockJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "EmptyCatchBlockJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/Try 语句问题", + "index": 43, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSHint", + "shortDescription": { + "text": "JSHint" + }, + "fullDescription": { + "text": "报告 JSHint linter 检测到的问题。 Inspection ID: JSHint", + "markdown": "报告 [JSHint](https://jshint.com/) linter 检测到的问题。\n\nInspection ID: JSHint" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "JSHint", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Unspecified" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/代码质量工具", + "index": 62, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "Eslint", + "shortDescription": { + "text": "ESLint" + }, + "fullDescription": { + "text": "报告 ESLint linter 检测到的差异。 高亮显示基于 ESLint 配置文件中为每条规则指定的规则严重性。 清除“使用配置文件中的规则严重性”复选框,对所有 ESLint 规则使用该项检查中配置的严重性。 Inspection ID: Eslint", + "markdown": "报告 [ESLint](https://eslint.org) linter 检测到的差异。 \n\n高亮显示基于 [ESLint 配置文件](https://eslint.org/docs/user-guide/configuring)中为每条规则指定的规则严重性。 \n\n清除\"使用配置文件中的规则严重性\"复选框,对所有 ESLint 规则使用该项检查中配置的严重性。\n\nInspection ID: Eslint" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "Eslint", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Unspecified" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/代码质量工具", + "index": 62, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSDuplicatedDeclaration", + "shortDescription": { + "text": "重复声明" + }, + "fullDescription": { + "text": "报告一个范围中的多个声明。 Inspection ID: JSDuplicatedDeclaration", + "markdown": "报告一个范围中的多个声明。\n\nInspection ID: JSDuplicatedDeclaration" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSDuplicatedDeclaration", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/常规", + "index": 18, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSEqualityComparisonWithCoercion.TS", + "shortDescription": { + "text": "相等运算符可能导致类型强制" + }, + "fullDescription": { + "text": "报告可能导致意外类型强制的相等运算符的用法。 建议将 '==' 或 '!=' 相等运算符替换为类型安全的 '===' 或 '!==' 运算符。 根据所选的选项,将报告下面的一种情况: '==' 和 '!=' 运算符的所有用法。 除了与 null 比较之外的所有用法。 某些代码样式允许使用 'x == null' 替代 'x === null || x === undefined'。 仅可疑的表达式,例如:'==' 或 '!=' 与 '0'、''''、'null'、'true'、'false' 或 'undefined' 比较。 Inspection ID: JSEqualityComparisonWithCoercion.TS", + "markdown": "报告可能导致意外类型强制的相等运算符的用法。 建议将 `==` 或 `!=` 相等运算符替换为类型安全的 `===` 或 `!==` 运算符。\n\n根据所选的选项,将报告下面的一种情况:\n\n* `==` 和 `!=` 运算符的所有用法。\n* 除了与 null 比较之外的所有用法。 某些代码样式允许使用 `x == null` 替代 `x === null || x === undefined`。\n* 仅可疑的表达式,例如:`==` 或 `!=` 与 `0`、`''`、`null`、`true`、`false` 或 `undefined` 比较。\n\nInspection ID: JSEqualityComparisonWithCoercion.TS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "EqualityComparisonWithCoercionJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/TypeScript", + "index": 35, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSOctalInteger", + "shortDescription": { + "text": "八进制整数" + }, + "fullDescription": { + "text": "报告已弃用的前缀为 '0' 而不是 '0o' 的八进制整数字面量。 现代 ECMAScript 代码中不允许使用此类字面量,在 strict 模式下使用它们会导致错误。 要针对 ES5 和 ES3 语言级别强制执行此检查,请选中下面的“对 ES5 代码中过时的八进制字面量发出警告”复选框。 Inspection ID: JSOctalInteger", + "markdown": "报告已弃用的前缀为 `0` 而不是 `0o` 的八进制整数字面量。 \n现代 ECMAScript 代码中不允许使用此类字面量,在 strict 模式下使用它们会导致错误。 \n要针对 ES5 和 ES3 语言级别强制执行此检查,请选中下面的\"对 ES5 代码中过时的八进制字面量发出警告\"复选框。\n\nInspection ID: JSOctalInteger" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "JSOctalInteger", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/有效性问题", + "index": 36, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ExceptionCaughtLocallyJS", + "shortDescription": { + "text": "将异常用于本地控制流" + }, + "fullDescription": { + "text": "报告异常始终可以通过包含 'try' 语句捕获的 'throw' 语句。 使用 'throw' 语句作为 'goto' 来更改局部控制流令人困惑。 Inspection ID: ExceptionCaughtLocallyJS", + "markdown": "报告异常始终可以通过包含 `try` 语句捕获的 `throw` 语句。 使用 `throw` 语句作为 `goto` 来更改局部控制流令人困惑。\n\nInspection ID: ExceptionCaughtLocallyJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ExceptionCaughtLocallyJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/Try 语句问题", + "index": 43, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ThrowFromFinallyBlockJS", + "shortDescription": { + "text": "'throw' 位于 'finally' 块内" + }, + "fullDescription": { + "text": "报告 'finally' 块中的 'throw' 语句。 此类 'throw' 语句可能会掩盖抛出的异常,并导致调试复杂化。 Inspection ID: ThrowFromFinallyBlockJS", + "markdown": "报告 `finally` 块中的 `throw` 语句。 此类 `throw` 语句可能会掩盖抛出的异常,并导致调试复杂化。\n\nInspection ID: ThrowFromFinallyBlockJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ThrowInsideFinallyBlockJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/Try 语句问题", + "index": 43, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "TypeScriptValidateGenericTypes", + "shortDescription": { + "text": "不正确的泛型实参" + }, + "fullDescription": { + "text": "报告函数、接口或类声明中的无效类型实参。 Inspection ID: TypeScriptValidateGenericTypes", + "markdown": "报告函数、接口或类声明中的无效类型实参。\n\nInspection ID: TypeScriptValidateGenericTypes" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "TypeScriptValidateGenericTypes", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/TypeScript", + "index": 35, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CyclomaticComplexityJS", + "shortDescription": { + "text": "函数过于复杂" + }, + "fullDescription": { + "text": "报告函数中分支点太多的函数(循环复杂度太高)。 此类函数可能令人困惑,也难以测试。 使用下面提供的字段可指定函数的最大可接受循环复杂度。 Inspection ID: CyclomaticComplexityJS", + "markdown": "报告函数中分支点太多的函数(循环复杂度太高)。 此类函数可能令人困惑,也难以测试。\n\n\n使用下面提供的字段可指定函数的最大可接受循环复杂度。\n\nInspection ID: CyclomaticComplexityJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "OverlyComplexFunctionJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/函数指标", + "index": 45, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSMismatchedCollectionQueryUpdate", + "shortDescription": { + "text": "不匹配的集合查询和更新" + }, + "fullDescription": { + "text": "报告查询了其内容但未更新或更新了其内容但未查询 的字段或变量的集合。 这种不匹配的查询和更新毫无意义, 并且可能表明有死码或排版错误。 根据查询方法是否返回某些内容或向其传递回调,来自动检测查询方法。 使用下表指定哪些方法是更新方法。 Inspection ID: JSMismatchedCollectionQueryUpdate", + "markdown": "报告查询了其内容但未更新或更新了其内容但未查询 的字段或变量的集合。 这种不匹配的查询和更新毫无意义, 并且可能表明有死码或排版错误。\n\n\n根据查询方法是否返回某些内容或向其传递回调,来自动检测查询方法。\n使用下表指定哪些方法是更新方法。\n\nInspection ID: JSMismatchedCollectionQueryUpdate" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSMismatchedCollectionQueryUpdate", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/常规", + "index": 18, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PackageJsonMismatchedDependency", + "shortDescription": { + "text": "package.json 中的依赖关系不匹配" + }, + "fullDescription": { + "text": "报告未安装或与指定的版本范围不匹配的 package.json 中的依赖项。 Inspection ID: PackageJsonMismatchedDependency", + "markdown": "报告未安装或与指定的[版本范围](https://docs.npmjs.com/about-semantic-versioning)不匹配的 package.json 中的依赖项。\n\nInspection ID: PackageJsonMismatchedDependency" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "PackageJsonMismatchedDependency", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/Import 和依赖项", + "index": 55, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSPotentiallyInvalidUsageOfThis", + "shortDescription": { + "text": "从闭包对 'this' 的引用可能无效" + }, + "fullDescription": { + "text": "报告闭包中的用于引用外部上下文属性的 'this'。 示例: 'function Outer() {\n this.outerProp = 1;\n function inner() {\n // 不良,因为 Outer 的 'outerProp' \n // 不会如预期的那样\n // 在调用 'new Outer()' 时在此处进行更新\n this.outerProp = 2;\n }\n inner();\n}' Inspection ID: JSPotentiallyInvalidUsageOfThis", + "markdown": "报告闭包中的用于引用外部上下文属性的 `this`。\n\n示例:\n\n\n function Outer() {\n this.outerProp = 1;\n function inner() {\n // 不良,因为 Outer 的 'outerProp' \n // 不会如预期的那样\n // 在调用 'new Outer()' 时在此处进行更新\n this.outerProp = 2;\n }\n inner();\n }\n\nInspection ID: JSPotentiallyInvalidUsageOfThis" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSPotentiallyInvalidUsageOfThis", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/可能的 bug", + "index": 26, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSMissingSwitchDefault", + "shortDescription": { + "text": "'switch' 语句没有 'default' 分支" + }, + "fullDescription": { + "text": "报告在未枚举某些可能值的情况下不含 'default' 子句的 'switch' 语句。 Inspection ID: JSMissingSwitchDefault", + "markdown": "报告在未枚举某些可能值的情况下不含 `default` 子句的 `switch` 语句。\n\nInspection ID: JSMissingSwitchDefault" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "JSMissingSwitchDefault", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/switch 语句问题", + "index": 59, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSXNamespaceValidation", + "shortDescription": { + "text": "缺少 JSX 命名空间" + }, + "fullDescription": { + "text": "报告未导入命名空间的 JSX 构造的用法。 将命名空间置于文件范围中可以确保正确编译代码。 Inspection ID: JSXNamespaceValidation", + "markdown": "报告未导入命名空间的 JSX 构造的用法。 将命名空间置于文件范围中可以确保正确编译代码。\n\nInspection ID: JSXNamespaceValidation" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "JSXNamespaceValidation", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/Import 和依赖项", + "index": 55, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSUnresolvedLibraryURL", + "shortDescription": { + "text": "HTTP 链接缺少本地存储的库" + }, + "fullDescription": { + "text": "报告未与任何本地存储文件关联的外部 JavaScript 库的 URL。 建议下载此库。 此类关联使 IDE 可以提供正确的代码补全和导航。 Inspection ID: JSUnresolvedLibraryURL", + "markdown": "报告未与任何本地存储文件关联的外部 JavaScript 库的 URL。 建议下载此库。 此类关联使 IDE 可以提供正确的代码补全和导航。\n\nInspection ID: JSUnresolvedLibraryURL" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSUnresolvedLibraryURL", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/常规", + "index": 18, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ES6PreferShortImport", + "shortDescription": { + "text": "可以缩短导入" + }, + "fullDescription": { + "text": "报告可缩短其 'from' 部分的 ES6 import。 建议导入父目录。 Inspection ID: ES6PreferShortImport", + "markdown": "报告可缩短其 `from` 部分的 ES6 import。 建议导入父目录。\n\nInspection ID: ES6PreferShortImport" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ES6PreferShortImport", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/常规", + "index": 18, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PointlessBitwiseExpressionJS", + "shortDescription": { + "text": "可以简化按位表达式" + }, + "fullDescription": { + "text": "报告包含 'and' 零、 'or' 零或零移位的表达式。 此类表达式可能是由于没有完全完成自动化重构而造成。 Inspection ID: PointlessBitwiseExpressionJS", + "markdown": "报告包含 `and` 零、 ` or` 零或零移位的表达式。 此类表达式可能是由于没有完全完成自动化重构而造成。\n\nInspection ID: PointlessBitwiseExpressionJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "PointlessBitwiseExpressionJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/按位运算问题", + "index": 30, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "InfiniteLoopJS", + "shortDescription": { + "text": "无限循环语句" + }, + "fullDescription": { + "text": "报告只能通过抛出异常来退出的 'for' 、 'while' 或 'do' 语句。 此类语句通常表示编码错误。 Inspection ID: InfiniteLoopJS", + "markdown": "报告只能通过抛出异常来退出的 `for` 、 `while` 或 `do` 语句。 此类语句通常表示编码错误。\n\nInspection ID: InfiniteLoopJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "InfiniteLoopJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/可能的 bug", + "index": 26, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSStringConcatenationToES6Template", + "shortDescription": { + "text": "已使用字符串串联而不是模板字面量" + }, + "fullDescription": { + "text": "报告字符串串联。 建议将其替换为模板字面量。 示例 '\"result: \" + a + \".\"' 应用快速修复后,代码如下所示: '`result: ${a}.`' Inspection ID: JSStringConcatenationToES6Template", + "markdown": "报告字符串串联。 建议将其替换为[模板字面量](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals)。\n\n示例\n\n \"result: \" + a + \".\" \n\n应用快速修复后,代码如下所示:\n\n `result: ${a}.` \n\nInspection ID: JSStringConcatenationToES6Template" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "JSStringConcatenationToES6Template", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/ES2015 迁移协助", + "index": 31, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSArrowFunctionBracesCanBeRemoved", + "shortDescription": { + "text": "箭头函数体周围的大括号冗余" + }, + "fullDescription": { + "text": "报告其函数体仅由大括号和恰好一条语句组成的箭头函数。 建议转换为不带大括号的简洁语法。 'let incrementer = (x) => {return x + 1};' 应用快速修复后,代码段如下所示: 'let incrementer = (x) => x + 1;' Inspection ID: JSArrowFunctionBracesCanBeRemoved", + "markdown": "报告其函数体仅由大括号和恰好一条语句组成的箭头函数。 建议转换为不带大括号的简洁语法。\n\n\n let incrementer = (x) => {return x + 1};\n\n应用快速修复后,代码段如下所示:\n\n\n let incrementer = (x) => x + 1;\n\nInspection ID: JSArrowFunctionBracesCanBeRemoved" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "JSArrowFunctionBracesCanBeRemoved", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/代码样式问题", + "index": 19, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ReplaceAssignmentWithOperatorAssignmentJS", + "shortDescription": { + "text": "赋值可被替换为运算符赋值" + }, + "fullDescription": { + "text": "报告可由运算符赋值替换的赋值运算,以使代码更简洁、更清晰。 示例: 'x = x + 3;'\n 'x = x / 3;'\n 应用该快速修复后,结果将如下所示: 'x += 3;'\n 'x /= 3;'\n Inspection ID: ReplaceAssignmentWithOperatorAssignmentJS", + "markdown": "报告可由运算符赋值替换的赋值运算,以使代码更简洁、更清晰。\n\n\n示例:\n\n x = x + 3;\n x = x / 3;\n\n应用该快速修复后,结果将如下所示:\n\n x += 3;\n x /= 3;\n\nInspection ID: ReplaceAssignmentWithOperatorAssignmentJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "AssignmentReplaceableWithOperatorAssignmentJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/赋值问题", + "index": 48, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSFileReferences", + "shortDescription": { + "text": "未解析的文件引用" + }, + "fullDescription": { + "text": "报告 JavaScript 文件中未解析的文件引用,包括 CommonJS 和 AMD 模块引用。 Inspection ID: JSFileReferences", + "markdown": "报告 JavaScript 文件中未解析的文件引用,包括 CommonJS 和 AMD 模块引用。\n\nInspection ID: JSFileReferences" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSFileReferences", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/常规", + "index": 18, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "FunctionWithInconsistentReturnsJS", + "shortDescription": { + "text": "函数的返回不一致" + }, + "fullDescription": { + "text": "报告在某些情况下返回值但在其他情况下不返回值的函数。 这通常表明有错误。 示例: 'function foo() {\n if (true)\n return 3;\n return;\n}'\n Inspection ID: FunctionWithInconsistentReturnsJS", + "markdown": "报告在某些情况下返回值但在其他情况下不返回值的函数。 这通常表明有错误。\n\n示例:\n\n\n function foo() {\n if (true)\n return 3;\n return;\n }\n\nInspection ID: FunctionWithInconsistentReturnsJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "FunctionWithInconsistentReturnsJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/有效性问题", + "index": 36, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ES6ClassMemberInitializationOrder", + "shortDescription": { + "text": "在 static 初始值设定项中使用可能未分配的属性" + }, + "fullDescription": { + "text": "报告引用另一个未提升的类成员,而被引用的这个类成员可能尚未初始化的类成员初始值设定项。 由于针对字段进行类成员初始化,所以一个字段不能引用后面声明的另一个字段。 Inspection ID: ES6ClassMemberInitializationOrder", + "markdown": "报告引用另一个未提升的类成员,而被引用的这个类成员可能尚未初始化的类成员初始值设定项。 \n\n由于针对字段进行类成员初始化,所以一个字段不能引用后面声明的另一个字段。\n\nInspection ID: ES6ClassMemberInitializationOrder" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ES6ClassMemberInitializationOrder", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/常规", + "index": 18, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "EmptyTryBlockJS", + "shortDescription": { + "text": "空 'try' 块" + }, + "fullDescription": { + "text": "报告空的 'try' 块,此类块通常表示有错误。 Inspection ID: EmptyTryBlockJS", + "markdown": "报告空的 `try` 块,此类块通常表示有错误。\n\nInspection ID: EmptyTryBlockJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "EmptyTryBlockJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/Try 语句问题", + "index": 43, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ReservedWordUsedAsNameJS", + "shortDescription": { + "text": "保留词用作名称" + }, + "fullDescription": { + "text": "报告用作名称的 JavaScript 保留字。 JavaScript 规范 保留了许多当前未用作关键字的词语。 如果后续版本的 JavaScript 开始使用这些词语作为关键字, 使用这些词语作为标识符可能会破坏代码。 Inspection ID: ReservedWordUsedAsNameJS", + "markdown": "报告用作名称的 JavaScript 保留字。 JavaScript 规范 保留了许多当前未用作关键字的词语。 如果后续版本的 JavaScript 开始使用这些词语作为关键字, 使用这些词语作为标识符可能会破坏代码。\n\nInspection ID: ReservedWordUsedAsNameJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ReservedWordAsName", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/有效性问题", + "index": 36, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSClassNamingConvention", + "shortDescription": { + "text": "类命名约定" + }, + "fullDescription": { + "text": "报告用 JSDoc '@constructor' 或 '@class' 标记进行注解, 并且其名称太短、太长或不符合指定正则表达式模式的类或函数。 使用下面提供的字段来指定类名称的最小长度、 最大长度以及预期的正则表达式。 对正则表达式使用标准的 'java.util.regex' 格式。 Inspection ID: JSClassNamingConvention", + "markdown": "报告用 JSDoc `@constructor` 或 `@class` 标记进行注解, 并且其名称太短、太长或不符合指定正则表达式模式的类或函数。\n\n\n使用下面提供的字段来指定类名称的最小长度、\n最大长度以及预期的正则表达式。 对正则表达式使用标准的 `java.util.regex` 格式。\n\nInspection ID: JSClassNamingConvention" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSClassNamingConvention", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/命名约定", + "index": 58, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "NestedFunctionJS", + "shortDescription": { + "text": "嵌套函数" + }, + "fullDescription": { + "text": "报告嵌套在另一个函数中的函数。 尽管 JavaScript 允许嵌套函数,但此类结构可能令人困惑。 使用下面的复选框以忽略匿名嵌套函数。 Inspection ID: NestedFunctionJS", + "markdown": "报告嵌套在另一个函数中的函数。 尽管 JavaScript 允许嵌套函数,但此类结构可能令人困惑。\n\n\n使用下面的复选框以忽略匿名嵌套函数。\n\nInspection ID: NestedFunctionJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "NestedFunctionJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/可能引起混淆的代码结构", + "index": 39, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "XHTMLIncompatabilitiesJS", + "shortDescription": { + "text": "不兼容的 XHTML 用法" + }, + "fullDescription": { + "text": "报告可能会导致 XHTML 文档出现问题的 常见 JavaScript DOM 模式。 特别是,根据文档是作为 XML 还是 HTML 加载, 所检测到的模式的行为将完全不同。 这可能导致难以捉摸的错误,即脚本行为依赖于文档的 MIME 类型而不是依赖于其内容。 检测到的模式包括 document.body、 document.images、 document.applets、 document.links、 document.forms 和 document.anchors。 Inspection ID: XHTMLIncompatabilitiesJS", + "markdown": "报告可能会导致 XHTML 文档出现问题的 常见 JavaScript DOM 模式。 特别是,根据文档是作为 XML 还是 HTML 加载, 所检测到的模式的行为将完全不同。 这可能导致难以捉摸的错误,即脚本行为依赖于文档的 MIME 类型而不是依赖于其内容。 检测到的模式包括 **document.body** 、 **document.images** 、 **document.applets** 、 **document.links** 、 **document.forms** 和 **document.anchors** 。\n\nInspection ID: XHTMLIncompatabilitiesJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "XHTMLIncompatabilitiesJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/DOM 问题", + "index": 60, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "IncrementDecrementResultUsedJS", + "shortDescription": { + "text": "使用增量或减量的结果" + }, + "fullDescription": { + "text": "报告赋值结果在包含其的表达式中 使用的递增 ('++') 或递减 ('--') 表达式。 此类赋值可能会由于运算顺序而导致困惑,因为赋值的评估可能会以意想不到的方式影响外部表达式。 示例:'var a = b++' Inspection ID: IncrementDecrementResultUsedJS", + "markdown": "报告赋值结果在包含其的表达式中 使用的递增 (`++`) 或递减 (`--`) 表达式。 此类赋值可能会由于运算顺序而导致困惑,因为赋值的评估可能会以意想不到的方式影响外部表达式。 示例:`var a = b++`\n\nInspection ID: IncrementDecrementResultUsedJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "IncrementDecrementResultUsedJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/可能引起混淆的代码结构", + "index": 39, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SuspiciousTypeOfGuard", + "shortDescription": { + "text": "类型 guard 检查不健全" + }, + "fullDescription": { + "text": "报告 'typeof' 或 'instanceof' 不健全的类型防护检查。 在以下两种情况下,'typeof x' 类型防护可能不健全: 'typeof x' 不对应于指定的值(例如,当 'x' 为 'string | boolean' 类型时,'typeof x === 'number'') 'typeof x' 始终对应于指定的值(例如,当 'x' 为 'string' 类型时,'typeof x === 'string'') 在以下两种情况下,'x instanceof A' 类型防护可能不健全: 'x' 的类型与 'A' 不相关 'x' 的类型是 'A' 或 'A' 的子类型 Inspection ID: SuspiciousTypeOfGuard", + "markdown": "报告 `typeof` 或 `instanceof` 不健全的类型防护检查。 在以下两种情况下,`typeof x` 类型防护可能不健全:\n\n* `typeof x` 不对应于指定的值(例如,当 `x` 为 'string \\| boolean' 类型时,`typeof x === 'number'`)\n* `typeof x` 始终对应于指定的值(例如,当 `x` 为 'string' 类型时,`typeof x === 'string'`)\n\n在以下两种情况下,`x instanceof A` 类型防护可能不健全:\n\n* `x` 的类型与 `A` 不相关\n* `x` 的类型是 `A` 或 `A` 的子类型\n\nInspection ID: SuspiciousTypeOfGuard" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SuspiciousTypeOfGuard", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/控制流问题", + "index": 1, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "TypeScriptJSXUnresolvedComponent", + "shortDescription": { + "text": "未解析的 JSX 组件" + }, + "fullDescription": { + "text": "报告对 JSX 组件的未解析引用。 如果引用的组件在此项目或其依赖项中定义,则建议添加 import 语句,或使用指定名称创建新组件。 新组件的模板可以在“编辑器 | 文件和代码模板”中修改。 Inspection ID: TypeScriptJSXUnresolvedComponent", + "markdown": "报告对 JSX 组件的未解析引用。 如果引用的组件在此项目或其依赖项中定义,则建议添加 import 语句,或使用指定名称创建新组件。\n\n新组件的模板可以在\"编辑器 \\| 文件和代码模板\"中修改。\n\nInspection ID: TypeScriptJSXUnresolvedComponent" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "TypeScriptJSXUnresolvedComponent", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/TypeScript", + "index": 35, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "TypeScriptFieldCanBeMadeReadonly", + "shortDescription": { + "text": "可以为只读字段" + }, + "fullDescription": { + "text": "报告可设为 readonly 的 private 字段(例如,如果该字段仅在构造函数中赋值)。 Inspection ID: TypeScriptFieldCanBeMadeReadonly", + "markdown": "报告可设为 readonly 的 private 字段(例如,如果该字段仅在构造函数中赋值)。\n\nInspection ID: TypeScriptFieldCanBeMadeReadonly" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "TypeScriptFieldCanBeMadeReadonly", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/TypeScript", + "index": 35, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ES6DestructuringVariablesMerge", + "shortDescription": { + "text": "正在析构具有相同键的属性" + }, + "fullDescription": { + "text": "报告多个包含相同键的解构属性。 建议合并这些属性。 Inspection ID: ES6DestructuringVariablesMerge", + "markdown": "报告多个包含相同键的解构属性。 建议合并这些属性。\n\nInspection ID: ES6DestructuringVariablesMerge" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "ES6DestructuringVariablesMerge", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/常规", + "index": 18, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "LoopStatementThatDoesntLoopJS", + "shortDescription": { + "text": "不循环的循环语句" + }, + "fullDescription": { + "text": "报告语句体最多可以执行一次的 'for' 、 'while' 或 'do' 语句。 这通常表示有错误。 Inspection ID: LoopStatementThatDoesntLoopJS", + "markdown": "报告语句体最多可以执行一次的 `for` 、 `while` 或 `do` 语句。 这通常表示有错误。\n\nInspection ID: LoopStatementThatDoesntLoopJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "LoopStatementThatDoesntLoopJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/控制流问题", + "index": 1, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "NegatedIfStatementJS", + "shortDescription": { + "text": "否定的 'if' 语句" + }, + "fullDescription": { + "text": "报告具有 else 分支和否定条件的 if 语句。 翻转 if 和 else 分支的顺序通常会改进此类语句的清晰度。 Inspection ID: NegatedIfStatementJS", + "markdown": "报告具有 **else** 分支和否定条件的 **if** 语句。 翻转 **if** 和 **else** 分支的顺序通常会改进此类语句的清晰度。\n\nInspection ID: NegatedIfStatementJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "NegatedIfStatementJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/可能引起混淆的代码结构", + "index": 39, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSNonASCIINames", + "shortDescription": { + "text": "包含非 ASCII 符号的标识符" + }, + "fullDescription": { + "text": "报告名称中的非 ASCII 符号。 如果选择“仅允许 ASCII 名称”选项,则报告所有包含非 ASCII 符号的名称。 否则,报告所有同时包含 ASCII 和非 ASCII 符号的名称。 Inspection ID: JSNonASCIINames", + "markdown": "报告名称中的非 ASCII 符号。 \n\n如果选择\"仅允许 ASCII 名称\"选项,则报告所有包含非 ASCII 符号的名称。 \n否则,报告所有同时包含 ASCII 和非 ASCII 符号的名称。\n\nInspection ID: JSNonASCIINames" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSNonASCIINames", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/命名约定", + "index": 58, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "TypeScriptRedundantGenericType", + "shortDescription": { + "text": "冗余类型实参" + }, + "fullDescription": { + "text": "报告其值等于默认值并且可以移除的类型实参。 示例: 'type Foo = T;\nlet z: Foo;' Inspection ID: TypeScriptRedundantGenericType", + "markdown": "报告其值等于默认值并且可以移除的类型实参。\n\n\n示例:\n\n\n type Foo = T;\n let z: Foo;\n\nInspection ID: TypeScriptRedundantGenericType" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "TypeScriptRedundantGenericType", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/TypeScript", + "index": 35, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "TypeScriptUMDGlobal", + "shortDescription": { + "text": "已引用的 UMD 全局变量" + }, + "fullDescription": { + "text": "如果当前文件是模块(ECMAScript 或 CommonJS),则报告 Universal Module Definition (UMD) 全局变量的用法。 如果没有隐式包含此库,那么在没有显式 import 的情况下引用 UMD 变量可能会导致运行时错误。 Inspection ID: TypeScriptUMDGlobal", + "markdown": "如果当前文件是模块(ECMAScript 或 CommonJS),则报告 Universal Module Definition (UMD) 全局变量的用法。 如果没有隐式包含此库,那么在没有显式 import 的情况下引用 UMD 变量可能会导致运行时错误。\n\nInspection ID: TypeScriptUMDGlobal" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "TypeScriptUMDGlobal", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/TypeScript", + "index": 35, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "UnnecessaryReturnJS", + "shortDescription": { + "text": "不必要的 'return' 语句" + }, + "fullDescription": { + "text": "报告不必要的 'return' 语句,即不返回值并且刚好在函数'贯穿'底部之前发生的 'return' 语句。 这些语句可以安全移除。 Inspection ID: UnnecessaryReturnJS", + "markdown": "报告不必要的 `return` 语句,即不返回值并且刚好在函数'贯穿'底部之前发生的 `return` 语句。 这些语句可以安全移除。\n\nInspection ID: UnnecessaryReturnJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "UnnecessaryReturnStatementJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/控制流问题", + "index": 1, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ConditionalExpressionWithIdenticalBranchesJS", + "shortDescription": { + "text": "具有相同分支的条件表达式" + }, + "fullDescription": { + "text": "报告具有相同的 'then' 和 'else' 分支的三元条件表达式。 Inspection ID: ConditionalExpressionWithIdenticalBranchesJS", + "markdown": "报告具有相同的 `then` 和 `else` 分支的三元条件表达式。\n\nInspection ID: ConditionalExpressionWithIdenticalBranchesJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ConditionalExpressionWithIdenticalBranchesJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/控制流问题", + "index": 1, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSUnfilteredForInLoop", + "shortDescription": { + "text": "未过滤 for..in 循环" + }, + "fullDescription": { + "text": "报告未筛选的 'for-in' 循环。 使用此结构不仅会处理对象自身的属性,还会处理对象原型的属性。 在某些特定情况下可能出人意料,例如,在复制或修改所有属性的实用程序方法中 或者 'Object' 的原型可能被错误修改时。 例如,以下代码将打印 42 和 myMethod: 'Object.prototype.myMethod = function myMethod() {};\nlet a = { foo: 42 };\nfor (let i in a) {\n console.log(a[i]);\n}' 建议将整个循环替换为 'Object.keys()' 方法,或添加 'hasOwnProperty()' 检查。 应用快速修复后,代码如下所示: 'for (let i in a) {\n if (a.hasOwnProperty(i)) {\n console.log(a[i]);\n }\n}' Inspection ID: JSUnfilteredForInLoop", + "markdown": "报告未筛选的 `for-in` 循环。 \n\n使用此结构不仅会处理对象自身的属性,还会处理对象原型的属性。 在某些特定情况下可能出人意料,例如,在复制或修改所有属性的实用程序方法中 或者 `Object` 的原型可能被错误修改时。 例如,以下代码将打印 **42** 和 **myMethod** : \n\n\n Object.prototype.myMethod = function myMethod() {};\n let a = { foo: 42 };\n for (let i in a) {\n console.log(a[i]);\n }\n\n建议将整个循环替换为 `Object.keys()` 方法,或添加 `hasOwnProperty()` 检查。 应用快速修复后,代码如下所示:\n\n\n for (let i in a) {\n if (a.hasOwnProperty(i)) {\n console.log(a[i]);\n }\n }\n\nInspection ID: JSUnfilteredForInLoop" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSUnfilteredForInLoop", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/常规", + "index": 18, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSAnnotator", + "shortDescription": { + "text": "未遵循 ECMAScript 规范" + }, + "fullDescription": { + "text": "报告基本语法问题以及与语言规范不一致的情况,例如关键字的无效用法、不兼容的数字格式的用法或 getter/setter 的多个形参。 通常必须报告此类错误,并且不应禁用这些错误。 但在某些情况下,例如由于 JavaScript 的动态性质而导致问题、使用尚未支持的语言功能或 IDE 检查器中有错误时,禁止报告这些很基本的错误可能会很方便。 Inspection ID: JSAnnotator", + "markdown": "报告基本语法问题以及与语言规范不一致的情况,例如关键字的无效用法、不兼容的数字格式的用法或 getter/setter 的多个形参。 \n通常必须报告此类错误,并且不应禁用这些错误。 但在某些情况下,例如由于 JavaScript 的动态性质而导致问题、使用尚未支持的语言功能或 IDE 检查器中有错误时,禁止报告这些很基本的错误可能会很方便。\n\nInspection ID: JSAnnotator" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "JSAnnotator", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/常规", + "index": 18, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSIncompatibleTypesComparison", + "shortDescription": { + "text": "类型不兼容的表达式的比较" + }, + "fullDescription": { + "text": "报告与不兼容类型的操作数或不含可能公共值的类型的操作数的比较。 Inspection ID: JSIncompatibleTypesComparison", + "markdown": "报告与不兼容类型的操作数或不含可能公共值的类型的操作数的比较。\n\nInspection ID: JSIncompatibleTypesComparison" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "JSIncompatibleTypesComparison", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/可能的 bug", + "index": 26, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSLastCommaInObjectLiteral", + "shortDescription": { + "text": "对象字面量中的最后一个逗号多余" + }, + "fullDescription": { + "text": "报告对象字面量中尾随逗号的用法。 只有将 JavaScript 语言版本设置为 ECMAScript 5.1 时才报告该警告。 此规范允许在对象字面量中使用尾随逗号,但在使用尾随逗号时,某些浏览器可能会抛出错误。 您可以在代码样式 | JavaScript 或 TypeScript | 标点符号中配置尾随逗号的格式设置选项。 Inspection ID: JSLastCommaInObjectLiteral", + "markdown": "报告对象字面量中尾随逗号的用法。\n\n只有将 JavaScript 语言版本设置为 ECMAScript 5.1 时才报告该警告。\n\n此规范允许在对象字面量中使用尾随逗号,但在使用尾随逗号时,某些浏览器可能会抛出错误。\n\n您可以在**代码样式** \\| **JavaScript** 或 **TypeScript** \\| **标点符号**中配置尾随逗号的格式设置选项。\n\nInspection ID: JSLastCommaInObjectLiteral" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSLastCommaInObjectLiteral", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/常规", + "index": 18, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSFunctionExpressionToArrowFunction", + "shortDescription": { + "text": "使用了函数表达式而不是箭头函数" + }, + "fullDescription": { + "text": "报告函数表达式。 建议将其转换为箭头函数。 示例: 'arr.map(function(el) {return el + 1})' 应用快速修复后,代码如下所示: 'arr.map(el => el + 1)' Inspection ID: JSFunctionExpressionToArrowFunction", + "markdown": "报告[函数](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/function)表达式。 建议将其转换为[箭头函数](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions)。\n\n示例:\n\n arr.map(function(el) {return el + 1})\n\n应用快速修复后,代码如下所示:\n\n arr.map(el => el + 1)\n\nInspection ID: JSFunctionExpressionToArrowFunction" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "JSFunctionExpressionToArrowFunction", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/ES2015 迁移协助", + "index": 31, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ES6TopLevelAwaitExpression", + "shortDescription": { + "text": "顶层 'await' 表达式" + }, + "fullDescription": { + "text": "报告顶层 'await' 表达式的用法。 虽然有人在提出新的 'top-level async' 建议,但不允许在 async 函数之外使用 'await'。 Inspection ID: ES6TopLevelAwaitExpression", + "markdown": "报告顶层 `await` 表达式的用法。 虽然有人在提出新的 'top-level async' 建议,但不允许在 async 函数之外使用 `await`。\n\nInspection ID: ES6TopLevelAwaitExpression" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "ES6TopLevelAwaitExpression", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/Async 代码和 promise", + "index": 61, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ES6MissingAwait", + "shortDescription": { + "text": "异步函数调用缺少 await" + }, + "fullDescription": { + "text": "报告 'async' 函数中没有预期的 'await' 前缀的 'async' 函数调用。 此类调用返回 'Promise',并且控制流会立即继续。 示例: 'async function bar() { /* ... */ }\nasync function foo() {\n bar(); // 不良\n}' 应用快速修复后,将添加 'await' 前缀: 'async function bar() { /* ... */ }\nasync function foo() {\n await bar(); // 优良\n}' 在选中“报告 return 语句中的 promise”复选框的情况下,还建议在 return 语句中添加 'await'。 虽然一般不必这样做,但它有两大好处。 使用 'try-catch' 环绕代码时,您不会忘记去添加 'await'。 显式的 'await' 有助于 V8 运行时提供异步堆栈跟踪。 Inspection ID: ES6MissingAwait", + "markdown": "报告 `async` 函数中没有预期的 `await` 前缀的 ` async` 函数调用。 此类调用返回 `Promise`,并且控制流会立即继续。\n\n示例:\n\n\n async function bar() { /* ... */ }\n async function foo() {\n bar(); // 不良\n }\n\n\n应用快速修复后,将添加 `await` 前缀:\n\n\n async function bar() { /* ... */ }\n async function foo() {\n await bar(); // 优良\n }\n\n在选中\"报告 return 语句中的 promise\"复选框的情况下,还建议在 return 语句中添加 `await`。 \n虽然一般不必这样做,但它有两大好处。 \n\n* 使用 `try-catch` 环绕代码时,您不会忘记去添加 `await`。\n* 显式的 `await` 有助于 V8 运行时提供[异步堆栈跟踪](https://bit.ly/v8-zero-cost-async-stack-traces)。\n\nInspection ID: ES6MissingAwait" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "ES6MissingAwait", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/Async 代码和 promise", + "index": 61, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "TailRecursionJS", + "shortDescription": { + "text": "尾递归" + }, + "fullDescription": { + "text": "报告尾递归,即报告函数在返回之前 调用自身作为最后操作的情况。 尾递归总是可以替换为循环,循环的速度快得多。 一些 JavaScript 引擎执行这种优化,而另一些则不执行。 因此,尾递归解决方案在不同环境下 可能具有截然不同的性能特点。 Inspection ID: TailRecursionJS", + "markdown": "报告尾递归,即报告函数在返回之前 调用自身作为最后操作的情况。 尾递归总是可以替换为循环,循环的速度快得多。 一些 JavaScript 引擎执行这种优化,而另一些则不执行。 因此,尾递归解决方案在不同环境下 可能具有截然不同的性能特点。\n\nInspection ID: TailRecursionJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "TailRecursionJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Performance" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/控制流问题", + "index": 1, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ES6ConvertToForOf", + "shortDescription": { + "text": "使用了 'for..in' 而不是 'for..of'" + }, + "fullDescription": { + "text": "报告对数组的 'for..in' 循环的用法。 建议将其替换为 'for..of' 循环。 'for..of' 循环 (在 ECMAScript 6 中引入) 对 'iterable' 对象进行迭代。 对于数组,此结构比 'for..in' 更可取,因为它只处理数组值,不处理数组对象的属性。 Inspection ID: ES6ConvertToForOf", + "markdown": "报告对数组的 [for..in](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...in) 循环的用法。 建议将其替换为 [for..of](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of) 循环。 \n`for..of` 循环 (在 ECMAScript 6 中引入) 对 `iterable` 对象进行迭代。 对于数组,此结构比 `for..in` 更可取,因为它只处理数组值,不处理数组对象的属性。\n\nInspection ID: ES6ConvertToForOf" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "ES6ConvertToForOf", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/ES2015 迁移协助", + "index": 31, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ParameterNamingConventionJS", + "shortDescription": { + "text": "函数形参命名约定" + }, + "fullDescription": { + "text": "报告名称太短、太长或不符合 指定正则表达式模式的函数形参。 使用下面提供的字段来指定局部变量名称的最小长度、 最大长度以及预期的正则表达式。 使用标准 'java.util.regex' 格式的正则表达式。 Inspection ID: ParameterNamingConventionJS", + "markdown": "报告名称太短、太长或不符合 指定正则表达式模式的函数形参。\n\n\n使用下面提供的字段来指定局部变量名称的最小长度、\n最大长度以及预期的正则表达式。 使用标准 `java.util.regex` 格式的正则表达式。\n\nInspection ID: ParameterNamingConventionJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ParameterNamingConventionJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/命名约定", + "index": 58, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSUndefinedPropertyAssignment", + "shortDescription": { + "text": "未定义的属性赋值" + }, + "fullDescription": { + "text": "报告对未在变量类型中定义的属性的赋值。 示例: '/**\n * @type {{ property1: string, property2: number }}\n */\nlet myVariable = create();\n\nmyVariable.newProperty = 3; // 不良' Inspection ID: JSUndefinedPropertyAssignment", + "markdown": "报告对未在变量类型中定义的属性的赋值。\n\n示例:\n\n\n /**\n * @type {{ property1: string, property2: number }}\n */\n let myVariable = create();\n\n myVariable.newProperty = 3; // 不良\n\nInspection ID: JSUndefinedPropertyAssignment" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "JSUndefinedPropertyAssignment", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/代码样式问题", + "index": 19, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "StandardJS", + "shortDescription": { + "text": "标准代码样式" + }, + "fullDescription": { + "text": "报告 JavaScript Standard Style linter 检测到的差异。 编辑器中高亮显示的严重性基于 linter 报告的严重性级别。 Inspection ID: StandardJS", + "markdown": "报告 [JavaScript Standard Style](https://standardjs.com/) linter 检测到的差异。 \n\n编辑器中高亮显示的严重性基于 linter 报告的严重性级别。\n\nInspection ID: StandardJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "StandardJS", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Unspecified" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/代码质量工具", + "index": 62, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ParametersPerFunctionJS", + "shortDescription": { + "text": "函数的形参过多" + }, + "fullDescription": { + "text": "报告形参过多的函数。 此类函数通常表明设计有问题。 使用下面的字段可指定函数的最大可接受形参数量。 Inspection ID: ParametersPerFunctionJS", + "markdown": "报告形参过多的函数。 此类函数通常表明设计有问题。\n\n\n使用下面的字段可指定函数的最大可接受形参数量。\n\nInspection ID: ParametersPerFunctionJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "OverlyComplexFunctionJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/函数指标", + "index": 45, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ThisExpressionReferencesGlobalObjectJS", + "shortDescription": { + "text": "引用全局对象的 'this' 表达式" + }, + "fullDescription": { + "text": "报告对象字面量或构造函数体之外的 'this' 表达式。 此类 'this' 表达式引用顶级“全局”JavaScript 对象,但大多是无用的。 Inspection ID: ThisExpressionReferencesGlobalObjectJS", + "markdown": "报告对象字面量或构造函数体之外的 ` this` 表达式。 此类 `this` 表达式引用顶级\"全局\"JavaScript 对象,但大多是无用的。\n\nInspection ID: ThisExpressionReferencesGlobalObjectJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ThisExpressionReferencesGlobalObjectJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/有效性问题", + "index": 36, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "NestedAssignmentJS", + "shortDescription": { + "text": "嵌套赋值" + }, + "fullDescription": { + "text": "报告嵌套在另一个表达式中的赋值表达式,例如 'a=b=1'。 此类表达式可能令人困惑,并违反一般设计原则,即给定结构只应发挥一种作用。 Inspection ID: NestedAssignmentJS", + "markdown": "报告嵌套在另一个表达式中的赋值表达式,例如 `a=b=1`。 此类表达式可能令人困惑,并违反一般设计原则,即给定结构只应发挥一种作用。\n\nInspection ID: NestedAssignmentJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "NestedAssignmentJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/赋值问题", + "index": 48, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "DefaultNotLastCaseInSwitchJS", + "shortDescription": { + "text": "'default' 不是 'switch' 中的最后一个 case" + }, + "fullDescription": { + "text": "报告其中的 'default' case 位于另一个 case 之前, 而不是作为最后一个 case,因而可能造成混淆的 'switch' 语句。 Inspection ID: DefaultNotLastCaseInSwitchJS", + "markdown": "报告其中的 `default` case 位于另一个 case 之前, 而不是作为最后一个 case,因而可能造成混淆的 `switch` 语句。\n\nInspection ID: DefaultNotLastCaseInSwitchJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "DefaultNotLastCaseInSwitchJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/switch 语句问题", + "index": 59, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ConfusingPlusesOrMinusesJS", + "shortDescription": { + "text": "令人困惑的 '+' 或 '-' 序列" + }, + "fullDescription": { + "text": "报告 JavaScript 代码中 '+' 或 '-' 字符的可疑组合 (例如 'a+++b') 。 此类序列令人困惑,并且它们的语义可能会因为空格的变化而变化。 Inspection ID: ConfusingPlusesOrMinusesJS", + "markdown": "报告 JavaScript 代码中 `+` 或 `-` 字符的可疑组合 (例如 `a+++b`) 。 此类序列令人困惑,并且它们的语义可能会因为空格的变化而变化。\n\nInspection ID: ConfusingPlusesOrMinusesJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ConfusingPlusesOrMinusesJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/可能引起混淆的代码结构", + "index": 39, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSDeprecatedSymbols", + "shortDescription": { + "text": "已使用弃用的符号" + }, + "fullDescription": { + "text": "报告弃用的函数变量的用法。 Inspection ID: JSDeprecatedSymbols", + "markdown": "报告弃用的函数变量的用法。\n\nInspection ID: JSDeprecatedSymbols" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "JSDeprecatedSymbols", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/常规", + "index": 18, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "LocalVariableNamingConventionJS", + "shortDescription": { + "text": "局部变量命名约定" + }, + "fullDescription": { + "text": "报告名称太短、太长或不符合 指定正则表达式模式的局部变量。 使用下面提供的字段来指定局部变量名称的最小长度、 最大长度以及预期的正则表达式。 使用标准 'java.util.regex' 格式的正则表达式。 Inspection ID: LocalVariableNamingConventionJS", + "markdown": "报告名称太短、太长或不符合 指定正则表达式模式的局部变量。\n\n\n使用下面提供的字段来指定局部变量名称的最小长度、\n最大长度以及预期的正则表达式。 使用标准 `java.util.regex` 格式的正则表达式。\n\nInspection ID: LocalVariableNamingConventionJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "LocalVariableNamingConventionJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/命名约定", + "index": 58, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "EmptyFinallyBlockJS", + "shortDescription": { + "text": "空 'finally' 块" + }, + "fullDescription": { + "text": "报告空的 'finally' 块,此类块通常表明有错误。 Inspection ID: EmptyFinallyBlockJS", + "markdown": "报告空的 `finally` 块,此类块通常表明有错误。\n\nInspection ID: EmptyFinallyBlockJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "EmptyFinallyBlockJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/Try 语句问题", + "index": 43, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSCommentMatchesSignature", + "shortDescription": { + "text": "不匹配的 JSDoc 和函数签名" + }, + "fullDescription": { + "text": "报告 JSDoc 注释中形参的名称和数量与函数的实际形参之间不匹配的情况。 建议更新 JSDoc 注释中的形参。 示例: '/**\n * @param height Height in pixels\n */\nfunction sq(height, width) {} // 宽度未记录' 在应用快速修复后: '/**\n * @param height Height in pixels\n * @param width\n */\nfunction sq(height, width) {}' Inspection ID: JSCommentMatchesSignature", + "markdown": "报告 JSDoc 注释中形参的名称和数量与函数的实际形参之间不匹配的情况。 建议更新 JSDoc 注释中的形参。\n\n**示例:**\n\n\n /**\n * @param height Height in pixels\n */\n function sq(height, width) {} // 宽度未记录\n\n在应用快速修复后:\n\n\n /**\n * @param height Height in pixels\n * @param width\n */\n function sq(height, width) {}\n\nInspection ID: JSCommentMatchesSignature" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSCommentMatchesSignature", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/常规", + "index": 18, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "UpdateDependencyToLatestVersion", + "shortDescription": { + "text": "将 package.json 依赖项更新为最新版本" + }, + "fullDescription": { + "text": "建议将 package.json 依赖项升级到最新版本,并忽略指定的版本。 Inspection ID: UpdateDependencyToLatestVersion", + "markdown": "建议将 package.json 依赖项升级到最新版本,并忽略指定的版本。\n\nInspection ID: UpdateDependencyToLatestVersion" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "UpdateDependencyToLatestVersion", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info", + "codeQualityCategory": "Unspecified" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/Import 和依赖项", + "index": 55, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "TypeScriptConfig", + "shortDescription": { + "text": "不一致的 Tsconfig.json 属性" + }, + "fullDescription": { + "text": "报告 tsconfig.json 文件中的 'paths' 、'checkJs' 或 'extends' 属性不一致的情况。 'checkJs' 属性必须具备 'allowJs'。 'extends' 属性应为有效的文件引用。 Inspection ID: TypeScriptConfig", + "markdown": "报告 tsconfig.json 文件中的 `paths` 、`checkJs` 或 `extends` 属性不一致的情况。 \n`checkJs` 属性必须具备 `allowJs`。 \n`extends` 属性应为有效的文件引用。\n\nInspection ID: TypeScriptConfig" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "TypeScriptConfig", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/TypeScript", + "index": 35, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSSuspiciousNameCombination", + "shortDescription": { + "text": "可疑的变量/形参名称组合" + }, + "fullDescription": { + "text": "报告目标变量或函数形参的名称与分配给它的值的名称不匹配的赋值或函数调用。 示例: 'var x = 0;\n var y = x;' 或 'var x = 0, y = 0;\n var rc = new Rectangle(y, x, 20, 20);' 此处,检查猜测 'x' 和 'y' 混淆了。 指定不应一起使用的名称。 如果形参名称或赋值目标名称包含一个组中的词语,而赋值或传递的变量的名称包含另一个组中的词语,则会报告错误。 Inspection ID: JSSuspiciousNameCombination", + "markdown": "报告目标变量或函数形参的名称与分配给它的值的名称不匹配的赋值或函数调用。\n\n示例:\n\n\n var x = 0;\n var y = x;\n\n或\n\n\n var x = 0, y = 0;\n var rc = new Rectangle(y, x, 20, 20);\n\n此处,检查猜测 `x` 和 `y` 混淆了。\n\n指定不应一起使用的名称。 如果形参名称或赋值目标名称包含一个组中的词语,而赋值或传递的变量的名称包含另一个组中的词语,则会报告错误。\n\nInspection ID: JSSuspiciousNameCombination" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSSuspiciousNameCombination", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/可能的 bug", + "index": 26, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSUnresolvedExtXType", + "shortDescription": { + "text": "未解析的 Ext JS xtype" + }, + "fullDescription": { + "text": "报告没有相应类的 Ext JS 'xtype' 引用。 Inspection ID: JSUnresolvedExtXType", + "markdown": "报告没有相应类的 Ext JS `xtype` 引用。\n\nInspection ID: JSUnresolvedExtXType" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JSUnresolvedExtXType", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/常规", + "index": 18, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ForLoopThatDoesntUseLoopVariableJS", + "shortDescription": { + "text": "'for' 循环中的 update 或 condition 未使用循环变量" + }, + "fullDescription": { + "text": "报告其中的条件或更新不使用 'for' 循环变量的 'for' 循环。 Inspection ID: ForLoopThatDoesntUseLoopVariableJS", + "markdown": "报告其中的条件或更新不使用 `for` 循环变量的 `for` 循环。\n\nInspection ID: ForLoopThatDoesntUseLoopVariableJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ForLoopThatDoesntUseLoopVariableJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/可能的 bug", + "index": 26, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "TypeScriptAbstractClassConstructorCanBeMadeProtected", + "shortDescription": { + "text": "抽象类构造函数可以设为 protected" + }, + "fullDescription": { + "text": "报告 abstract 类的 public 构造函数,并建议将其设置为 protected(因为将其设置为 public 是无用的)。 Inspection ID: TypeScriptAbstractClassConstructorCanBeMadeProtected", + "markdown": "报告 abstract 类的 public 构造函数,并建议将其设置为 protected(因为将其设置为 public 是无用的)。\n\nInspection ID: TypeScriptAbstractClassConstructorCanBeMadeProtected" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "TypeScriptAbstractClassConstructorCanBeMadeProtected", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/TypeScript", + "index": 35, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "FunctionWithMultipleReturnPointsJS", + "shortDescription": { + "text": "函数具有多个返回点" + }, + "fullDescription": { + "text": "报告具有多个返回点的函数。 此类函数难以理解和维护。 Inspection ID: FunctionWithMultipleReturnPointsJS", + "markdown": "报告具有多个返回点的函数。 此类函数难以理解和维护。\n\nInspection ID: FunctionWithMultipleReturnPointsJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "FunctionWithMultipleReturnPointsJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/函数指标", + "index": 45, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSIgnoredPromiseFromCall", + "shortDescription": { + "text": "返回 promise 的方法调用结果被忽略" + }, + "fullDescription": { + "text": "报告返回日后不使用的 'Promise' 的函数调用。 此类调用通常是无意为之,表明有错误。 Inspection ID: JSIgnoredPromiseFromCall", + "markdown": "报告返回日后不使用的 `Promise` 的函数调用。 此类调用通常是无意为之,表明有错误。\n\nInspection ID: JSIgnoredPromiseFromCall" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "JSIgnoredPromiseFromCall", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/Async 代码和 promise", + "index": 61, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ThreeNegationsPerFunctionJS", + "shortDescription": { + "text": "函数包含三个以上的否定" + }, + "fullDescription": { + "text": "报告具有三项或更多项否定运算('!' 或 '!=')的函数。 此类函数可能造成不必要的混淆。 Inspection ID: ThreeNegationsPerFunctionJS", + "markdown": "报告具有三项或更多项否定运算(`!` 或 `!=`)的函数。 此类函数可能造成不必要的混淆。\n\nInspection ID: ThreeNegationsPerFunctionJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "FunctionWithMoreThanThreeNegationsJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/函数指标", + "index": 45, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JSRemoveUnnecessaryParentheses", + "shortDescription": { + "text": "不必要的圆括号" + }, + "fullDescription": { + "text": "报告冗余圆括号。 在表达式中: 'var x = ((1) + 2) + 3' 在箭头函数实参列表中: 'var incrementer = (x) => x + 1' 在 TypeScript 和 Flow 类型声明中: 'type Card = (Suit & Rank) | (Suit & Number)' Inspection ID: JSRemoveUnnecessaryParentheses", + "markdown": "报告冗余圆括号。\n\n在表达式中:\n\n var x = ((1) + 2) + 3\n\n在箭头函数实参列表中:\n\n var incrementer = (x) => x + 1\n\n在 TypeScript 和 Flow 类型声明中:\n\n type Card = (Suit & Rank) | (Suit & Number)\n\nInspection ID: JSRemoveUnnecessaryParentheses" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "JSRemoveUnnecessaryParentheses", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/代码样式问题", + "index": 19, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "OverlyComplexBooleanExpressionJS", + "shortDescription": { + "text": "过度复杂的布尔表达式" + }, + "fullDescription": { + "text": "报告包含太多项的布尔表达式。 此类表达方式可能令人困惑,并且容易出错。 使用下面的字段可指定算术表达式中允许的最大项数。 Inspection ID: OverlyComplexBooleanExpressionJS", + "markdown": "报告包含太多项的布尔表达式。 此类表达方式可能令人困惑,并且容易出错。\n\n\n使用下面的字段可指定算术表达式中允许的最大项数。\n\nInspection ID: OverlyComplexBooleanExpressionJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "OverlyComplexBooleanExpressionJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/可能引起混淆的代码结构", + "index": 39, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "OverlyComplexArithmeticExpressionJS", + "shortDescription": { + "text": "过于复杂的算术表达式" + }, + "fullDescription": { + "text": "报告包含太多项的算术表达式。 此类表达方式可能令人困惑,并且容易出错。 使用下面的字段可指定算术表达式中允许的最大项数。 Inspection ID: OverlyComplexArithmeticExpressionJS", + "markdown": "报告包含太多项的算术表达式。 此类表达方式可能令人困惑,并且容易出错。\n\n\n使用下面的字段可指定算术表达式中允许的最大项数。\n\nInspection ID: OverlyComplexArithmeticExpressionJS" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "OverlyComplexArithmeticExpressionJS", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/可能引起混淆的代码结构", + "index": 39, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ES6RedundantNestingInTemplateLiteral", + "shortDescription": { + "text": "模板字面量中的冗余嵌套" + }, + "fullDescription": { + "text": "报告字符串或模板字面量的嵌套实例。 建议将嵌套的实例内联到包含其的模板字符串中。 示例: 'let a = `Hello, ${`Brave ${\"New\"}`} ${\"World\"}!`' 应用快速修复后,代码如下所示: 'let a = `Hello, Brave New World!`' Inspection ID: ES6RedundantNestingInTemplateLiteral", + "markdown": "报告字符串或模板字面量的嵌套实例。 建议将嵌套的实例内联到包含其的模板字符串中。\n\n示例:\n\n\n let a = `Hello, ${`Brave ${\"New\"}`} ${\"World\"}!`\n\n应用快速修复后,代码如下所示:\n\n\n let a = `Hello, Brave New World!`\n\nInspection ID: ES6RedundantNestingInTemplateLiteral" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "ES6RedundantNestingInTemplateLiteral", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/常规", + "index": 18, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "StringLiteralBreaksHTMLJS", + "shortDescription": { + "text": "中断 HTML 解析的字符串字面量" + }, + "fullDescription": { + "text": "报告包含 '`" + }, + "fullDescription": { + "text": "报告后面没有跟随 `as ` 的 `extern crate self`。 Inspection ID: RsExternCrateSelfWithoutAsName", + "markdown": "报告后面没有跟随 \\`as \\\\` 的 \\`extern crate self\\`。\n\nInspection ID: RsExternCrateSelfWithoutAsName" + }, + "defaultConfiguration": { + "enabled": true, + "level": "error", + "parameters": { + "suppressToolId": "RsExternCrateSelfWithoutAsName", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Unspecified" + } + }, + "relationships": [ + { + "target": { + "id": "Rust", + "index": 3, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "RsInternalPartlyUnknownType", + "shortDescription": { + "text": "部分未知类型(内部)" + }, + "fullDescription": { + "text": "This inspection is for internal use only. Inspection ID: RsInternalPartlyUnknownType", + "markdown": "This inspection is for internal use only.\n\nInspection ID: RsInternalPartlyUnknownType" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "RsInternalPartlyUnknownType", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Unspecified" + } + }, + "relationships": [ + { + "target": { + "id": "Rust", + "index": 3, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "RsNeedlessLifetimes", + "shortDescription": { + "text": "不必要的生存期注解" + }, + "fullDescription": { + "text": "检查可以通过依赖生存期省略来移除的生存期注解。 对应于 Rust Clippy 中的 needless_lifetimes lint。 Inspection ID: RsNeedlessLifetimes", + "markdown": "检查可以通过依赖生存期省略来移除的生存期注解。 对应于 Rust Clippy 中的 [needless_lifetimes](https://rust-lang.github.io/rust-clippy/stable/#needless_lifetimes) lint。\n\nInspection ID: RsNeedlessLifetimes" + }, + "defaultConfiguration": { + "enabled": true, + "level": "note", + "parameters": { + "suppressToolId": "RsNeedlessLifetimes", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "codeQualityCategory": "Unspecified" + } + }, + "relationships": [ + { + "target": { + "id": "Rust/Lint", + "index": 4, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "RsWrongAssocTypeArguments", + "shortDescription": { + "text": "错误的关联类型实参" + }, + "fullDescription": { + "text": "检查类型或特征引用是否使用了正确的关联类型实参。 对应于 E0191 和 E0220 Rust 错误。 Inspection ID: RsWrongAssocTypeArguments", + "markdown": "检查类型或特征引用是否使用了正确的关联类型实参。 \n对应于 [E0191](https://doc.rust-lang.org/error-index.html#E0191) 和 [E0220](https://doc.rust-lang.org/error-index.html#E0220) Rust 错误。\n\nInspection ID: RsWrongAssocTypeArguments" + }, + "defaultConfiguration": { + "enabled": true, + "level": "error", + "parameters": { + "suppressToolId": "RsWrongAssocTypeArguments", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Unspecified" + } + }, + "relationships": [ + { + "target": { + "id": "Rust", + "index": 3, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "Docker", + "version": "261.26222.73", + "rules": [ + { + "id": "DockerFileCopyHeredoc", + "shortDescription": { + "text": "heredoc 作为 ADD/COPY 的最后一个实参(目标)" + }, + "fullDescription": { + "text": "报告在 ADD/COPY 命令中用作最后一个实参(目标)的 heredoc。 示例: 此代码定义了无效的目标: 'COPY foo < file1 && < file2 && < file3\n mkdir -p foo/bar\n FILE1' Inspection ID: DockerFileHeredocDelimiters", + "markdown": "报告文件末尾未闭合的 heredoc 分隔符。\n\n**示例:**\n此代码将报告缺失的 FILE2 和 FILE3 分隔符。\n\n\n RUN < file1 && < file2 && < file3\n mkdir -p foo/bar\n FILE1\n\nInspection ID: DockerFileHeredocDelimiters" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "DockerFileHeredocDelimiters", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Unspecified" + } + }, + "relationships": [ + { + "target": { + "id": "Dockerfile", + "index": 5, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ComposeUnquotedPorts", + "shortDescription": { + "text": "未加引号的端口映射" + }, + "fullDescription": { + "text": "报告 Docker Compose 文件中未加引号的端口映射。 根据 Compose 文件规范,'HOST:CONTAINER' 格式的映射端口在使用小于 60 的容器端口时可能会导致错误的结果,因为 YAML 会将格式为 'xx:yy' 的数字解析为六十进制值。 因此,我们建议始终将端口映射明确指定为字符串。 示例: 'ports:\n - 3000\n - 3000-3005\n - 22:22\n - 8080:8080' 在应用快速修复后: 'ports:\n - \"3000\"\n - \"3000-3005\"\n - \"22:22\"\n - \"8080:8080\"' Inspection ID: ComposeUnquotedPorts", + "markdown": "报告 Docker Compose 文件中未加引号的端口映射。\n\n\n根据 [Compose 文件规范](https://docs.docker.com/compose/compose-file/compose-file-v3/#short-syntax-1),`HOST:CONTAINER` 格式的映射端口在使用小于 60 的容器端口时可能会导致错误的结果,因为 YAML 会将格式为 `xx:yy` 的数字解析为六十进制值。\n因此,我们建议始终将端口映射明确指定为字符串。\n\n**示例:**\n\n\n ports:\n - 3000\n - 3000-3005\n - 22:22\n - 8080:8080\n\n在应用快速修复后:\n\n\n ports:\n - \"3000\"\n - \"3000-3005\"\n - \"22:22\"\n - \"8080:8080\"\n\nInspection ID: ComposeUnquotedPorts" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "ComposeUnquotedPorts", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "Docker-compose", + "index": 38, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "DockerFileArgumentCount", + "shortDescription": { + "text": "实参数量错误" + }, + "fullDescription": { + "text": "报告 Dockerfile 命令的无效实参数量。 到达带有无效实参数量的指令后,Docker 构建将失败。 Inspection ID: DockerFileArgumentCount", + "markdown": "报告 Dockerfile 命令的无效实参数量。\n\n\n到达带有无效实参数量的指令后,Docker 构建将失败。\n\nInspection ID: DockerFileArgumentCount" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "DockerFileArgumentCount", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "Dockerfile", + "index": 5, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "AngularJS", + "version": "261.26222.73", + "rules": [ + { + "id": "AngularNgOptimizedImage", + "shortDescription": { + "text": "在 img 标记中使用 ngSrc 的问题" + }, + "fullDescription": { + "text": "Reports issues related to usage of 'ngSrc' (NgOptimizedDirective) on 'img' tags. Following issues are reported: 'img' tags, which use 'src' instead of 'ngSrc' lack of 'width' and 'height', or 'fill' attributes when 'ngSrc' is used 'width' or 'height', and 'fill' attributes being present on the same element when 'ngSrc' is used Inspection ID: AngularNgOptimizedImage", + "markdown": "Reports issues related to usage of `ngSrc` ([NgOptimizedDirective](https://angular.io/guide/image-directive)) on `img` tags.\n\n\nFollowing issues are reported:\n\n* `img` tags, which use `src` instead of `ngSrc`\n* lack of `width` and `height`, or `fill` attributes when `ngSrc` is used\n* `width` or `height`, and `fill` attributes being present on the same element when `ngSrc` is used\n\nInspection ID: AngularNgOptimizedImage" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "AngularNgOptimizedImage", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "codeQualityCategory": "Performance" + } + }, + "relationships": [ + { + "target": { + "id": "Angular", + "index": 8, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AngularIncorrectBlockUsage", + "shortDescription": { + "text": "Angular 块的错误用法" + }, + "fullDescription": { + "text": "Reports problems with Angular blocks. Inspection ID: AngularIncorrectBlockUsage", + "markdown": "Reports problems with Angular blocks.\n\nInspection ID: AngularIncorrectBlockUsage" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "AngularIncorrectBlockUsage", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "Angular", + "index": 8, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AngularInvalidTemplateReferenceVariable", + "shortDescription": { + "text": "模板引用变量未绑定或不明确" + }, + "fullDescription": { + "text": "Reports a template reference variable that is not assigned to a directive when using 'exportAs' or is assigned to multiple directives. Inspection ID: AngularInvalidTemplateReferenceVariable", + "markdown": "Reports a template reference variable that is not assigned to a directive when using `exportAs` or is assigned to multiple directives.\n\nInspection ID: AngularInvalidTemplateReferenceVariable" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "AngularInvalidTemplateReferenceVariable", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "Angular", + "index": 8, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AngularMisconfiguredDeferTrigger", + "shortDescription": { + "text": "@defer 触发器配置错误" + }, + "fullDescription": { + "text": "Reports misconfigured '@defer' block triggers that may lead to unexpected behavior. The inspection detects the following issues: The 'immediate' trigger makes additional triggers redundant Prefetch triggers have no effect when 'immediate' is used Prefetch timer delay that is greater than or equal to the main timer delay Prefetch triggers that match the main trigger and provide no benefit Example: '@defer (on immediate; on hover) {\n \n}\n\n@defer (on timer(1000); prefetch on timer(2000)) {\n \n}\n\n@defer (on interaction(btn); prefetch on interaction(btn)) {\n \n}' Inspection ID: AngularMisconfiguredDeferTrigger", + "markdown": "Reports misconfigured `@defer` block triggers that may lead to unexpected behavior.\n\n\nThe inspection detects the following issues:\n\n* The `immediate` trigger makes additional triggers redundant\n* Prefetch triggers have no effect when `immediate` is used\n* Prefetch timer delay that is greater than or equal to the main timer delay\n* Prefetch triggers that match the main trigger and provide no benefit\n\n\nExample:\n\n\n @defer (on immediate; on hover) {\n \n }\n\n @defer (on timer(1000); prefetch on timer(2000)) {\n \n }\n\n @defer (on interaction(btn); prefetch on interaction(btn)) {\n \n }\n\nInspection ID: AngularMisconfiguredDeferTrigger" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "AngularMisconfiguredDeferTrigger", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Unspecified" + } + }, + "relationships": [ + { + "target": { + "id": "Angular", + "index": 8, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AngularConstantReassignment", + "shortDescription": { + "text": "尝试分配给常量或只读变量" + }, + "fullDescription": { + "text": "Reports reassigning a value to a constant or a readonly variable. Inspection ID: AngularConstantReassignment", + "markdown": "Reports reassigning a value to a constant or a readonly variable.\n\nInspection ID: AngularConstantReassignment" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "AngularConstantReassignment", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Unspecified" + } + }, + "relationships": [ + { + "target": { + "id": "Angular", + "index": 8, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AngularMultipleStructuralDirectives", + "shortDescription": { + "text": "一个元素上有多个结构指令" + }, + "fullDescription": { + "text": "Reports multiple structural directives ('*ngIf', '*ngFor', etc.) on one element. Inspection ID: AngularMultipleStructuralDirectives", + "markdown": "Reports multiple structural directives (`*ngIf`, `*ngFor`, etc.) on one element.\n\nInspection ID: AngularMultipleStructuralDirectives" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "AngularMultipleStructuralDirectives", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "Angular", + "index": 8, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AngularUnresolvedPipe", + "shortDescription": { + "text": "未解析的管道" + }, + "fullDescription": { + "text": "Reports an unresolved pipe. Inspection ID: AngularUnresolvedPipe", + "markdown": "Reports an unresolved pipe.\n\nInspection ID: AngularUnresolvedPipe" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "AngularUnresolvedPipe", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "Angular", + "index": 8, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AngularCliAddDependency", + "shortDescription": { + "text": "Angular CLI 添加依赖项" + }, + "fullDescription": { + "text": "Suggests using the 'ng add' command to install the dependency. 'ng add' will use the package manager to download it and invoke a schematic which can update your project with configuration changes, add additional dependencies (e.g. polyfills), or scaffold package-specific initialization code. Inspection ID: AngularCliAddDependency", + "markdown": "Suggests using the `ng add` command to install the dependency.\n\n`ng add` will use the package manager to download it and invoke a schematic\nwhich can update your project with configuration changes, add additional dependencies (e.g. polyfills),\nor scaffold package-specific initialization code.\n\nInspection ID: AngularCliAddDependency" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "AngularCliAddDependency", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "Angular", + "index": 8, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AngularDeferBlockOnTrigger", + "shortDescription": { + "text": "@defer `on` 触发器的问题" + }, + "fullDescription": { + "text": "Reports issues with triggers in `on` parameters in `@defer` block. Inspection ID: AngularDeferBlockOnTrigger", + "markdown": "Reports issues with triggers in \\`on\\` parameters in \\`@defer\\` block.\n\nInspection ID: AngularDeferBlockOnTrigger" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "AngularDeferBlockOnTrigger", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "Angular", + "index": 8, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AngularInaccessibleSymbol", + "shortDescription": { + "text": "无法访问的组件成员或指令输入" + }, + "fullDescription": { + "text": "Reports access to invisible (private or protected) component member or directive input from an Angular template. Inspection ID: AngularInaccessibleSymbol", + "markdown": "Reports access to invisible (private or protected) component member or directive input from an Angular template.\n\nInspection ID: AngularInaccessibleSymbol" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "AngularInaccessibleSymbol", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "Angular", + "index": 8, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AngularMissingEventHandler", + "shortDescription": { + "text": "缺少事件处理程序" + }, + "fullDescription": { + "text": "Reports a missing event handler statement for an event binding. Inspection ID: AngularMissingEventHandler", + "markdown": "Reports a missing event handler statement for an event binding.\n\nInspection ID: AngularMissingEventHandler" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "AngularMissingEventHandler", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "Angular", + "index": 8, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AngularUnusedComponentImport", + "shortDescription": { + "text": "Angular 组件声明中未使用的 import" + }, + "fullDescription": { + "text": "Reports unused imports in Angular components. Inspection ID: AngularUnusedComponentImport", + "markdown": "Reports unused imports in Angular components.\n\nInspection ID: AngularUnusedComponentImport" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "AngularUnusedComponentImport", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "Angular", + "index": 8, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AngularUndefinedTag", + "shortDescription": { + "text": "未定义的标记" + }, + "fullDescription": { + "text": "Reports a tag defined by a component or directive out of the current scope. Inspection ID: AngularUndefinedTag", + "markdown": "Reports a tag defined by a component or directive out of the current scope.\n\nInspection ID: AngularUndefinedTag" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "AngularUndefinedTag", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "Angular", + "index": 8, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AngularUndefinedBinding", + "shortDescription": { + "text": "未定义的绑定" + }, + "fullDescription": { + "text": "Reports an undefined property, event, or structural directive bindings on elements. Inspection ID: AngularUndefinedBinding", + "markdown": "Reports an undefined property, event, or structural directive bindings on elements.\n\nInspection ID: AngularUndefinedBinding" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "AngularUndefinedBinding", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "Angular", + "index": 8, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AngularInvalidImportedOrDeclaredSymbol", + "shortDescription": { + "text": "导入或声明的符号无效" + }, + "fullDescription": { + "text": "Reports any symbol that is declared, imported or exported by an Angular module or standalone component that is not a module, component, directive, or pipe or can’t be used in the context of the property. Inspection ID: AngularInvalidImportedOrDeclaredSymbol", + "markdown": "Reports any symbol that is declared, imported or exported by an Angular module or standalone component that is not a module, component, directive, or pipe or can't be used in the context of the property.\n\nInspection ID: AngularInvalidImportedOrDeclaredSymbol" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "AngularInvalidImportedOrDeclaredSymbol", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "Angular", + "index": 8, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AngularIllegalForLoopTrackAccess", + "shortDescription": { + "text": "非法 @for 循环访问" + }, + "fullDescription": { + "text": "Reports illegal access to the template variable within '@for' loop 'track' expression. Inspection ID: AngularIllegalForLoopTrackAccess", + "markdown": "Reports illegal access to the template variable within `@for` loop `track` expression.\n\nInspection ID: AngularIllegalForLoopTrackAccess" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "AngularIllegalForLoopTrackAccess", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "Angular", + "index": 8, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AngularAmbiguousComponentTag", + "shortDescription": { + "text": "不明确的组件标记" + }, + "fullDescription": { + "text": "Reports a component that is matched on an embedded template element '' or multiple components matched on any other element. Inspection ID: AngularAmbiguousComponentTag", + "markdown": "Reports a component that is matched on an embedded template element `` or multiple components matched on any other element.\n\nInspection ID: AngularAmbiguousComponentTag" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "AngularAmbiguousComponentTag", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "Angular", + "index": 8, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AngularUndefinedModuleExport", + "shortDescription": { + "text": "未定义从 Angular 模块导出" + }, + "fullDescription": { + "text": "Reports an export of an undeclared or unimported component, directive, or pipes from an Angular module. Inspection ID: AngularUndefinedModuleExport", + "markdown": "Reports an export of an undeclared or unimported component, directive, or pipes from an Angular module.\n\nInspection ID: AngularUndefinedModuleExport" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "AngularUndefinedModuleExport", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "Angular", + "index": 8, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AngularInvalidI18nAttribute", + "shortDescription": { + "text": "i18n 特性无效" + }, + "fullDescription": { + "text": "Reports a problem with a 'i18n-*' attribute. Inspection ID: AngularInvalidI18nAttribute", + "markdown": "Reports a problem with a `i18n-*` attribute.\n\nInspection ID: AngularInvalidI18nAttribute" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "AngularInvalidI18nAttribute", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "Angular", + "index": 8, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AngularForBlockNonIterableVar", + "shortDescription": { + "text": "@for 块中的不可迭代类型" + }, + "fullDescription": { + "text": "Reports that the type of variable to iterate over does not have '[Symbol.iterator]()' method, which returns an iterator. Inspection ID: AngularForBlockNonIterableVar", + "markdown": "Reports that the type of variable to iterate over does not have `[Symbol.iterator]()` method, which returns an iterator.\n\nInspection ID: AngularForBlockNonIterableVar" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "AngularForBlockNonIterableVar", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "Angular", + "index": 8, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AngularUncalledSignalLengthPropertyAccess", + "shortDescription": { + "text": "正在访问未调用信号的 length 属性" + }, + "fullDescription": { + "text": "Reports access to the length property of an uncalled Angular signal, which is always 0, since signal calls do not accept any arguments. Such access is most likely a mistake and the signal should be first called instead. Inspection ID: AngularUncalledSignalLengthPropertyAccess", + "markdown": "Reports access to the length property of an uncalled Angular signal, which is always 0, since signal calls do not accept any arguments. Such access is most likely a mistake and the signal should be first called instead.\n\nInspection ID: AngularUncalledSignalLengthPropertyAccess" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "AngularUncalledSignalLengthPropertyAccess", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Unspecified" + } + }, + "relationships": [ + { + "target": { + "id": "Angular", + "index": 8, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AngularIncorrectTemplateDefinition", + "shortDescription": { + "text": "组件模板定义不正确" + }, + "fullDescription": { + "text": "Reports a component that doesn’t have an associated template or uses both 'template' and 'templateUrl' properties. Inspection ID: AngularIncorrectTemplateDefinition", + "markdown": "Reports a component that doesn't have an associated template or uses both `template` and `templateUrl` properties.\n\nInspection ID: AngularIncorrectTemplateDefinition" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "AngularIncorrectTemplateDefinition", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "Angular", + "index": 8, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AngularIncorrectLetUsage", + "shortDescription": { + "text": "@let 声明的错误用法" + }, + "fullDescription": { + "text": "Reports problems with @let declaration usages. Inspection ID: AngularIncorrectLetUsage", + "markdown": "Reports problems with @let declaration usages.\n\nInspection ID: AngularIncorrectLetUsage" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "AngularIncorrectLetUsage", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "Angular", + "index": 8, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AngularNonStandaloneComponentImports", + "shortDescription": { + "text": "非独立组件中的无效 import 用法" + }, + "fullDescription": { + "text": "Reports usages of imports property in non-standalone component decorators. Imports can be used only in standalone components. Inspection ID: AngularNonStandaloneComponentImports", + "markdown": "Reports usages of imports property in non-standalone component decorators. Imports can be used only in standalone components.\n\nInspection ID: AngularNonStandaloneComponentImports" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "AngularNonStandaloneComponentImports", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "Angular", + "index": 8, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AngularMissingOrInvalidDeclarationInModule", + "shortDescription": { + "text": "模块中的组件、指令或管道声明缺失或无效" + }, + "fullDescription": { + "text": "Reports a non-standalone Angular component, directive, or pipe that is not declared in any module or is declared in multiple modules. Inspection ID: AngularMissingOrInvalidDeclarationInModule", + "markdown": "Reports a non-standalone Angular component, directive, or pipe that is not declared in any module or is declared in multiple modules.\n\nInspection ID: AngularMissingOrInvalidDeclarationInModule" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "AngularMissingOrInvalidDeclarationInModule", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "Angular", + "index": 8, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AngularInvalidAnimationTriggerAssignment", + "shortDescription": { + "text": "动画触发器赋值无效" + }, + "fullDescription": { + "text": "Reports an invalid assignment of an animation trigger. To attach an animation to an element, use '[@triggerName]=\"expression\"' or an attribute without a value '@triggerName'. Inspection ID: AngularInvalidAnimationTriggerAssignment", + "markdown": "Reports an invalid assignment of an animation trigger. To attach an animation to an element, use `[@triggerName]=\"expression\"` or an attribute without a value `@triggerName`.\n\nInspection ID: AngularInvalidAnimationTriggerAssignment" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "AngularInvalidAnimationTriggerAssignment", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "Angular", + "index": 8, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AngularInvalidEntryComponent", + "shortDescription": { + "text": "入口组件无效" + }, + "fullDescription": { + "text": "Reports an invalid Angular component specified in the module’s 'bootstrap' or 'entryComponents' property. Inspection ID: AngularInvalidEntryComponent", + "markdown": "Reports an invalid Angular component specified in the module's `bootstrap` or `entryComponents` property.\n\nInspection ID: AngularInvalidEntryComponent" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "AngularInvalidEntryComponent", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "Angular", + "index": 8, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AngularRecursiveModuleImportExport", + "shortDescription": { + "text": "递归导入或导出 Angular 模块或独立组件" + }, + "fullDescription": { + "text": "Reports a cyclic dependency between Angular modules or standalone components. Inspection ID: AngularRecursiveModuleImportExport", + "markdown": "Reports a cyclic dependency between Angular modules or standalone components.\n\nInspection ID: AngularRecursiveModuleImportExport" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "AngularRecursiveModuleImportExport", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "Angular", + "index": 8, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AngularInvalidSelector", + "shortDescription": { + "text": "选择器缺失或无效" + }, + "fullDescription": { + "text": "Reports an invalid 'selector' property of a component or directive. Inspection ID: AngularInvalidSelector", + "markdown": "Reports an invalid `selector` property of a component or directive.\n\nInspection ID: AngularInvalidSelector" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "AngularInvalidSelector", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "Angular", + "index": 8, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AngularBindingTypeMismatch", + "shortDescription": { + "text": "无效的绑定类型" + }, + "fullDescription": { + "text": "Reports a mismatch between actual and expected directive binding type. Inspection ID: AngularBindingTypeMismatch", + "markdown": "Reports a mismatch between actual and expected directive binding type.\n\nInspection ID: AngularBindingTypeMismatch" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "AngularBindingTypeMismatch", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "Angular", + "index": 8, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AngularNonEmptyNgContent", + "shortDescription": { + "text": "内容位于 标记中" + }, + "fullDescription": { + "text": "Reports a text or tag occurrence inside a '' tag used for content projection. Inspection ID: AngularNonEmptyNgContent", + "markdown": "Reports a text or tag occurrence inside a `` tag used for content projection.\n\nInspection ID: AngularNonEmptyNgContent" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "AngularNonEmptyNgContent", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "Angular", + "index": 8, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AngularUnsupportedSyntax", + "shortDescription": { + "text": "不支持的 Angular 表达式语法" + }, + "fullDescription": { + "text": "Reports problems with Angular expression syntax, which is not supported in an older version of Angular. Inspection ID: AngularUnsupportedSyntax", + "markdown": "Reports problems with Angular expression syntax, which is not supported in an older version of Angular.\n\nInspection ID: AngularUnsupportedSyntax" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "AngularUnsupportedSyntax", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "Angular", + "index": 8, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AngularMissingRequiredDirectiveInputBinding", + "shortDescription": { + "text": "缺少必需的指令输入" + }, + "fullDescription": { + "text": "Reports a missing binding for a required directive input. Inspection ID: AngularMissingRequiredDirectiveInputBinding", + "markdown": "Reports a missing binding for a required directive input.\n\nInspection ID: AngularMissingRequiredDirectiveInputBinding" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "AngularMissingRequiredDirectiveInputBinding", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "Angular", + "index": 8, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AngularInsecureBindingToEvent", + "shortDescription": { + "text": "绑定到事件不安全" + }, + "fullDescription": { + "text": "Reports a binding to an event property or attribute, for example, '[onclick]' or '[attr.onclick]' instead of '(click)'. Inspection ID: AngularInsecureBindingToEvent", + "markdown": "Reports a binding to an event property or attribute, for example, `[onclick]` or `[attr.onclick]` instead of `(click)`.\n\nInspection ID: AngularInsecureBindingToEvent" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "AngularInsecureBindingToEvent", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Security" + } + }, + "relationships": [ + { + "target": { + "id": "Angular", + "index": 8, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "org.intellij.plugins.postcss", + "version": "261.26222.73", + "rules": [ + { + "id": "PostCssCustomSelector", + "shortDescription": { + "text": "自定义选择器无效" + }, + "fullDescription": { + "text": "报告 PostCSS 自定义选择器中的语法错误。 示例: '@custom-selector :--heading h1, h2, h3;' Inspection ID: PostCssCustomSelector", + "markdown": "报告 [PostCSS 自定义选择器](https://github.com/postcss/postcss-custom-selectors)中的语法错误。\n\n示例:\n\n\n @custom-selector :--heading h1, h2, h3;\n\nInspection ID: PostCssCustomSelector" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "PostCssCustomSelector", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "PostCSS", + "index": 9, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PostCssUnresolvedModuleValueReference", + "shortDescription": { + "text": "未解析的 CSS 模块值" + }, + "fullDescription": { + "text": "报告对 CSS Module Value('@value' 声明)的未解析引用。 示例: '@value foo from unknown;' Inspection ID: PostCssUnresolvedModuleValueReference", + "markdown": "报告对 [CSS Module Value](https://github.com/css-modules/postcss-modules-values)(`@value` 声明)的未解析引用。\n\n示例:\n\n\n @value foo from unknown;\n\nInspection ID: PostCssUnresolvedModuleValueReference" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "PostCssUnresolvedModuleValueReference", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "PostCSS", + "index": 9, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PostCssNesting", + "shortDescription": { + "text": "无效的嵌套规则" + }, + "fullDescription": { + "text": "报告语法不符合 PostCSS Nested 或 PostCSS Nesting 规范的嵌套样式规则。 示例: '.phone {\n &_title {}\n}' Inspection ID: PostCssNesting", + "markdown": "报告语法不符合 [PostCSS Nested](https://github.com/postcss/postcss-nested) 或 [PostCSS Nesting](https://github.com/csstools/postcss-nesting) 规范的嵌套样式规则。\n\n示例:\n\n\n .phone {\n &_title {}\n }\n\nInspection ID: PostCssNesting" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "PostCssNesting", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "PostCSS", + "index": 9, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PostCssCustomMedia", + "shortDescription": { + "text": "自定义媒体无效" + }, + "fullDescription": { + "text": "报告 PostCSS 自定义媒体查询中的语法错误。 示例: '@custom-media --small-viewport (max-width: 30em);' Inspection ID: PostCssCustomMedia", + "markdown": "报告 [PostCSS 自定义媒体](https://github.com/postcss/postcss-custom-media)查询中的语法错误。\n\n示例:\n\n\n @custom-media --small-viewport (max-width: 30em);\n\nInspection ID: PostCssCustomMedia" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "PostCssCustomMedia", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "PostCSS", + "index": 9, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PostCssMediaRange", + "shortDescription": { + "text": "媒体查询范围无效" + }, + "fullDescription": { + "text": "检查范围上下文语法,该语法可替代性地用于 'range' 类型的媒体特性。 示例: '@media screen and (500px <= width <= 1200px) {}' Inspection ID: PostCssMediaRange", + "markdown": "检查[范围上下文](https://github.com/postcss/postcss-media-minmax)语法,该语法可替代性地用于 'range' 类型的媒体特性。\n\n示例:\n\n\n @media screen and (500px <= width <= 1200px) {}\n\nInspection ID: PostCssMediaRange" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "PostCssMediaRange", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "PostCSS", + "index": 9, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "dev.blachut.svelte.lang", + "version": "261.26222.22", + "rules": [ + { + "id": "SvelteEmptyGenerics", + "shortDescription": { + "text": "空的 generics 特性" + }, + "fullDescription": { + "text": "Reports empty or whitespace-only 'generics' attributes on script tags. Example of invalid code: '' Example of valid code: '' Inspection ID: SvelteEmptyGenerics", + "markdown": "Reports empty or whitespace-only `generics` attributes on script tags.\n\nExample of invalid code:\n\n \n\nExample of valid code:\n\n \n\nInspection ID: SvelteEmptyGenerics" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "SvelteEmptyGenerics", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "codeQualityCategory": "Unspecified" + } + }, + "relationships": [ + { + "target": { + "id": "Svelte", + "index": 10, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SvelteGenericsOnInstanceScriptOnly", + "shortDescription": { + "text": "仅允许在实例脚本中使用泛型" + }, + "fullDescription": { + "text": "Reports 'generics' attributes on module scripts ('context=\"module\"'). The 'generics' attribute is only allowed on instance scripts, not module scripts. Example of invalid code: '' Example of valid code: '' Inspection ID: SvelteGenericsOnInstanceScriptOnly", + "markdown": "Reports `generics` attributes on module scripts (`context=\"module\"`).\n\nThe `generics` attribute is only allowed on instance scripts, not module scripts.\n\nExample of invalid code:\n\n \n\nExample of valid code:\n\n \n\nInspection ID: SvelteGenericsOnInstanceScriptOnly" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "SvelteGenericsOnInstanceScriptOnly", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Unspecified" + } + }, + "relationships": [ + { + "target": { + "id": "Svelte", + "index": 10, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SvelteGenericsRequiresTypeScript", + "shortDescription": { + "text": "Generics 特性需要 TypeScript" + }, + "fullDescription": { + "text": "Reports 'generics' attributes on script tags without TypeScript ('lang=\"ts\"'). The 'generics' attribute requires TypeScript to be enabled on the script tag. Example of invalid code: '' Example of valid code: '' Inspection ID: SvelteGenericsRequiresTypeScript", + "markdown": "Reports `generics` attributes on script tags without TypeScript (`lang=\"ts\"`).\n\nThe `generics` attribute requires TypeScript to be enabled on the script tag.\n\nExample of invalid code:\n\n \n\nExample of valid code:\n\n \n\nInspection ID: SvelteGenericsRequiresTypeScript" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "SvelteGenericsRequiresTypeScript", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Unspecified" + } + }, + "relationships": [ + { + "target": { + "id": "Svelte", + "index": 10, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SvelteUnresolvedComponent", + "shortDescription": { + "text": "未解析的 Svelte 组件" + }, + "fullDescription": { + "text": "此检查会检查未解析的 Svelte 组件 Inspection ID: SvelteUnresolvedComponent", + "markdown": "此检查会检查未解析的 Svelte 组件\n\nInspection ID: SvelteUnresolvedComponent" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "SvelteUnresolvedComponent", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "Svelte", + "index": 10, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "XPathView", + "version": "261.26222.73", + "rules": [ + { + "id": "IndexZeroUsage", + "shortDescription": { + "text": "索引为 0 的 XPath 谓词" + }, + "fullDescription": { + "text": "报告 '0' 在谓词索引中或者与函数 'position()' 的 比较中的用法。 此类用法几乎在所有情况下都是 bug,因为在 XPath 中,索引从 '1' 而不是 '0' 开始。 示例: '//someelement[position() = 0]' or '//something[0]' Inspection ID: IndexZeroUsage", + "markdown": "报告 `0` 在谓词索引中或者与函数 `position()` 的 比较中的用法。 此类用法几乎在所有情况下都是 bug,因为在 XPath 中,索引从 `1` 而*不是* `0` 开始。\n\n**示例:**\n\n\n //someelement[position() = 0] or //something[0]\n\nInspection ID: IndexZeroUsage" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "IndexZeroUsage", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "XPath", + "index": 11, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CheckNodeTest", + "shortDescription": { + "text": "未知的元素或特性名称" + }, + "fullDescription": { + "text": "报告在 XPath 表达式中使用但在关联的 XML 文件中缺少并且也没有在引用的架构中定义的元素或特性的名称。 此类名称通常是拼写错误所致,否则可能只会在运行时被发现。 示例: '' 如果 'h' 被绑定到 XHTML 命名空间,检查会将 'match' 表达式的这一部分报告为未知元素名称,因为该元素的正确名称是 \"textarea\"。 Inspection ID: CheckNodeTest", + "markdown": "报告在 XPath 表达式中使用但在关联的 XML 文件中缺少并且也没有在引用的架构中定义的元素或特性的名称。 此类名称通常是拼写错误所致,否则可能只会在运行时被发现。\n\n**示例:**\n\n\n \n\n\n如果 `h` 被绑定到 XHTML 命名空间,检查会将 `match` 表达式的这一部分报告为未知元素名称,因为该元素的正确名称是 \"textarea\"。\n\nInspection ID: CheckNodeTest" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "CheckNodeTest", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "XPath", + "index": 11, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "XsltUnusedDeclaration", + "shortDescription": { + "text": "未使用的变量或形参" + }, + "fullDescription": { + "text": "报告从未被使用的局部变量和形参。 Inspection ID: XsltUnusedDeclaration", + "markdown": "报告从未被使用的局部变量和形参。\n\nInspection ID: XsltUnusedDeclaration" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "XsltUnusedDeclaration", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "XSLT", + "index": 54, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "XsltDeclarations", + "shortDescription": { + "text": "不正确的声明" + }, + "fullDescription": { + "text": "报告 XSLT 变量、形参和命名模板中的重复声明和非法标识符: Inspection ID: XsltDeclarations", + "markdown": "报告 XSLT 变量、形参和命名模板中的重复声明和非法标识符:\n\nInspection ID: XsltDeclarations" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "XsltDeclarations", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "XSLT", + "index": 54, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "XsltVariableShadowing", + "shortDescription": { + "text": "隐藏的变量" + }, + "fullDescription": { + "text": "报告隐藏的 XSLT 变量。 Inspection ID: XsltVariableShadowing", + "markdown": "报告隐藏的 XSLT 变量。\n\nInspection ID: XsltVariableShadowing" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "XsltVariableShadowing", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "XSLT", + "index": 54, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HardwiredNamespacePrefix", + "shortDescription": { + "text": "硬编码命名空间前缀" + }, + "fullDescription": { + "text": "报告 'name()' 函数与包含冒号 (':') 的字符串的比较。 此类用法通常表明在比较中存在硬编码的命名空间前缀。 因此,针对为相同命名空间使用另一个前缀的 XML 运行时,代码将中断。 示例: '...' Inspection ID: HardwiredNamespacePrefix", + "markdown": "报告 `name()` 函数与包含冒号 (`:`) 的字符串的比较。 此类用法通常表明在比较中存在硬编码的命名空间前缀。 因此,针对为相同命名空间使用另一个前缀的 XML 运行时,代码将中断。\n\n**示例:**\n\n\n ...\n\nInspection ID: HardwiredNamespacePrefix" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "HardwiredNamespacePrefix", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "XPath", + "index": 11, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "RedundantTypeConversion", + "shortDescription": { + "text": "冗余类型转换" + }, + "fullDescription": { + "text": "报告不必要的类型转换。 当 'string()'、'number()' 或 'boolean()' 函数的实参类型已经与函数的返回类型相同时,或者如果 预期表达式类型为 'any',无需类型转换。 建议移除不必要的转换。 Inspection ID: RedundantTypeConversion", + "markdown": "报告不必要的类型转换。 当 `string()`、`number()` 或 `boolean()` 函数的实参类型已经与函数的返回类型相同时,或者如果 预期表达式类型为 `any`,无需类型转换。 建议移除不必要的转换。\n\nInspection ID: RedundantTypeConversion" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "RedundantTypeConversion", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "XPath", + "index": 11, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "XsltTemplateInvocation", + "shortDescription": { + "text": "不正确的模板调用" + }, + "fullDescription": { + "text": "报告缺少实参、传递未被声明的实参,以及在命名 XSLT 模板调用中多次传递形参的实参。 使用默认值声明的形参是可选形参,不会被报告为缺失。 Inspection ID: XsltTemplateInvocation", + "markdown": "报告缺少实参、传递未被声明的实参,以及在命名 XSLT 模板调用中多次传递形参的实参。\n\n\n使用默认值声明的形参是可选形参,不会被报告为缺失。\n\nInspection ID: XsltTemplateInvocation" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "XsltTemplateInvocation", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "XSLT", + "index": 54, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ImplicitTypeConversion", + "shortDescription": { + "text": "隐式类型转换" + }, + "fullDescription": { + "text": "报告在预定义的 XPath 类型 'STRING'、'NUMBER'、'BOOLEAN' 和 'NODESET' 之间进行的隐式转换。 有助于编写类型表现更明确的XSLT脚本,且避免难以捉摸的错误。 示例: '' 不同于 '' 第一个测试检查元素 “ foo” 是否存在('count(foo) > 0)',而第二个测试仅当元素包含文本时 ('string-length(foo) > 0'),才会为 “true”。 建议使 类型转换更加明确。 使用以下选项配置检查: 启用或禁用某些类型之间的隐式转换 总是报告没有导致实际预期类型的显式转换,例如, '' 忽略使用 'string()' 函数作为编写 'string-length() > 0' 的快捷方式而造成的从 'NODESET' 到 'BOOLEAN' 的转换。 Inspection ID: ImplicitTypeConversion", + "markdown": "报告在预定义的 XPath 类型 `STRING`、`NUMBER`、`BOOLEAN` 和 `NODESET` 之间进行的隐式转换。 有助于编写类型表现更明确的XSLT脚本,且避免难以捉摸的错误。\n\n**示例:**\n\n\n \n\n不同于\n\n\n \n\n\n第一个测试检查元素 \" foo\" 是否存在(`count(foo) > 0)`,而第二个测试仅当元素包含文本时 (`string-length(foo) > 0`),才会为 \"true\"。 建议使\n类型转换更加明确。\n\n\n使用以下选项配置检查:\n\n* 启用或禁用某些类型之间的隐式转换\n* 总是报告没有导致实际预期类型的显式转换,例如, ``\n* 忽略使用 `string()` 函数作为编写 `string-length() > 0` 的快捷方式而造成的从 `NODESET` 到 `BOOLEAN` 的转换。\n\nInspection ID: ImplicitTypeConversion" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ImplicitTypeConversion", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "XPath", + "index": 11, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "org.jetbrains.plugins.sass", + "version": "261.26222.73", + "rules": [ + { + "id": "SassScssUnresolvedMixin", + "shortDescription": { + "text": "未解析的 mixin" + }, + "fullDescription": { + "text": "报告未解析的 Sass/SCSS mixin 引用。 示例: '* {\n @include unknown-mixin;\n}' Inspection ID: SassScssUnresolvedMixin", + "markdown": "报告未解析的 [Sass/SCSS mixin](https://sass-lang.com/documentation/at-rules/mixin) 引用。\n\n**示例:**\n\n\n * {\n @include unknown-mixin;\n }\n\nInspection ID: SassScssUnresolvedMixin" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SassScssUnresolvedMixin", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "Sass_SCSS", + "index": 12, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SassScssResolvedByNameOnly", + "shortDescription": { + "text": "缺少 import" + }, + "fullDescription": { + "text": "报告对另一个文件(但该文件未在当前文件中显式导入)中声明的变量、mixin 或函数的引用。 示例: '* {\n margin: $var-in-other-file;\n}' Inspection ID: SassScssResolvedByNameOnly", + "markdown": "报告对另一个文件(但该文件未在当前文件中显式[导入](https://sass-lang.com/documentation/at-rules/import))中声明的变量、mixin 或函数的引用。\n\n**示例:**\n\n\n * {\n margin: $var-in-other-file;\n }\n\nInspection ID: SassScssResolvedByNameOnly" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "SassScssResolvedByNameOnly", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "Sass_SCSS", + "index": 12, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SassScssUnresolvedPlaceholderSelector", + "shortDescription": { + "text": "未解析的占位符选择器" + }, + "fullDescription": { + "text": "报告未解析的 Sass/SCSS 占位符选择器引用。 示例: '* {\n @extend %unknown-placeholder-selector;\n}' Inspection ID: SassScssUnresolvedPlaceholderSelector", + "markdown": "报告未解析的 [Sass/SCSS 占位符选择器](https://sass-lang.com/documentation/variables)引用。\n\n**示例:**\n\n\n * {\n @extend %unknown-placeholder-selector;\n }\n\nInspection ID: SassScssUnresolvedPlaceholderSelector" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SassScssUnresolvedPlaceholderSelector", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "Sass_SCSS", + "index": 12, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SassScssUnresolvedVariable", + "shortDescription": { + "text": "未解析的变量" + }, + "fullDescription": { + "text": "报告未解析的 Sass/SCSS 变量引用。 示例: '* {\n margin: $unknown-var;\n}' Inspection ID: SassScssUnresolvedVariable", + "markdown": "报告未解析的 [Sass/SCSS 变量](https://sass-lang.com/documentation/variables)引用。\n\n**示例:**\n\n\n * {\n margin: $unknown-var;\n }\n\nInspection ID: SassScssUnresolvedVariable" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SassScssUnresolvedVariable", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "Sass_SCSS", + "index": 12, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "com.jetbrains.sh", + "version": "261.26222.73", + "rules": [ + { + "id": "ShellCheck", + "shortDescription": { + "text": "ShellCheck" + }, + "fullDescription": { + "text": "报告由集成的 ShellCheck 静态分析工具检测到的 shell 脚本错误。 Inspection ID: ShellCheck", + "markdown": "报告由集成的 [ShellCheck](https://github.com/koalaman/shellcheck) 静态分析工具检测到的 shell 脚本错误。\n\nInspection ID: ShellCheck" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "ShellCheck", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Unspecified" + } + }, + "relationships": [ + { + "target": { + "id": "Shell 脚本", + "index": 13, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "Karma", + "version": "261.26222.73", + "rules": [ + { + "id": "KarmaConfigFile", + "shortDescription": { + "text": "无效的 Karma 配置文件" + }, + "fullDescription": { + "text": "报告 Karma 配置文件 (例如 'karma.conf.js') 的文件路径 ('basePath'、'files') 中的潜在错误。 Inspection ID: KarmaConfigFile", + "markdown": "报告 Karma 配置文件 (例如 `karma.conf.js`) 的文件路径 ('basePath'、'files') 中的潜在错误。\n\nInspection ID: KarmaConfigFile" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "KarmaConfigFile", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/单元测试", + "index": 14, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "tanvd.grazi", + "version": "261.26222.73", + "rules": [ + { + "id": "GrazieStyle", + "shortDescription": { + "text": "样式" + }, + "fullDescription": { + "text": "查看在以下位置定义的编写样式: 用于此项目或其特定子目录的 Grazie 规则文件(例如,英语的 '.grazie.en.yaml')。 要创建此类文件,请在项目的任何目录(例如,根)上调用新建菜单。 编辑器 | 自然语言 | 规则设置中的样式规则 此检查仅通过代码 | 分析代码 | 按名称运行检查… 或离线分析返回结果。 编辑器对样式问题的高亮显示独立于此检查的设置进行。 Inspection ID: GrazieStyle", + "markdown": "查看在以下位置定义的编写样式:\n\n* 用于此项目或其特定子目录的 Grazie 规则文件(例如,英语的 `.grazie.en.yaml`)。 要创建此类文件,请在项目的任何目录(例如,根)上调用**新建**菜单。\n* *编辑器 \\| 自然语言 \\| 规则* 设置中的*样式*规则\n\n此检查仅通过**代码 \\| 分析代码 \\| 按名称运行检查...** 或离线分析返回结果。 编辑器对样式问题的高亮显示独立于此检查的设置进行。\n\nInspection ID: GrazieStyle" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "GrazieStyle", + "ideaSeverity": "STYLE_SUGGESTION", + "qodanaSeverity": "Info", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "校对", + "index": 15, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SpellCheckingInspection", + "shortDescription": { + "text": "拼写" + }, + "fullDescription": { + "text": "报告代码、注释和字面量中的拼写错误并一键修正。 Inspection ID: SpellCheckingInspection", + "markdown": "报告代码、注释和字面量中的拼写错误并一键修正。\n\nInspection ID: SpellCheckingInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "SpellCheckingInspection", + "ideaSeverity": "TYPO", + "qodanaSeverity": "Low", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "校对", + "index": 15, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "LanguageDetectionInspection", + "shortDescription": { + "text": "自然语言检测" + }, + "fullDescription": { + "text": "检测自然语言并建议启用相应的语法和拼写检查。 Inspection ID: LanguageDetectionInspection", + "markdown": "检测自然语言并建议启用相应的语法和拼写检查。\n\nInspection ID: LanguageDetectionInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "LanguageDetectionInspection", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "codeQualityCategory": "Unspecified" + } + }, + "relationships": [ + { + "target": { + "id": "校对", + "index": 15, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "GrazieInspection", + "shortDescription": { + "text": "语法" + }, + "fullDescription": { + "text": "报告文本中的语法错误。 您可以在 设置 | 编辑器 | 自然语言 | 语法和样式中配置检查。 Inspection ID: GrazieInspection", + "markdown": "报告文本中的语法错误。 您可以在 [设置 \\| 编辑器 \\| 自然语言 \\| 语法和样式](settings://reference.settingsdialog.project.grazie)中配置检查。\n\nInspection ID: GrazieInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "GrazieInspection", + "ideaSeverity": "GRAMMAR_ERROR", + "qodanaSeverity": "Info", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "校对", + "index": 15, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "GrazieInspectionRunner", + "shortDescription": { + "text": "语法" + }, + "fullDescription": { + "text": "在此处编写您的描述。 使用英语时,描述以第三人称单数动词开头,如 \"reports\"、\"detects\" 和 \"highlights\";使用中文时,描述以动词开头,如“报告”、“检测”和“高亮显示”。 在第一句话中,简要说明此检查能帮助您检测什么。 请确保句子不要太长或太复杂。 第一句话必须放在一个专门的段落中,与正文的其余部分分开。 这将使描述更易于阅读。 请确保描述不是对检查标题的简单重复。 有关详情,请参阅 https://plugins.jetbrains.com/docs/intellij/inspections.html#descriptions。 嵌入代码段: '// 根据检查注册 'language' 特性自动高亮显示' 此注释后的文本将仅显示在检查的设置中。 要直接从描述中打开相关设置,请添加一个带有 `settings://$` 的链接,可以选择在后面加上 `?$` 来预选 UI 元素。 Inspection ID: GrazieInspectionRunner", + "markdown": "在此处编写您的描述。 使用英语时,描述以第三人称单数动词开头,如 \"reports\"、\"detects\" 和 \"highlights\";使用中文时,描述以动词开头,如\"报告\"、\"检测\"和\"高亮显示\"。 在第一句话中,简要说明此检查能帮助您检测什么。 请确保句子不要太长或太复杂。\n\n\n第一句话必须放在一个专门的段落中,与正文的其余部分分开。 这将使描述更易于阅读。\n请确保描述不是对检查标题的简单重复。\n\n\n有关详情,请参阅 https://plugins.jetbrains.com/docs/intellij/inspections.html#descriptions。\n\n\n嵌入代码段:\n\n\n // 根据检查注册 'language' 特性自动高亮显示\n\n此注释后的文本将仅显示在检查的设置中。\n\n要直接从描述中打开相关设置,请添加一个带有 \\`settings://$\\` 的链接,可以选择在后面加上 \\`?$\\` 来预选 UI 元素。\n\nInspection ID: GrazieInspectionRunner" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "GrazieInspectionRunner", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Unspecified" + } + }, + "relationships": [ + { + "target": { + "id": "校对", + "index": 15, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "com.intellij.modules.json", + "version": "261.26222.73", + "rules": [ + { + "id": "JsonSchemaDeprecation", + "shortDescription": { + "text": "弃用的 JSON 属性" + }, + "fullDescription": { + "text": "报告 JSON 文件中弃用的属性。 请注意,JSON 架构规范中尚未定义弃用机制, 并且该检查使用了非标准的扩展 'deprecationMessage'。 Inspection ID: JsonSchemaDeprecation", + "markdown": "报告 JSON 文件中弃用的属性。 \n请注意,JSON 架构规范中尚未定义弃用机制, 并且该检查使用了非标准的扩展 'deprecationMessage'。\n\nInspection ID: JsonSchemaDeprecation" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "JsonSchemaDeprecation", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "JSON 和 JSON5", + "index": 16, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JsonSchemaRefReference", + "shortDescription": { + "text": "未解析的 '$ref' 和 '$schema' 引用" + }, + "fullDescription": { + "text": "报告 JSON 架构中未解析的 '$ref' 或 '$schema' 路径。 Inspection ID: JsonSchemaRefReference", + "markdown": "报告 JSON 架构中未解析的 `$ref` 或 `$schema` 路径。 \n\nInspection ID: JsonSchemaRefReference" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JsonSchemaRefReference", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "JSON 和 JSON5", + "index": 16, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "Json5StandardCompliance", + "shortDescription": { + "text": "符合 JSON5 标准" + }, + "fullDescription": { + "text": "报告 JSON5 文件中语言规范不一致的情况。 Inspection ID: Json5StandardCompliance", + "markdown": "报告 JSON5 文件中[语言规范](http://json5.org)不一致的情况。\n\nInspection ID: Json5StandardCompliance" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "Json5StandardCompliance", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "JSON 和 JSON5", + "index": 16, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JsonDuplicatePropertyKeys", + "shortDescription": { + "text": "对象字面量中的重复键" + }, + "fullDescription": { + "text": "报告对象字面量中的重复键。 Inspection ID: JsonDuplicatePropertyKeys", + "markdown": "报告对象字面量中的重复键。\n\nInspection ID: JsonDuplicatePropertyKeys" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JsonDuplicatePropertyKeys", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JSON 和 JSON5", + "index": 16, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JsonSchemaCompliance", + "shortDescription": { + "text": "符合 JSON 架构" + }, + "fullDescription": { + "text": "报告 JSON 文件与分配给它的 JSON 模式之间的不一致。 Inspection ID: JsonSchemaCompliance", + "markdown": "报告 JSON 文件与分配给它的 [JSON 模式](https://json-schema.org)之间的不一致。 \n\nInspection ID: JsonSchemaCompliance" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JsonSchemaCompliance", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JSON 和 JSON5", + "index": 16, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JsonStandardCompliance", + "shortDescription": { + "text": "符合 JSON 标准" + }, + "fullDescription": { + "text": "报告 JSON 文件与语言规范的以下差异: 行或块注释(可配置)。 多个顶层值(用于 JSON Lines 文件,可针对其他文件配置)。 对象或数组中的尾随逗号(可配置)。 用单引号引用的字符串。 属性键不是由双引号引用的字符串。 用 NaN 或正无穷大/负无穷大数值作为浮点字面量(可配置)。 Inspection ID: JsonStandardCompliance", + "markdown": "报告 JSON 文件与[语言规范](https://tools.ietf.org/html/rfc7159)的以下差异:\n\n* 行或块注释(可配置)。\n* 多个顶层值(用于 JSON Lines 文件,可针对其他文件配置)。\n* 对象或数组中的尾随逗号(可配置)。\n* 用单引号引用的字符串。\n* 属性键不是由双引号引用的字符串。\n* 用 NaN 或正无穷大/负无穷大数值作为浮点字面量(可配置)。\n\nInspection ID: JsonStandardCompliance" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "JsonStandardCompliance", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "JSON 和 JSON5", + "index": 16, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "com.intellij.database", + "version": "261.26222.73", + "rules": [ + { + "id": "MongoJSSideEffectsInspection", + "shortDescription": { + "text": "具有副作用的语句" + }, + "fullDescription": { + "text": "报告在数据源处于只读模式时可能导致副作用的语句。 有关启用只读模式的详细信息,请参阅 IDE 文档中的“为连接启用只读模式”。 禁用只读模式快速修复会关闭相应数据源的只读模式。 示例: 'db.my_collection.insertOne()' Inspection ID: MongoJSSideEffectsInspection", + "markdown": "报告在数据源处于只读模式时可能导致副作用的语句。\n\n有关启用只读模式的详细信息,请参阅 [IDE 文档中的\"为连接启用只读模式\"](https://www.jetbrains.com/help/datagrip/configuring-database-connections.html#enable-read-only-mode-for-a-connection)。\n\n**禁用只读模式**快速修复会关闭相应数据源的只读模式。\n\n示例:\n\n\n db.my_collection.insertOne()\n\nInspection ID: MongoJSSideEffectsInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "MongoJSSideEffects", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "MongoJS", + "index": 17, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MysqlLoadDataPathInspection", + "shortDescription": { + "text": "LOAD 语句路径" + }, + "fullDescription": { + "text": "报告 LOAD 语句中以波浪符号开头的路径。 示例 (MySQL): 'CREATE TABLE table_name (id int);\nLOAD DATA LOCAL INFILE '~/Documents/some_file.txt'\nINTO TABLE table_name FIELDS TERMINATED BY ',' LINES TERMINATED BY '\\n'\nIGNORE 1 LINES;' 使用文件的完整路径代替波浪符号。 Inspection ID: MysqlLoadDataPathInspection", + "markdown": "报告 LOAD 语句中以波浪符号开头的路径。\n\n示例 (MySQL):\n\n CREATE TABLE table_name (id int);\n LOAD DATA LOCAL INFILE '~/Documents/some_file.txt'\n INTO TABLE table_name FIELDS TERMINATED BY ',' LINES TERMINATED BY '\\n'\n IGNORE 1 LINES;\n\n使用文件的完整路径代替波浪符号。\n\nInspection ID: MysqlLoadDataPathInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "MysqlLoadDataPath", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "MySQL", + "index": 20, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MongoJSExtSideEffectsInspection", + "shortDescription": { + "text": "具有副作用的语句" + }, + "fullDescription": { + "text": "报告在数据源处于只读模式时可能导致副作用的语句。 该快速修复会关闭相应数据源的只读模式。 示例: 'db.my_collection.insertOne()' Inspection ID: MongoJSExtSideEffectsInspection", + "markdown": "报告在数据源处于只读模式时可能导致副作用的语句。\n\n该快速修复会关闭相应数据源的只读模式。\n\n示例:\n\n\n db.my_collection.insertOne()\n\nInspection ID: MongoJSExtSideEffectsInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "MongoJSSideEffects", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "MongoJS", + "index": 17, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MysqlSpaceAfterFunctionNameInspection", + "shortDescription": { + "text": "函数名称和左圆括号之间的空格" + }, + "fullDescription": { + "text": "报告函数调用中函数名称和左圆括号之间的任何空格,这在默认情况下不受支持。 示例 (MySQL): 'SELECT MAX (qty) FROM orders;' Inspection ID: MysqlSpaceAfterFunctionNameInspection", + "markdown": "报告函数调用中函数名称和左圆括号之间的任何空格,这在默认情况下不受支持。\n\n示例 (MySQL):\n\n SELECT MAX (qty) FROM orders;\n\nInspection ID: MysqlSpaceAfterFunctionNameInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "MysqlSpaceAfterFunctionName", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "MySQL", + "index": 20, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlJoinCountInspection", + "shortDescription": { + "text": "JOIN 计数过多" + }, + "fullDescription": { + "text": "报告具有过多 JOIN 的查询。 出于性能原因,通常不建议使用过多的 JOIN。 'SELECT * FROM a inner join b using(id) inner join c using (id) inner join d using (id) inner join e using (id)' Inspection ID: SqlJoinCountInspection", + "markdown": "报告具有过多 JOIN 的查询。\n\n出于性能原因,通常不建议使用过多的 JOIN。\n\n SELECT * FROM a inner join b using(id) inner join c using (id) inner join d using (id) inner join e using (id)\n\nInspection ID: SqlJoinCountInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlJoinCount", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Performance" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 40, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlMissingReturnInspection", + "shortDescription": { + "text": "缺少 return 语句" + }, + "fullDescription": { + "text": "报告没有 RETURN 语句的函数。 示例 (Oracle): 'CREATE FUNCTION foo RETURN int AS\nBEGIN\nEND;' 'foo' 函数必须返回整数值,但函数体不返回任何内容。 要修正错误,请添加 RETURN 语句(例如,'RETURN 1;')。 'CREATE FUNCTION foo RETURN int AS\nBEGIN\n RETURN 1;\nEND;' Inspection ID: SqlMissingReturnInspection", + "markdown": "报告没有 RETURN 语句的函数。\n\n示例 (Oracle):\n\n CREATE FUNCTION foo RETURN int AS\n BEGIN\n END;\n\n`foo` 函数必须返回整数值,但函数体不返回任何内容。 要修正错误,请添加 RETURN 语句(例如,`RETURN 1;`)。\n\n CREATE FUNCTION foo RETURN int AS\n BEGIN\n RETURN 1;\n END;\n\nInspection ID: SqlMissingReturnInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "SqlMissingReturn", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 40, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlUnusedSubqueryItemInspection", + "shortDescription": { + "text": "未使用的子查询项" + }, + "fullDescription": { + "text": "报告外部查询表达式中未引用的列、别名和其他子查询项。 示例 (PostgreSQL): 'CREATE TABLE for_subquery(id INT);\nSELECT a, q FROM (SELECT 1 AS a, 10 AS b, 2 + 3 AS q, id\n FROM for_subquery) x;' 我们引用子查询中的别名 'a' 和 'q'。 但是 'b' 别名和 'id' 列在外部 SELECT 语句中没有被引用。 因此,'b' 和 'id' 将显示为灰色。 Inspection ID: SqlUnusedSubqueryItemInspection", + "markdown": "报告外部查询表达式中未引用的列、别名和其他子查询项。\n\n示例 (PostgreSQL):\n\n CREATE TABLE for_subquery(id INT);\n SELECT a, q FROM (SELECT 1 AS a, 10 AS b, 2 + 3 AS q, id\n FROM for_subquery) x;\n\n我们引用子查询中的别名 `a` 和 `q`。 但是 `b` 别名和 `id` 列在外部 SELECT 语句中没有被引用。 因此,`b` 和 `id` 将显示为灰色。\n\nInspection ID: SqlUnusedSubqueryItemInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlUnused", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 40, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlCaseVsIfInspection", + "shortDescription": { + "text": "使用 CASE 代替条件函数,反之亦然" + }, + "fullDescription": { + "text": "报告 CASE 和 IF 可互换的情况。 示例 (MySQL): 'SELECT CASE\nWHEN C1 IS NULL THEN 1\nELSE 0\nEND\nFROM dual;' 您可以通过用 IF 替换 CASE 结构来缩短代码。 为此,请应用 替换为 'IF' 调用 意图操作。 示例代码如下所示: 'SELECT IF(C1 IS NULL, 1, 0)\nFROM dual;' 要将 IF 恢复为 CASE,请点击 IF 并应用替换为 CASE 表达式 意图操作。 Inspection ID: SqlCaseVsIfInspection", + "markdown": "报告 CASE 和 IF 可互换的情况。\n\n示例 (MySQL):\n\n SELECT CASE\n WHEN C1 IS NULL THEN 1\n ELSE 0\n END\n FROM dual;\n\n您可以通过用 IF 替换 CASE 结构来缩短代码。 为此,请应用 **替换为 'IF' 调用** 意图操作。 示例代码如下所示:\n\n SELECT IF(C1 IS NULL, 1, 0)\n FROM dual;\n\n要将 IF 恢复为 CASE,请点击 IF 并应用**替换为 CASE 表达式** 意图操作。\n\nInspection ID: SqlCaseVsIfInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlCaseVsIf", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 40, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlShouldBeInGroupByInspection", + "shortDescription": { + "text": "列应在 group by 子句中" + }, + "fullDescription": { + "text": "报告不在 GROUP BY 子句或聚合函数调用中的列。 示例 (Microsoft SQL Server): 'CREATE TABLE t1 (a INT, b INT);\nSELECT a, b FROM t1 GROUP BY a;' 如果您运行 SELECT 查询,您将收到一个错误,因为 Microsoft SQL Server 需要 'b' 列在 GROUP BY 中或在聚合函数内使用。 以下两个示例将修复该错误。 'SELECT a, b FROM t1 GROUP BY a, b;\nSELECT a, max(b) max_b FROM t1 GROUP BY a;' Inspection ID: SqlShouldBeInGroupByInspection", + "markdown": "报告不在 GROUP BY 子句或聚合函数调用中的列。\n\n示例 (Microsoft SQL Server):\n\n CREATE TABLE t1 (a INT, b INT);\n SELECT a, b FROM t1 GROUP BY a;\n\n如果您运行 SELECT 查询,您将收到一个错误,因为 Microsoft SQL Server 需要 `b` 列在 GROUP BY 中或在聚合函数内使用。 以下两个示例将修复该错误。\n\n SELECT a, b FROM t1 GROUP BY a, b;\n SELECT a, max(b) max_b FROM t1 GROUP BY a;\n\nInspection ID: SqlShouldBeInGroupByInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlShouldBeInGroupBy", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 40, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlAutoIncrementDuplicateInspection", + "shortDescription": { + "text": "自动增量重复" + }, + "fullDescription": { + "text": "报告包含两个具有自动增量的列的表。 在 MySQL、Microsoft SQL Server 和 Db2 方言中,一个表只能有一个带有自动增量选项的字段,并且此字段必须是键。 示例 (MySQL): 'CREATE TABLE my_table\n(\n id INT AUTO_INCREMENT,\n c2 INT AUTO_INCREMENT,\n);' 'c2' 的 AUTO_INCREMENT 约束将被高亮显示,因为 'c1' 已经具有此约束。 要修正警告,您可以将 'id' 设为主键并删除 'c2' 的 AUTO_INCREMENT。 'CREATE TABLE my_table\n(\n id INT AUTO_INCREMENT PRIMARY KEY,\n c2 INT,\n);' Inspection ID: SqlAutoIncrementDuplicateInspection", + "markdown": "报告包含两个具有自动增量的列的表。 在 MySQL、Microsoft SQL Server 和 Db2 方言中,一个表只能有一个带有自动增量选项的字段,并且此字段必须是键。\n\n示例 (MySQL):\n\n CREATE TABLE my_table\n (\n id INT AUTO_INCREMENT,\n c2 INT AUTO_INCREMENT,\n );\n\n`c2` 的 AUTO_INCREMENT 约束将被高亮显示,因为 `c1` 已经具有此约束。 要修正警告,您可以将 `id` 设为主键并删除 `c2` 的 AUTO_INCREMENT。\n\n CREATE TABLE my_table\n (\n id INT AUTO_INCREMENT PRIMARY KEY,\n c2 INT,\n );\n\nInspection ID: SqlAutoIncrementDuplicateInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlAutoIncrementDuplicate", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 40, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlStringLengthExceededInspection", + "shortDescription": { + "text": "隐式字符串截断" + }, + "fullDescription": { + "text": "报告超过定义的字符长度的变量。 示例 (Microsoft SQL Server): 'CREATE PROCEDURE test() AS\nBEGIN\nDECLARE myVarOk VARCHAR(5) = 'abcde';\nDECLARE myVarExceeded VARCHAR(5) = 'abcde12345';\n\nSET myVarOk = 'xyz';\nSET myVarExceeded = '123456789';\nEND;' 'myVarExceeded' 变量被定义为 'VARCHAR(5)' 但两个分配的值(''abcde12345'' 和 ''123456789'') 都超出了此限制。 您可以截断指定的值或增加定义的长度。 要增加长度,请使用增加类型长度 快速修复。 在应用快速修复后: 'CREATE PROCEDURE test() AS\nBEGIN\nDECLARE myVarOk VARCHAR(5) = 'abcde';\nDECLARE myVarExceeded VARCHAR(10) = 'abcde12345';\n\nSET myVarOk = 'xyz';\nSET myVarExceeded = '123456789';\nEND;' Inspection ID: SqlStringLengthExceededInspection", + "markdown": "报告超过定义的字符长度的变量。\n\n示例 (Microsoft SQL Server):\n\n CREATE PROCEDURE test() AS\n BEGIN\n DECLARE myVarOk VARCHAR(5) = 'abcde';\n DECLARE myVarExceeded VARCHAR(5) = 'abcde12345';\n\n SET myVarOk = 'xyz';\n SET myVarExceeded = '123456789';\n END;\n\n`myVarExceeded` 变量被定义为 `VARCHAR(5)` 但两个分配的值(`'abcde12345'` 和 `'123456789'`) 都超出了此限制。 您可以截断指定的值或增加定义的长度。\n要增加长度,请使用**增加类型长度** 快速修复。\n\n在应用快速修复后:\n\n CREATE PROCEDURE test() AS\n BEGIN\n DECLARE myVarOk VARCHAR(5) = 'abcde';\n DECLARE myVarExceeded VARCHAR(10) = 'abcde12345';\n\n SET myVarOk = 'xyz';\n SET myVarExceeded = '123456789';\n END;\n\nInspection ID: SqlStringLengthExceededInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlStringLengthExceeded", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 40, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlSideEffectsInspection", + "shortDescription": { + "text": "具有副作用的语句" + }, + "fullDescription": { + "text": "报告在只读连接期间可能会修改数据库的语句。 要为连接启用只读模式,请在数据库工具窗口(视图 | 工具窗口 | 数据库)中右键点击数据源,然后选择属性。 在数据源和驱动程序对话框中,点击选项标签页并选中只读复选框。 示例 (MySQL): 'CREATE TABLE foo(a INT);\nINSERT INTO foo VALUES (1);' 由于 'CREATE TABLE' 和'INSERT INTO' 语句会导致数据库修改,因此这些语句将在只读连接模式中高亮显示。 Inspection ID: SqlSideEffectsInspection", + "markdown": "报告在只读连接期间可能会修改数据库的语句。\n\n要为连接启用只读模式,请在**数据库** 工具窗口(**视图 \\| 工具窗口 \\| 数据库** )中右键点击数据源,然后选择**属性** 。\n在**数据源和驱动程序** 对话框中,点击**选项** 标签页并选中**只读**复选框。\n\n示例 (MySQL):\n\n CREATE TABLE foo(a INT);\n INSERT INTO foo VALUES (1);\n\n由于 `CREATE TABLE` 和`INSERT INTO` 语句会导致数据库修改,因此这些语句将在只读连接模式中高亮显示。\n\nInspection ID: SqlSideEffectsInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlSideEffects", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 40, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlDtInspection", + "shortDescription": { + "text": "格式错误的日期/时间字面量" + }, + "fullDescription": { + "text": "报告日期和时间字面量中的错误。 此检查在 MySQL、Oracle、Db2 和 H2 中可用。 示例 (MySQL): 'SELECT TIME '10 -12:13:14' FROM dual;\nSELECT TIME ' 12 : 13 : 14 ' FROM dual;\nSELECT TIME '12 13 14' FROM dual;\nSELECT TIME '12-13-14' FROM dual;\nSELECT TIME '12.13.14' FROM dual;\nSELECT TIME '12:13:' FROM dual;\nSELECT TIME '12:13' FROM dual;\nSELECT TIME '12:' FROM dual;' 在此示例中,日期会忽略 MySQL 日期字面量和时间字面量标准。 因此,这些将高亮显示。 有关 MySQL 中日期和时间字面量的详细信息,请参阅 dev.mysql.com 上的 Date and Time Literals。 以下日期和时间字面量对 MySQL 有效。 'SELECT TIME '12:13:14' FROM dual;\nSELECT TIME '12:13:14.555' FROM dual;\nSELECT TIME '12:13:14.' FROM dual;\nSELECT TIME '-12:13:14' FROM dual;\nSELECT TIME '10 12:13:14' FROM dual;\nSELECT TIME '-10 12:13:14' FROM dual;' Inspection ID: SqlDtInspection", + "markdown": "报告日期和时间字面量中的错误。 此检查在 MySQL、Oracle、Db2 和 H2 中可用。\n\n示例 (MySQL):\n\n SELECT TIME '10 -12:13:14' FROM dual;\n SELECT TIME ' 12 : 13 : 14 ' FROM dual;\n SELECT TIME '12 13 14' FROM dual;\n SELECT TIME '12-13-14' FROM dual;\n SELECT TIME '12.13.14' FROM dual;\n SELECT TIME '12:13:' FROM dual;\n SELECT TIME '12:13' FROM dual;\n SELECT TIME '12:' FROM dual;\n\n在此示例中,日期会忽略 MySQL 日期字面量和时间字面量标准。 因此,这些将高亮显示。\n有关 MySQL 中日期和时间字面量的详细信息,请参阅 [dev.mysql.com 上的 Date and Time Literals](https://dev.mysql.com/doc/refman/8.0/en/date-and-time-literals.html)。\n\n以下日期和时间字面量对 MySQL 有效。\n\n SELECT TIME '12:13:14' FROM dual;\n SELECT TIME '12:13:14.555' FROM dual;\n SELECT TIME '12:13:14.' FROM dual;\n SELECT TIME '-12:13:14' FROM dual;\n SELECT TIME '10 12:13:14' FROM dual;\n SELECT TIME '-10 12:13:14' FROM dual;\n\nInspection ID: SqlDtInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlDateTime", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 40, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlIllegalCursorStateInspection", + "shortDescription": { + "text": "非法光标状态" + }, + "fullDescription": { + "text": "报告 SQL 例程中的非法光标状态。 例程具有 CLOSE 或 FETCH 语句,但光标可能已被关闭。 例程具有 OPEN 语句,但光标可能已被打开。 示例 (Microsoft SQL Server): 'CREATE TABLE t(col INT);\n\nCREATE PROCEDURE foo() AS\nBEGIN\nDECLARE my_cursor CURSOR FOR SELECT * FROM t;\nDECLARE a INT;\nFETCH my_cursor INTO a;\nCLOSE my_cursor;\nEND;' 根据 docs.microsoft.com 上的 CLOSE (Transact-SQL),必须为打开的光标执行 CLOSE,并且不允许对仅声明或已经关闭的光标执行 CLOSE。 因此,我们需要打开光标来修正警告。 'CREATE PROCEDURE foo() AS\nBEGIN\nDECLARE my_cursor CURSOR FOR SELECT * FROM t;\nDECLARE a INT;\nOPEN my_cursor;\nFETCH my_cursor INTO a;\nCLOSE my_cursor;\nEND;' Inspection ID: SqlIllegalCursorStateInspection", + "markdown": "报告 SQL 例程中的非法光标状态。\n\n* 例程具有 CLOSE 或 FETCH 语句,但光标可能已被关闭。\n* 例程具有 OPEN 语句,但光标可能已被打开。\n\n示例 (Microsoft SQL Server):\n\n CREATE TABLE t(col INT);\n\n CREATE PROCEDURE foo() AS\n BEGIN\n DECLARE my_cursor CURSOR FOR SELECT * FROM t;\n DECLARE a INT;\n FETCH my_cursor INTO a;\n CLOSE my_cursor;\n END;\n\n根据 [docs.microsoft.com 上的 CLOSE (Transact-SQL)](https://docs.microsoft.com/en-us/sql/t-sql/language-elements/close-transact-sql),必须为打开的光标执行 CLOSE,并且不允许对仅声明或已经关闭的光标执行 CLOSE。 因此,我们需要打开光标来修正警告。\n\n CREATE PROCEDURE foo() AS\n BEGIN\n DECLARE my_cursor CURSOR FOR SELECT * FROM t;\n DECLARE a INT;\n OPEN my_cursor;\n FETCH my_cursor INTO a;\n CLOSE my_cursor;\n END;\n\nInspection ID: SqlIllegalCursorStateInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlIllegalCursorState", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 40, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlJoinWithoutOnInspection", + "shortDescription": { + "text": "'delete' 语句中的 'join' 子句不安全" + }, + "fullDescription": { + "text": "报告可能更改整个数据库的语句的缺失条件检查。 例如,在没有 ON 或 WHERE 的 DELETE 语句中使用 JOIN 子句。 如果不对 JOIN 进行条件检查,DELETE 将删除整个表的内容。 示例 (MySQL): 'CREATE TABLE foo (a INT,b INT,c INT);\nCREATE TABLE bar (a INT,b INT,c INT);\n\nDELETE table1 FROM foo table1 INNER JOIN bar table2;' Inspection ID: SqlJoinWithoutOnInspection", + "markdown": "报告可能更改整个数据库的语句的缺失条件检查。\n\n例如,在没有 ON 或 WHERE 的 DELETE 语句中使用 JOIN 子句。 如果不对 JOIN 进行条件检查,DELETE 将删除整个表的内容。\n\n示例 (MySQL):\n\n CREATE TABLE foo (a INT,b INT,c INT);\n CREATE TABLE bar (a INT,b INT,c INT);\n\n DELETE table1 FROM foo table1 INNER JOIN bar table2;\n\nInspection ID: SqlJoinWithoutOnInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlJoinWithoutOn", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 40, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlDropIndexedColumnInspection", + "shortDescription": { + "text": "索引依赖于列" + }, + "fullDescription": { + "text": "报告尝试从索引表中删除列的情况。 此检查在 Microsoft SQL Server 和 Sybase ASE 中可用。 示例 (Microsoft SQL Server): 'CREATE TABLE test_index\n(\ncol INT NOT NULL,\ncol2 INT NOT NULL,\ncol3 INT NOT NULL UNIQUE,\ncol4 VARCHAR(200)\n);\n\nCREATE UNIQUE INDEX aaaa ON test_index (col, col2);\n\nALTER TABLE test_index\nDROP COLUMN col;' 您不能删除 'col' 列,因为它在索引表中。 要删除该列,您需要先删除 'aaaa' 索引(例如 DROP INDEX aaaa)。 Inspection ID: SqlDropIndexedColumnInspection", + "markdown": "报告尝试从索引表中删除列的情况。 此检查在 Microsoft SQL Server 和 Sybase ASE 中可用。\n\n示例 (Microsoft SQL Server):\n\n CREATE TABLE test_index\n (\n col INT NOT NULL,\n col2 INT NOT NULL,\n col3 INT NOT NULL UNIQUE,\n col4 VARCHAR(200)\n );\n\n CREATE UNIQUE INDEX aaaa ON test_index (col, col2);\n\n ALTER TABLE test_index\n DROP COLUMN col;\n\n您不能删除 `col` 列,因为它在索引表中。 要删除该列,您需要先删除 `aaaa` 索引(例如 DROP INDEX aaaa)。\n\nInspection ID: SqlDropIndexedColumnInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlDropIndexedColumn", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 40, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlCheckUsingColumnsInspection", + "shortDescription": { + "text": "检查 using 子句列" + }, + "fullDescription": { + "text": "报告两个表中都不存在的 USING 子句中的列。 示例 (MySQL): 'CREATE TABLE t1 (i INT, j INT);\nCREATE TABLE t2 (k INT, l INT);\nSELECT * FROM t1 JOIN t2 USING (j);' 在 USING 子句中,列名必须存在于两个表中,SELECT 查询将使用给定的列名自动连接这些表。 由于我们在 't2' 中没有 'j' 列,我们可以使用 ON 重写查询。 ON 子句可以连接两个表中列名不匹配的表。 'SELECT * FROM t1 JOIN t2 ON t1.j = t2.l;' Inspection ID: SqlCheckUsingColumnsInspection", + "markdown": "报告两个表中都不存在的 USING 子句中的列。\n\n示例 (MySQL):\n\n CREATE TABLE t1 (i INT, j INT);\n CREATE TABLE t2 (k INT, l INT);\n SELECT * FROM t1 JOIN t2 USING (j);\n\n在 USING 子句中,列名必须存在于两个表中,SELECT 查询将使用给定的列名自动连接这些表。 由于我们在 `t2` 中没有 `j` 列,我们可以使用 ON 重写查询。 ON 子句可以连接两个表中列名不匹配的表。\n\n SELECT * FROM t1 JOIN t2 ON t1.j = t2.l;\n\nInspection ID: SqlCheckUsingColumnsInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlCheckUsingColumns", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 40, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlInsertValuesInspection", + "shortDescription": { + "text": "VALUE 子句基数" + }, + "fullDescription": { + "text": "报告 VALUES 中的形参数目与目标表中的列数不匹配的情况。 示例 (MySQL): 'CREATE TABLE foo(a INT, b INT, c INT);\n\nINSERT INTO foo VALUES (1,2,3,4)' 'foo' 表有三列,但在 INSERT INTO 语句中我们传递了四列。 Inspection ID: SqlInsertValuesInspection", + "markdown": "报告 VALUES 中的形参数目与目标表中的列数不匹配的情况。\n\n示例 (MySQL):\n\n CREATE TABLE foo(a INT, b INT, c INT);\n\n INSERT INTO foo VALUES (1,2,3,4)\n\n`foo` 表有三列,但在 INSERT INTO 语句中我们传递了四列。\n\nInspection ID: SqlInsertValuesInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlInsertValues", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 40, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlDialectInspection", + "shortDescription": { + "text": "SQL 方言检测" + }, + "fullDescription": { + "text": "报告未将方言分配给 SQL 文件的情况。 例如,当您打开一个新的 SQL 文件而没有为其分配方言时,您会看到一条通知,其中建议了最匹配的方言。 点击 使用 链接以使用建议的方言。 或者,点击将方言更改为链接以选择其他方言。 Inspection ID: SqlDialectInspection", + "markdown": "报告未将方言分配给 SQL 文件的情况。\n\n例如,当您打开一个新的 SQL 文件而没有为其分配方言时,您会看到一条通知,其中建议了最匹配的方言。 点击 **使用\\** 链接以使用建议的方言。 或者,点击**将方言更改为**链接以选择其他方言。\n\nInspection ID: SqlDialectInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlDialectInspection", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 40, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlRedundantElseNullInspection", + "shortDescription": { + "text": "冗余 ELSE NULL 子句" + }, + "fullDescription": { + "text": "报告冗余的 ELSE NULL 子句。 示例 (MySQL): 'SELECT CASE WHEN 2 > 1 THEN 'OK' ELSE NULL END AS alias FROM foo;' 'ELSE NULL' 部分永远不会被执行,可以省略。 Inspection ID: SqlRedundantElseNullInspection", + "markdown": "报告冗余的 ELSE NULL 子句。\n\n示例 (MySQL):\n\n SELECT CASE WHEN 2 > 1 THEN 'OK' ELSE NULL END AS alias FROM foo;\n\n`ELSE NULL` 部分永远不会被执行,可以省略。\n\nInspection ID: SqlRedundantElseNullInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlRedundantElseNull", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 40, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MysqlParsingInspection", + "shortDescription": { + "text": "8.0 以前的版本中不受支持的语法" + }, + "fullDescription": { + "text": "报告查询中 UNION 的无效用法。 该检查适用于早于 8.0 的 MySQL 版本。 示例 (MySQL): 'SELECT * FROM (SELECT 1 UNION (SELECT 1 UNION SELECT 2)) a;' Inspection ID: MysqlParsingInspection", + "markdown": "报告查询中 UNION 的无效用法。\n\n该检查适用于早于 8.0 的 MySQL 版本。\n\n示例 (MySQL):\n\n\n SELECT * FROM (SELECT 1 UNION (SELECT 1 UNION SELECT 2)) a;\n\nInspection ID: MysqlParsingInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "MysqlParsing", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "MySQL", + "index": 20, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlCallNotationInspection", + "shortDescription": { + "text": "使用命名实参和位置实参" + }, + "fullDescription": { + "text": "报告位置实参在命名实参之后的调用。 适用于 PostgreSQL、Oracle 和 Db2。 示例(PostgreSQL 中): 'CREATE FUNCTION foo(a int, b int, c int) RETURNS int\n LANGUAGE plpgsql AS\n$$\nBEGIN\n RETURN a + b + c;\nEND\n$$;\nSELECT foo(a => 1, b => 2, c => 3);\n -- `3` 在命名实参之后\nSELECT foo(1, b => 2, 3);\n -- `1` 和 `3` 在命名实参之后\nSELECT foo(b => 2, 1, 3);' Inspection ID: SqlCallNotationInspection", + "markdown": "报告位置实参在命名实参之后的调用。 适用于 PostgreSQL、Oracle 和 Db2。\n\n示例(PostgreSQL 中):\n\n CREATE FUNCTION foo(a int, b int, c int) RETURNS int\n LANGUAGE plpgsql AS\n $$\n BEGIN\n RETURN a + b + c;\n END\n $$;\n SELECT foo(a => 1, b => 2, c => 3);\n -- `3` 在命名实参之后\n SELECT foo(1, b => 2, 3);\n -- `1` 和 `3` 在命名实参之后\n SELECT foo(b => 2, 1, 3);\n\nInspection ID: SqlCallNotationInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "SqlCallNotation", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 40, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MongoJSExtDeprecationInspection", + "shortDescription": { + "text": "弃用的元素" + }, + "fullDescription": { + "text": "报告 MongoDB 和 JavaScript 代码中已弃用的方法的用法。 快速修复用推荐的替代方法替换了已弃用的方法。 示例: 'db.my_collection.insert()' 在应用快速修复后: 'db.my_collection.insertOne()' Inspection ID: MongoJSExtDeprecationInspection", + "markdown": "报告 MongoDB 和 JavaScript 代码中已弃用的方法的用法。\n\n快速修复用推荐的替代方法替换了已弃用的方法。\n\n示例:\n\n\n db.my_collection.insert()\n\n在应用快速修复后:\n\n\n db.my_collection.insertOne()\n\nInspection ID: MongoJSExtDeprecationInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "MongoJSDeprecation", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "MongoJS", + "index": 17, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlDuplicateColumnInspection", + "shortDescription": { + "text": "SELECT 中的重复列名" + }, + "fullDescription": { + "text": "报告 SELECT 列表中列别名的重复名称。 示例(Sybase ASE): 'CREATE TABLE t1 (a TEXT, b INT, c INT);\n\nSELECT a AS x, b AS x FROM t1;' 'x' 别名用于 'a' 和 'b' 列。 这些分配高亮显示为错误,因为您不能对 Sybase ASE 中的列使用相同的别名。 Inspection ID: SqlDuplicateColumnInspection", + "markdown": "报告 SELECT 列表中列别名的重复名称。\n\n示例(Sybase ASE):\n\n CREATE TABLE t1 (a TEXT, b INT, c INT);\n\n SELECT a AS x, b AS x FROM t1;\n\n`x` 别名用于 `a` 和 `b` 列。 这些分配高亮显示为错误,因为您不能对 Sybase ASE 中的列使用相同的别名。\n\nInspection ID: SqlDuplicateColumnInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlDuplicateColumn", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 40, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlShadowingAliasInspection", + "shortDescription": { + "text": "列被别名隐藏" + }, + "fullDescription": { + "text": "报告 SELECT 中别名名称与 FROM 子句中的列名称匹配。 示例 (MySQL): 'CREATE TABLE foo (a INT, b INT, c INT);\nSELECT a b, c FROM foo;' 'a' 列使用 'b' 别名,但 'b' 名称也被 'foo' 表中的列使用。 Inspection ID: SqlShadowingAliasInspection", + "markdown": "报告 SELECT 中别名名称与 FROM 子句中的列名称匹配。\n\n示例 (MySQL):\n\n CREATE TABLE foo (a INT, b INT, c INT);\n SELECT a b, c FROM foo;\n\n`a` 列使用 `b` 别名,但 `b` 名称也被 `foo` 表中的列使用。\n\nInspection ID: SqlShadowingAliasInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlShadowingAlias", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 40, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MongoJSDeprecationInspection", + "shortDescription": { + "text": "弃用的元素" + }, + "fullDescription": { + "text": "报告 MongoDB 和 JavaScript 代码中已弃用的方法的用法。 快速修复会将已弃用的方法替换为推荐的替代方法。 示例: 'db.my_collection.insert()' 在应用快速修复后: 'db.my_collection.insertOne()' Inspection ID: MongoJSDeprecationInspection", + "markdown": "报告 MongoDB 和 JavaScript 代码中已弃用的方法的用法。\n\n快速修复会将已弃用的方法替换为推荐的替代方法。\n\n示例:\n\n db.my_collection.insert()\n\n在应用快速修复后:\n\n db.my_collection.insertOne()\n\nInspection ID: MongoJSDeprecationInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "MongoJSDeprecation", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "MongoJS", + "index": 17, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlTypeInspection", + "shortDescription": { + "text": "类型兼容性" + }, + "fullDescription": { + "text": "报告与类型相关的错误。 Inspection ID: SqlTypeInspection", + "markdown": "报告与类型相关的错误。\n\nInspection ID: SqlTypeInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlType", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 40, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlUnreachableCodeInspection", + "shortDescription": { + "text": "不可到达的代码" + }, + "fullDescription": { + "text": "报告 SQL 例程中不可到达的语句。 示例 (Microsoft SQL Server): 'CREATE FUNCTION foo() RETURNS INT AS\nBEGIN\n THROW;\n RETURN 1;\nEND;' 在 Microsoft SQL Server 中,'THROW' 语句会抛出异常并将执行转移到 TRY...CATCH 结构的 CATCH 块。 因此,'RETURN 1;' 部分将永远不会被执行。 Inspection ID: SqlUnreachableCodeInspection", + "markdown": "报告 SQL 例程中不可到达的语句。\n\n示例 (Microsoft SQL Server):\n\n CREATE FUNCTION foo() RETURNS INT AS\n BEGIN\n THROW;\n RETURN 1;\n END;\n\n在 Microsoft SQL Server 中,`THROW` 语句会抛出异常并将执行转移到 TRY...CATCH 结构的 CATCH 块。 因此,`RETURN 1;` 部分将永远不会被执行。\n\nInspection ID: SqlUnreachableCodeInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlUnreachable", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 40, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlUnicodeStringLiteralInspection", + "shortDescription": { + "text": "SQL 中的 Unicode 用法" + }, + "fullDescription": { + "text": "报告使用没有 'N' 前缀的国家字符的字符串字面量。 如果没有 N 前缀,字符串将被转换为数据库的默认代码页面。 此默认代码页面可能无法识别某些字符。 有关更多信息,请参阅 docs.microsoft.com 上的“nchar 和 nvarchar”(Transact-SQL) 页面。 示例 (Microsoft SQL Server): 'SELECT 'abcde' AS a;\nSELECT N'abcde' AS b;\nSELECT 'абвгд' AS c;\nSELECT N'абвгд' AS d;' 'SELECT 'абвгд' AS c;' 没有 'N' 前缀,''абвгд'' 部分将被高亮显示。 Inspection ID: SqlUnicodeStringLiteralInspection", + "markdown": "报告使用没有 `N` 前缀的国家字符的字符串字面量。\n\n如果没有 N 前缀,字符串将被转换为数据库的默认代码页面。 此默认代码页面可能无法识别某些字符。 有关更多信息,请参阅 [docs.microsoft.com 上的\"nchar 和 nvarchar\"(Transact-SQL)](https://docs.microsoft.com/en-us/sql/t-sql/data-types/nchar-and-nvarchar-transact-sql) 页面。\n\n示例 (Microsoft SQL Server):\n\n SELECT 'abcde' AS a;\n SELECT N'abcde' AS b;\n SELECT 'абвгд' AS c;\n SELECT N'абвгд' AS d;\n\n`SELECT 'абвгд' AS c;` 没有 `N` 前缀,`'абвгд'` 部分将被高亮显示。\n\nInspection ID: SqlUnicodeStringLiteralInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlUnicodeStringLiteral", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 40, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlSingleSessionModeInspection", + "shortDescription": { + "text": "创建没有单会话模式的临时表" + }, + "fullDescription": { + "text": "报告未在单会话模式下进行的临时表创建。 示例 (PostgreSQL): 'CREATE TEMPORARY TABLE foo(a INT, b INT);' Inspection ID: SqlSingleSessionModeInspection", + "markdown": "报告未在单会话模式下进行的临时表创建。\n\n示例 (PostgreSQL):\n\n CREATE TEMPORARY TABLE foo(a INT, b INT);\n\nInspection ID: SqlSingleSessionModeInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlSingleSessionMode", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 40, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlUnusedVariableInspection", + "shortDescription": { + "text": "未使用的变量" + }, + "fullDescription": { + "text": "报告未使用的实参、变量或形参。 示例 (PostgreSQL): 'CREATE FUNCTION foo(PARAMUSED INT, PARAMUNUSED INT) RETURNS INT AS\n$$\nBEGIN\n RETURN PARAMUSED;\nEND\n$$ LANGUAGE plpgsql;' 'PARAMUNUSED' 形参未在函数中使用,可能会被删除。 Inspection ID: SqlUnusedVariableInspection", + "markdown": "报告未使用的实参、变量或形参。\n\n示例 (PostgreSQL):\n\n CREATE FUNCTION foo(PARAMUSED INT, PARAMUNUSED INT) RETURNS INT AS\n $$\n BEGIN\n RETURN PARAMUSED;\n END\n $$ LANGUAGE plpgsql;\n\n`PARAMUNUSED` 形参未在函数中使用,可能会被删除。\n\nInspection ID: SqlUnusedVariableInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlUnused", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 40, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlNoDataSourceInspection", + "shortDescription": { + "text": "未配置数据源" + }, + "fullDescription": { + "text": "报告数据库工具窗口中缺少数据源(视图 | 工具窗口 | 数据库)。 Inspection ID: SqlNoDataSourceInspection", + "markdown": "报告**数据库** 工具窗口中缺少数据源(**视图 \\| 工具窗口 \\| 数据库** )。\n\nInspection ID: SqlNoDataSourceInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlNoDataSourceInspection", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Unspecified" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 40, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlResolveInspection", + "shortDescription": { + "text": "未解析的引用" + }, + "fullDescription": { + "text": "报告未解析的 SQL 引用。 示例 (MySQL): 'CREATE TABLE users(id INT, name VARCHAR(40));\nCREATE TABLE admins(id INT, col1 INT);\n\nSELECT users.id, admins.id FROM admins WHERE admins.id > 1;' 'users.id' 列未解析,因为 FROM 子句中缺少 'users' 表。 Inspection ID: SqlResolveInspection", + "markdown": "报告未解析的 SQL 引用。\n\n示例 (MySQL):\n\n CREATE TABLE users(id INT, name VARCHAR(40));\n CREATE TABLE admins(id INT, col1 INT);\n\n SELECT users.id, admins.id FROM admins WHERE admins.id > 1;\n\n`users.id` 列未解析,因为 FROM 子句中缺少 `users` 表。\n\nInspection ID: SqlResolveInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "SqlResolve", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 40, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "PgSelectFromProcedureInspection", + "shortDescription": { + "text": "Postgres: 从过程调用中 select" + }, + "fullDescription": { + "text": "报告从函数执行 SELECT 或执行没有类型别名的 DBLINK(例如 'AS t1 (s VARCHAR)')的情况。 此要求不适用于标量函数。 示例 (PostgreSQL): 'CREATE FUNCTION produce_a_table() RETURNS RECORD AS $$\nSELECT 1;\n$$ LANGUAGE sql;\nSELECT * FROM produce_a_table() AS s (c1 INT);\nSELECT * FROM produce_a_table() AS s (c1);\nSELECT * FROM DBLINK('dbname=mydb', 'SELECT proname, prosrc FROM pg_proc') AS t1;' 'AS s (c1 INT)' 具有类型别名,而 'AS s (c1)' 和 'AS t1' 没有。 在这种情况下,将高亮显示 'produce_a_table()' 和 'DBLINK()' 的第二次调用。 Inspection ID: PgSelectFromProcedureInspection", + "markdown": "报告从函数执行 SELECT 或执行没有类型别名的 DBLINK(例如 ` AS t1 (s VARCHAR) `)的情况。\n\n此要求不适用于标量函数。\n\n示例 (PostgreSQL):\n\n CREATE FUNCTION produce_a_table() RETURNS RECORD AS $$\n SELECT 1;\n $$ LANGUAGE sql;\n SELECT * FROM produce_a_table() AS s (c1 INT);\n SELECT * FROM produce_a_table() AS s (c1);\n SELECT * FROM DBLINK('dbname=mydb', 'SELECT proname, prosrc FROM pg_proc') AS t1;\n\n`AS s (c1 INT)` 具有类型别名,而 `AS s (c1)` 和 `AS t1` 没有。\n在这种情况下,将高亮显示 `produce_a_table()` 和 `DBLINK()` 的第二次调用。\n\nInspection ID: PgSelectFromProcedureInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "PgSelectFromProcedure", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "PostgreSQL", + "index": 68, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlCurrentSchemaInspection", + "shortDescription": { + "text": "当前查询文件架构已内省" + }, + "fullDescription": { + "text": "报告当前会话中未自省的架构和数据库。 例如,当您尝试在未内省的架构中创建表时,可能会出现此警告。 内省是一种检查数据源的方法。 执行内省时,将从数据库中检索结构信息以检测各种对象及其特性。例如,可能是表、列、函数和其他元素。 Inspection ID: SqlCurrentSchemaInspection", + "markdown": "报告当前会话中未自省的架构和数据库。\n\n例如,当您尝试在未内省的架构中创建表时,可能会出现此警告。\n\n内省是一种检查数据源的方法。 执行内省时,将从数据库中检索结构信息以检测各种对象及其特性。例如,可能是表、列、函数和其他元素。\n\nInspection ID: SqlCurrentSchemaInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlCurrentSchemaInspection", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 40, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlMisleadingReferenceInspection", + "shortDescription": { + "text": "误导性引用" + }, + "fullDescription": { + "text": "报告 SQL 代码中不明确的引用。 例如,当名称同时引用表列和例程形参时。 由于违反直观的解析逻辑,此类代码的执行可能会导致错误或意外结果。 通常,范围更局部的名称具有更高的优先级。 示例 (PostgreSQL): 'CREATE TABLE foo\n(\n id INT,\n name VARCHAR(5)\n);\nCREATE FUNCTION func(name VARCHAR(5)) RETURNS INT AS\n$$\nDECLARE\n b INT;\nBEGIN\n -- `name` 不明确,因为它被用作列名和形参\n SELECT COUNT(*) INTO b FROM foo t WHERE t.name = name;\n RETURN b;\nEND;\n$$ LANGUAGE plpgsql;' 在 PostgreSQL 中,您可以使用 '#variable_conflict' 指令来明确指定正确的引用。 例如,使用 '#variable_conflict use_column' 引用列名,或使用 '#variable_conflict use_variable' 引用形参。 'CREATE TABLE foo\n(\n id INT,\n name VARCHAR(5)\n);\nCREATE FUNCTION func(name VARCHAR(5)) RETURNS INT AS\n$$\n #variable_conflict use_column\nDECLARE\n b INT;\nBEGIN\n SELECT COUNT(*) INTO b FROM foo t WHERE t.name = name;\n RETURN b;\nEND;\n$$ LANGUAGE plpgsql;' Inspection ID: SqlMisleadingReferenceInspection", + "markdown": "报告 SQL 代码中不明确的引用。\n\n例如,当名称同时引用表列和例程形参时。 由于违反直观的解析逻辑,此类代码的执行可能会导致错误或意外结果。 通常,范围更局部的名称具有更高的优先级。\n\n示例 (PostgreSQL):\n\n CREATE TABLE foo\n (\n id INT,\n name VARCHAR(5)\n );\n CREATE FUNCTION func(name VARCHAR(5)) RETURNS INT AS\n $$\n DECLARE\n b INT;\n BEGIN\n -- `name` 不明确,因为它被用作列名和形参\n SELECT COUNT(*) INTO b FROM foo t WHERE t.name = name;\n RETURN b;\n END;\n $$ LANGUAGE plpgsql;\n\n在 PostgreSQL 中,您可以使用 `#variable_conflict` 指令来明确指定正确的引用。 例如,使用 `#variable_conflict use_column` 引用列名,或使用 `#variable_conflict use_variable` 引用形参。\n\n CREATE TABLE foo\n (\n id INT,\n name VARCHAR(5)\n );\n CREATE FUNCTION func(name VARCHAR(5)) RETURNS INT AS\n $$\n #variable_conflict use_column\n DECLARE\n b INT;\n BEGIN\n SELECT COUNT(*) INTO b FROM foo t WHERE t.name = name;\n RETURN b;\n END;\n $$ LANGUAGE plpgsql;\n\nInspection ID: SqlMisleadingReferenceInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlMisleadingReference", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 40, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlInsertIntoGeneratedColumnInspection", + "shortDescription": { + "text": "插入到生成的列中" + }, + "fullDescription": { + "text": "报告将值赋给生成的列的 INSERT 语句。 可以读取生成的列,但不能直接写入其值。 示例 (PostgreSQL): 'CREATE TABLE foo\n(\n col1 INT,\n col2 INT GENERATED ALWAYS AS (col1 + 1) STORED\n);\nINSERT INTO foo(col1, col2) VALUES (1, 2);'\n 您不能将 '2' 插入到 'col2' 列中,因为此列已生成。 要使此脚本正常工作,您可以将 '2' 更改为 DEFAULT。 'INSERT INTO foo(col1, col2) VALUES (1, DEFAULT);' Inspection ID: SqlInsertIntoGeneratedColumnInspection", + "markdown": "报告将值赋给生成的列的 INSERT 语句。 可以读取生成的列,但不能直接写入其值。\n\n示例 (PostgreSQL):\n\n CREATE TABLE foo\n (\n col1 INT,\n col2 INT GENERATED ALWAYS AS (col1 + 1) STORED\n );\n INSERT INTO foo(col1, col2) VALUES (1, 2);\n\n您不能将 `2` 插入到 `col2` 列中,因为此列已生成。\n要使此脚本正常工作,您可以将 `2` 更改为 DEFAULT。\n`INSERT INTO foo(col1, col2) VALUES (1, DEFAULT);`\n\nInspection ID: SqlInsertIntoGeneratedColumnInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlInsertIntoGeneratedColumn", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 40, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlRedundantLimitInspection", + "shortDescription": { + "text": "查询中的冗余行限制" + }, + "fullDescription": { + "text": "报告查询中限制行的冗余子句,例如 FETCH 和 LIMIT。 示例 (PostgreSQL): 'CREATE TABLE foo(a INT);\n\nSELECT * FROM foo WHERE EXISTS(SELECT * FROM foo LIMIT 2);\nSELECT * FROM foo WHERE EXISTS(SELECT * FROM foo FETCH FIRST 2 ROWS ONLY);' 要修复警告,您可以将 OFFSET 添加到限制子句。 如果缺少 OFFSET,则 LIMIT 是多余的,因为 LIMIT 的用法不会影响 EXISTS 的运算结果。 在 OFFSET 的情况下,我们跳过前 'N' 行,这将影响输出。 'SELECT * FROM foo WHERE EXISTS(SELECT * FROM foo OFFSET 1 ROW LIMIT 2);\nSELECT * FROM foo WHERE EXISTS(SELECT * FROM foo OFFSET 1 ROW FETCH FIRST 2 ROWS ONLY);' Inspection ID: SqlRedundantLimitInspection", + "markdown": "报告查询中限制行的冗余子句,例如 FETCH 和 LIMIT。\n\n示例 (PostgreSQL):\n\n CREATE TABLE foo(a INT);\n\n SELECT * FROM foo WHERE EXISTS(SELECT * FROM foo LIMIT 2);\n SELECT * FROM foo WHERE EXISTS(SELECT * FROM foo FETCH FIRST 2 ROWS ONLY);\n\n要修复警告,您可以将 OFFSET 添加到限制子句。 如果缺少 OFFSET,则 LIMIT 是多余的,因为 LIMIT 的用法不会影响 EXISTS 的运算结果。 在 OFFSET 的情况下,我们跳过前 `N` 行,这将影响输出。\n\n SELECT * FROM foo WHERE EXISTS(SELECT * FROM foo OFFSET 1 ROW LIMIT 2);\n SELECT * FROM foo WHERE EXISTS(SELECT * FROM foo OFFSET 1 ROW FETCH FIRST 2 ROWS ONLY);\n\nInspection ID: SqlRedundantLimitInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlRedundantLimit", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 40, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlInsertNullIntoNotNullInspection", + "shortDescription": { + "text": "将 NULL 插入 NOT NULL 列" + }, + "fullDescription": { + "text": "报告将 NULL 值插入仅接受 NOT NULL 值的列的情况。 示例 (Microsoft SQL Server): 'CREATE TABLE br2 (\nid INT NOT NULL,\ncol1 NVARCHAR (20) NOT NULL,\ncol2 NVARCHAR (20) NOT NULL,\n);\n--\nINSERT INTO br2 (id, col1, col2)\nVALUES (1, NULL, NULL);' 您不能在 'col1' 和 'col2' 中插入 NULL 值,因为它们被定义为 NOT NULL。 如果按原样运行脚本,则会收到错误消息。 要修复此代码,请将 VALUES 部分中的 NULL 替换为值(例如,'42' 和 ''bird'')。 INSERT INTO br2 (id, col1, col2)\nVALUES (1, 42, 'bird'); Inspection ID: SqlInsertNullIntoNotNullInspection", + "markdown": "报告将 NULL 值插入仅接受 NOT NULL 值的列的情况。\n\n示例 (Microsoft SQL Server):\n\n CREATE TABLE br2 (\n id INT NOT NULL,\n col1 NVARCHAR (20) NOT NULL,\n col2 NVARCHAR (20) NOT NULL,\n );\n --\n INSERT INTO br2 (id, col1, col2)\n VALUES (1, NULL, NULL);\n\n您不能在 `col1` 和 `col2` 中插入 NULL 值,因为它们被定义为 NOT NULL。 如果按原样运行脚本,则会收到错误消息。 要修复此代码,请将 VALUES 部分中的 NULL 替换为值(例如,`42` 和 `'bird'`)。\n\n```\nINSERT INTO br2 (id, col1, col2)\nVALUES (1, 42, 'bird');\n```\n\nInspection ID: SqlInsertNullIntoNotNullInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlInsertNullIntoNotNull", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 40, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlDerivedTableAliasInspection", + "shortDescription": { + "text": "每个派生表都应具有别名" + }, + "fullDescription": { + "text": "报告没有别名的派生表。 示例 (MySQL): 'CREATE TABLE table1 (id INT, name VARCHAR(20), cats FLOAT);\nCREATE TABLE table2 (id INT, age INTEGER);\n\nSELECT id AS ID, name, cats, age\nFROM (SELECT table1.id, name, cats, age\nFROM table1\nJOIN table2 ON table1.id = table2.id);' 根据 dev.mysql.com 上的 Derived Tables,别名是强制的。 您可以使用引入别名快速修复来添加别名。 在应用快速修复后: 'SELECT id AS ID, name, cats, age\nFROM (SELECT table1.id, name, cats, age\nFROM table1\nJOIN table2 ON table1.id = table2.id);' Inspection ID: SqlDerivedTableAliasInspection", + "markdown": "报告没有别名的派生表。\n\n示例 (MySQL):\n\n CREATE TABLE table1 (id INT, name VARCHAR(20), cats FLOAT);\n CREATE TABLE table2 (id INT, age INTEGER);\n\n SELECT id AS ID, name, cats, age\n FROM (SELECT table1.id, name, cats, age\n FROM table1\n JOIN table2 ON table1.id = table2.id);\n\n根据 [dev.mysql.com 上的 Derived Tables](https://dev.mysql.com/doc/refman/8.0/en/derived-tables.html),别名是强制的。 您可以使用**引入别名**快速修复来添加别名。\n\n在应用快速修复后:\n\n SELECT id AS ID, name, cats, age\n FROM (SELECT table1.id, name, cats, age\n FROM table1\n JOIN table2 ON table1.id = table2.id);\n\nInspection ID: SqlDerivedTableAliasInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlDerivedTableAlias", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 40, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MsBuiltinInspection", + "shortDescription": { + "text": "内置函数" + }, + "fullDescription": { + "text": "报告 ISNULL 函数中字符串实参的截断。 ISNULL 语法是 'ISNULL(check_expression, replacement_value)'。 根据 docs.microsoft.com 上的 ISNULL,如果 'replacement_value' 比 'check_expression' 长,'replacement_value' 将被截断。 示例 (Microsoft SQL Server): 'DECLARE @name1 VARCHAR(2) = NULL;\nDECLARE @name2 VARCHAR(10) = 'Example';\nDECLARE @name3 VARCHAR(2) = 'Hi';\n\n -- `@name2` 是 VARCHAR(10) 并且将被截断\nSELECT ISNULL(@name1, @name2);\n\n -- `@name3` 是 VARCHAR(2)(作为 `@name1`)并且不会被截断\nSELECT ISNULL(@name1, @name3);' Inspection ID: MsBuiltinInspection", + "markdown": "报告 ISNULL 函数中字符串实参的截断。\n\nISNULL 语法是 `ISNULL(check_expression, replacement_value)`。\n\n根据 [docs.microsoft.com 上的 ISNULL](https://docs.microsoft.com/en-us/sql/t-sql/functions/isnull-transact-sql),如果 `replacement_value` 比 `check_expression` 长,`replacement_value` 将被截断。\n\n示例 (Microsoft SQL Server):\n\n DECLARE @name1 VARCHAR(2) = NULL;\n DECLARE @name2 VARCHAR(10) = 'Example';\n DECLARE @name3 VARCHAR(2) = 'Hi';\n\n -- `@name2` 是 VARCHAR(10) 并且将被截断\n SELECT ISNULL(@name1, @name2);\n\n -- `@name3` 是 VARCHAR(2)(作为 `@name1`)并且不会被截断\n SELECT ISNULL(@name1, @name3);\n\nInspection ID: MsBuiltinInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "MssqlBuiltin", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Unspecified" + } + }, + "relationships": [ + { + "target": { + "id": "SQL Server", + "index": 69, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlTriggerTransitionInspection", + "shortDescription": { + "text": "触发器中的可疑代码" + }, + "fullDescription": { + "text": "报告触发器中转换表变量的不正确用法。 示例 (HSQLDB): 'CREATE TABLE foo(a INT);\n\nCREATE TRIGGER trg\n AFTER DELETE ON foo\nBEGIN\n SELECT * FROM NEW;\nEND;\n\nCREATE TRIGGER trig AFTER INSERT ON foo\n REFERENCING OLD ROW AS newrow\n FOR EACH ROW WHEN (a > 1)\n INSERT INTO foo VALUES (1)' 在 HSQLDB 中,DELETE 触发器只能用于 OLD 状态,而 INSERT 触发器只能用于 NEW 状态。 因此,在前面的示例中,'SELECT * FROM NEW;' 中的 NEW 和 'REFERENCING OLD ROW AS newrow' 中的 OLD 将被高亮显示。 Inspection ID: SqlTriggerTransitionInspection", + "markdown": "报告触发器中转换表变量的不正确用法。\n\n示例 (HSQLDB):\n\n CREATE TABLE foo(a INT);\n\n CREATE TRIGGER trg\n AFTER DELETE ON foo\n BEGIN\n SELECT * FROM NEW;\n END;\n\n CREATE TRIGGER trig AFTER INSERT ON foo\n REFERENCING OLD ROW AS newrow\n FOR EACH ROW WHEN (a > 1)\n INSERT INTO foo VALUES (1)\n\n在 HSQLDB 中,DELETE 触发器只能用于 OLD 状态,而 INSERT 触发器只能用于 NEW 状态。 因此,在前面的示例中,`SELECT * FROM NEW;` 中的 NEW 和 `REFERENCING OLD ROW AS newrow` 中的 OLD 将被高亮显示。\n\nInspection ID: SqlTriggerTransitionInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlTriggerTransition", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 40, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlMultipleLimitClausesInspection", + "shortDescription": { + "text": "查询中的多个行限制/偏移子句" + }, + "fullDescription": { + "text": "报告单个查询中多个行限制子句的使用情况。 示例(Microsoft SQL 服务器): 'create table foo(a int);\nselect top 1 * from foo order by a offset 10 rows fetch next 20 rows only;' SELECT TOP 子句用于指定必须只返回 1 条记录。 FETCH 子句指定在处理完 OFFSET 子句后要返回的行数。 但是因为我们已经有了 SELECT TOP 限制子句,所以 FETCH 子句可能是冗余的。 Inspection ID: SqlMultipleLimitClausesInspection", + "markdown": "报告单个查询中多个行限制子句的使用情况。\n\n示例(Microsoft SQL 服务器):\n\n create table foo(a int);\n select top 1 * from foo order by a offset 10 rows fetch next 20 rows only;\n\nSELECT TOP 子句用于指定必须只返回 1 条记录。 FETCH 子句指定在处理完 OFFSET 子句后要返回的行数。 但是因为我们已经有了 SELECT TOP 限制子句,所以 FETCH 子句可能是冗余的。\n\nInspection ID: SqlMultipleLimitClausesInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlMultipleLimitClauses", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 40, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlNamedArgumentsInspection", + "shortDescription": { + "text": "应使用命名实参" + }, + "fullDescription": { + "text": "报告在例程调用中不带名称使用的实参。 默认情况下,此检查处于禁用状态。 有关命名形参和未命名形参之间差异的详细信息,请参阅 docs.microsoft.com 上的 Binding Parameters by Name (Named Parameters) 。 示例 (Microsoft SQL Server): 'CREATE FUNCTION foo(n INT, m INT) RETURNS INT AS\nBEGIN\n RETURN n + m;\nEND;\n\nCREATE PROCEDURE test AS\nBEGIN\n foo n = 1, m = 2;\n\n--- 以下调用缺少形参名称,会被高亮显示\n foo 1, 2;\nEND;' 'foo 1, 2;' 调用中的形参 '1, 2' 突出显示,因为它们缺少名称。 Inspection ID: SqlNamedArgumentsInspection", + "markdown": "报告在例程调用中不带名称使用的实参。 默认情况下,此检查处于禁用状态。\n\n有关命名形参和未命名形参之间差异的详细信息,请参阅 [docs.microsoft.com 上的 Binding Parameters by Name (Named Parameters)](https://docs.microsoft.com/en-us/sql/odbc/reference/develop-app/binding-parameters-by-name-named-parameters)。\n\n示例 (Microsoft SQL Server):\n\n CREATE FUNCTION foo(n INT, m INT) RETURNS INT AS\n BEGIN\n RETURN n + m;\n END;\n\n CREATE PROCEDURE test AS\n BEGIN\n foo n = 1, m = 2;\n\n --- 以下调用缺少形参名称,会被高亮显示\n foo 1, 2;\n END;\n\n`foo 1, 2;` 调用中的形参 `1, 2` 突出显示,因为它们缺少名称。\n\nInspection ID: SqlNamedArgumentsInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlNamedArguments", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 40, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlCaseVsCoalesceInspection", + "shortDescription": { + "text": "使用 CASE 代替 COALESCE 函数,反之亦然" + }, + "fullDescription": { + "text": "报告 CASE 和 COALESCE 调用可以互换的情况。 此检查具有以下意图操作:替换为 'COALESCE' 调用和相反的 替换为 CASE 表达式。 示例 (MySQL): 'SELECT\n -- this CASE may be replaced by COALESCE\n\tCASE\n\t\tWHEN C1 IS NOT NULL THEN C1\n\t\tELSE 0\n\t\tEND\nFROM dual;' 在该示例中,CASE 语句可以替换为 'SELECT COALESCE(C1, 0)',这会产生相同的结果。 如果您更喜欢使用 CASE 表达式,请在检查页面上选择 CASE 表达式优先于 COALESCE 函数选项。 Inspection ID: SqlCaseVsCoalesceInspection", + "markdown": "报告 CASE 和 COALESCE 调用可以互换的情况。 此检查具有以下意图操作:**替换为 'COALESCE' 调用** 和相反的 **替换为 CASE 表达式** 。\n\n示例 (MySQL):\n\n SELECT\n -- this CASE may be replaced by COALESCE\n \tCASE\n \t\tWHEN C1 IS NOT NULL THEN C1\n \t\tELSE 0\n \t\tEND\n FROM dual;\n\n在该示例中,CASE 语句可以替换为 `SELECT COALESCE(C1, 0)`,这会产生相同的结果。\n\n如果您更喜欢使用 CASE 表达式,请在检查页面上选择 **CASE 表达式优先于 COALESCE 函数**选项。\n\nInspection ID: SqlCaseVsCoalesceInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlCaseVsCoalesce", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 40, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlRedundantAliasInspection", + "shortDescription": { + "text": "冗余别名表达式" + }, + "fullDescription": { + "text": "报告可能与表中的列名重叠并且可能是冗余的别名表达式。 示例 (PostgreSQL): 'CREATE TABLE foo(a INT, b INT);\n\nSELECT * FROM foo foo(a, b);\nSELECT * FROM foo foo(a);\nSELECT * FROM foo foo(x);\nSELECT * FROM foo foo(x, y);' 前两个别名使用与 'foo' 表中相同的列名。 这些被认为是冗余的,因为列具有相同的名称。 Inspection ID: SqlRedundantAliasInspection", + "markdown": "报告可能与表中的列名重叠并且可能是冗余的别名表达式。\n\n示例 (PostgreSQL):\n\n CREATE TABLE foo(a INT, b INT);\n\n SELECT * FROM foo foo(a, b);\n SELECT * FROM foo foo(a);\n SELECT * FROM foo foo(x);\n SELECT * FROM foo foo(x, y);\n\n前两个别名使用与 `foo` 表中相同的列名。 这些被认为是冗余的,因为列具有相同的名称。\n\nInspection ID: SqlRedundantAliasInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlRedundantAlias", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 40, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlIdentifierInspection", + "shortDescription": { + "text": "标识符应加引号" + }, + "fullDescription": { + "text": "报告在查询中使用 SQL 预留关键字作为标识符名称时的情况。 示例 (Microsoft SQL Server): 'CREATE TABLE select (identity INT IDENTITY NOT NULL, order INT NOT NULL);' 我们使用 'select'、'identity' 和'order' 作为表名和列名。 但它们也是 Microsoft SQL Server 中的保留关键字。 因此,为了将它们用作查询中的对象名称,您必须用引号引用这些标识符。 要用引号引用它们,您可以使用为标识符加引号 快速修复。 在应用快速修复后: 'CREATE TABLE [select] ([identity] INT IDENTITY NOT NULL, [order] INT NOT NULL);' Inspection ID: SqlIdentifierInspection", + "markdown": "报告在查询中使用 SQL 预留关键字作为标识符名称时的情况。\n\n示例 (Microsoft SQL Server):\n\n CREATE TABLE select (identity INT IDENTITY NOT NULL, order INT NOT NULL);\n\n我们使用 `select`、`identity` 和`order` 作为表名和列名。\n但它们也是 Microsoft SQL Server 中的保留关键字。\n因此,为了将它们用作查询中的对象名称,您必须用引号引用这些标识符。 要用引号引用它们,您可以使用**为标识符加引号** 快速修复。\n\n在应用快速修复后:\n\n CREATE TABLE [select] ([identity] INT IDENTITY NOT NULL, [order] INT NOT NULL);\n\nInspection ID: SqlIdentifierInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlIdentifier", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 40, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlTransactionStatementInTriggerInspection", + "shortDescription": { + "text": "在触发器中使用事务管理语句" + }, + "fullDescription": { + "text": "报告触发器主体中事务管理语句(如 COMMIT 或 ROLLBACK)的用法。 在触发器主体中使用 COMMIT 或 ROLLBACK 语句时,触发器将不会编译。 发生错误是因为触发器在事务中间触发。 当触发器启动时,当前事务仍未完成。 因为 COMMIT 会终止事务,这两个语句(COMMIT 和 ROLLBACK)都会导致异常。 在触发器中执行的更改应该由启动触发器的所属事务提交(或回滚)。 示例(Oracle): 'CREATE TABLE employee_audit\n(\n id INT NOT NULL,\n update_date DATE NOT NULL,\n old_name VARCHAR2(100),\n new_name VARCHAR2(100)\n);\n\nCREATE TABLE employees\n(\n id INT NOT NULL,\n name VARCHAR2(100) NOT NULL\n);\n\nCREATE OR REPLACE TRIGGER trig_commit\n AFTER UPDATE OF name\n ON employees\n FOR EACH ROW\nBEGIN\n INSERT INTO employee_audit VALUES (:old.id, SYSDATE, :old.name, :new.name);\n COMMIT;\nEND;\n\nCREATE OR REPLACE TRIGGER trig_rollback\n AFTER UPDATE OF name\n ON employees\n FOR EACH ROW\nBEGIN\n INSERT INTO employee_audit VALUES (:old.id, SYSDATE, :old.name, :new.name);\n ROLLBACK;\nEND;' Inspection ID: SqlTransactionStatementInTriggerInspection", + "markdown": "报告触发器主体中事务管理语句(如 COMMIT 或 ROLLBACK)的用法。\n\n在触发器主体中使用 COMMIT 或 ROLLBACK 语句时,触发器将不会编译。\n发生错误是因为触发器在事务中间触发。 当触发器启动时,当前事务仍未完成。 因为 COMMIT 会终止事务,这两个语句(COMMIT 和 ROLLBACK)都会导致异常。\n在触发器中执行的更改应该由启动触发器的所属事务提交(或回滚)。\n\n示例(Oracle):\n\n CREATE TABLE employee_audit\n (\n id INT NOT NULL,\n update_date DATE NOT NULL,\n old_name VARCHAR2(100),\n new_name VARCHAR2(100)\n );\n\n CREATE TABLE employees\n (\n id INT NOT NULL,\n name VARCHAR2(100) NOT NULL\n );\n\n CREATE OR REPLACE TRIGGER trig_commit\n AFTER UPDATE OF name\n ON employees\n FOR EACH ROW\n BEGIN\n INSERT INTO employee_audit VALUES (:old.id, SYSDATE, :old.name, :new.name);\n COMMIT;\n END;\n\n CREATE OR REPLACE TRIGGER trig_rollback\n AFTER UPDATE OF name\n ON employees\n FOR EACH ROW\n BEGIN\n INSERT INTO employee_audit VALUES (:old.id, SYSDATE, :old.name, :new.name);\n ROLLBACK;\n END;\n\nInspection ID: SqlTransactionStatementInTriggerInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlTransactionStatementInTrigger", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 40, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlRedundantCodeInCoalesceInspection", + "shortDescription": { + "text": "COALESCE 调用中的冗余代码" + }, + "fullDescription": { + "text": "报告除 COALESCE 函数中第一个不评估为 NULL 的表达式之外的所有实参。 示例 (MySQL): 'SELECT COALESCE(NULL, NULL, NULL, 42, NULL, 'string') as a;' 第一个 NOT NULL 实参是 '42',所有其他实参将显示为灰色。 Inspection ID: SqlRedundantCodeInCoalesceInspection", + "markdown": "报告除 COALESCE 函数中第一个不评估为 NULL 的表达式之外的所有实参。\n\n示例 (MySQL):\n\n SELECT COALESCE(NULL, NULL, NULL, 42, NULL, 'string') as a;\n\n第一个 NOT NULL 实参是 `42`,所有其他实参将显示为灰色。\n\nInspection ID: SqlRedundantCodeInCoalesceInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlRedundantCodeInCoalesce", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 40, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlStorageInspection", + "shortDescription": { + "text": "SQL 源修改检测" + }, + "fullDescription": { + "text": "报告数据库对象的源代码已更改的情况。 执行数据库或对象内省时会触发检查。 当您打开对象的源代码、运行语句和执行代码重构时,就会运行内省。 此外,您可以通过右键点击对象并选择刷新来运行内省。 检查包括以下几种情况: 数据库中的对象源代码已更改,但编辑器中的代码未更新。 适用于 PostgreSQL、Microsoft SQL Server、Oracle 和 Sybase ASE。 您更改了对象源代码,内省了数据库,但源代码已被其他人更改。 IDE 中的数据库内省器已更新,您需要下载先前内省器版本中缺少的新对象属性。 Inspection ID: SqlStorageInspection", + "markdown": "报告数据库对象的源代码已更改的情况。\n\n执行数据库或对象内省时会触发检查。 当您打开对象的源代码、运行语句和执行代码重构时,就会运行内省。\n此外,您可以通过右键点击对象并选择**刷新**来运行内省。\n\n检查包括以下几种情况:\n\n* 数据库中的对象源代码已更改,但编辑器中的代码未更新。 适用于 PostgreSQL、Microsoft SQL Server、Oracle 和 Sybase ASE。\n* 您更改了对象源代码,内省了数据库,但源代码已被其他人更改。\n* IDE 中的数据库内省器已更新,您需要下载先前内省器版本中缺少的新对象属性。\n\nInspection ID: SqlStorageInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlStorageInspection", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Unspecified" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 40, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MsOrderByInspection", + "shortDescription": { + "text": "查询中的 ORDER BY" + }, + "fullDescription": { + "text": "报告在视图、内联函数、派生表、子查询和通用表表达式中使用 'ORDER BY' 子句而不使用 'TOP'、'OFFSET' 或 'FOR XML' 的用法。 有关 'ORDER BY' 用法的详细信息,请参阅 docs.microsoft.com 上的 SELECT - ORDER BY 子句 (Transact-SQL)。 示例(Microsoft SQL Server): 'CREATE TABLE foo (a INT NOT NULL, b INT NOT NULL);\n\nSELECT *\nFROM (SELECT a, b\nFROM foo A\nWHERE a < 89\nORDER BY b) ALIAS;' 在子查询中,ORDER BY 将被高亮显示为错误。 您可以将 TOP、OFFSET 或 FOR XML 添加到子查询。 或者,使用删除元素快速修复来删除 ORDER BY 部分。 在应用快速修复后: 'SELECT *\nFROM (SELECT a, b\nFROM foo A\nWHERE a < 89) ALIAS;' Inspection ID: MsOrderByInspection", + "markdown": "报告在视图、内联函数、派生表、子查询和通用表表达式中使用 `ORDER BY` 子句而不使用 `TOP`、`OFFSET` 或 `FOR XML` 的用法。\n\n有关 `ORDER BY` 用法的详细信息,请参阅 [docs.microsoft.com 上的 SELECT - ORDER BY 子句 (Transact-SQL)](https://docs.microsoft.com/en-us/sql/t-sql/queries/select-order-by-clause-transact-sql)。\n\n示例(Microsoft SQL Server):\n\n CREATE TABLE foo (a INT NOT NULL, b INT NOT NULL);\n\n SELECT *\n FROM (SELECT a, b\n FROM foo A\n WHERE a < 89\n ORDER BY b) ALIAS;\n\n在子查询中,ORDER BY 将被高亮显示为错误。 您可以将 TOP、OFFSET 或 FOR XML 添加到子查询。\n或者,使用**删除元素**快速修复来删除 ORDER BY 部分。\n\n在应用快速修复后:\n\n SELECT *\n FROM (SELECT a, b\n FROM foo A\n WHERE a < 89) ALIAS;\n\nInspection ID: MsOrderByInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "MsOrderBy", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Unspecified" + } + }, + "relationships": [ + { + "target": { + "id": "SQL Server", + "index": 69, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlSignatureInspection", + "shortDescription": { + "text": "函数签名" + }, + "fullDescription": { + "text": "报告内置函数的签名问题。 检查将报告错误数量的实参、无效的关键字、错误的数据类型和其他问题。 示例(MySQL): 'CREATE TABLE foo (a INT, b INT, c INT)\n\nSELECT IFNULL() FROM foo; -- 错误\nSELECT IFNULL(a) FROM foo; -- 错误\nSELECT IFNULL(a, b) FROM foo; -- 正确\nSELECT IFNULL(a, b, c) FROM foo; -- 错误' 在 MySQL 中,'IFNULL()' 函数严格接受两个实参。 因此,只有 'SELECT IFNULL(a, b) FROM foo;' 查询是正确的。 Inspection ID: SqlSignatureInspection", + "markdown": "报告内置函数的签名问题。\n\n检查将报告错误数量的实参、无效的关键字、错误的数据类型和其他问题。\n\n示例(MySQL):\n\n CREATE TABLE foo (a INT, b INT, c INT)\n\n SELECT IFNULL() FROM foo; -- 错误\n SELECT IFNULL(a) FROM foo; -- 错误\n SELECT IFNULL(a, b) FROM foo; -- 正确\n SELECT IFNULL(a, b, c) FROM foo; -- 错误\n\n在 MySQL 中,`IFNULL()` 函数严格接受两个实参。 因此,只有 `SELECT IFNULL(a, b) FROM foo;` 查询是正确的。\n\nInspection ID: SqlSignatureInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlSignature", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 40, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlRedundantOrderingDirectionInspection", + "shortDescription": { + "text": "冗余排序方向" + }, + "fullDescription": { + "text": "在 ORDER BY 子句中报告冗余的排序方向,如 ASC 和 DESC。 示例 (MySQL): 'CREATE TABLE foo(a INT, b INT, c INT);\nSELECT * FROM foo ORDER BY a ASC, b DESC, c ASC;' ORDER BY 关键字默认按升序对记录进行排序。 因此,'a' 和 'c' 列的 'ASC' 关键字是冗余的。 Inspection ID: SqlRedundantOrderingDirectionInspection", + "markdown": "在 ORDER BY 子句中报告冗余的排序方向,如 ASC 和 DESC。\n\n示例 (MySQL):\n\n CREATE TABLE foo(a INT, b INT, c INT);\n SELECT * FROM foo ORDER BY a ASC, b DESC, c ASC;\n\nORDER BY 关键字默认按升序对记录进行排序。 因此,`a` 和 `c` 列的 `ASC` 关键字是冗余的。\n\nInspection ID: SqlRedundantOrderingDirectionInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlRedundantOrderingDirection", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 40, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlDeprecateTypeInspection", + "shortDescription": { + "text": "弃用的类型" + }, + "fullDescription": { + "text": "报告已弃用并且可能在 DBMS 的未来版本中消失的类型的用法。 报告的类型: Oracle 中的 LONG(请参阅 docs.oracle.com 上的 Deprecated and Desupported Features 页面)。 Microsoft SQL Server 中的 TEXT、NTEXT 和 IMAGE(请参阅 docs.microsoft.com 上的 Deprecated Database Engine Features in SQL Server 2016 页面)。 示例 (Oracle): 'CREATE TABLE ot.foo(\na NUMBER GENERATED BY DEFAULT AS IDENTITY,\nb LONG NOT NULL\n);' Inspection ID: SqlDeprecateTypeInspection", + "markdown": "报告已弃用并且可能在 DBMS 的未来版本中消失的类型的用法。\n\n报告的类型:\n\n* Oracle 中的 LONG(请参阅 [docs.oracle.com 上的 Deprecated and Desupported Features](https://docs.oracle.com/cd/A91202_01/901_doc/server.901/a90120/ch4_dep.htm#6690) 页面)。\n* Microsoft SQL Server 中的 TEXT、NTEXT 和 IMAGE(请参阅 [docs.microsoft.com 上的 Deprecated Database Engine Features in SQL Server 2016](https://docs.microsoft.com/en-us/sql/database-engine/deprecated-database-engine-features-in-sql-server-2016?view=sql-server-ver15) 页面)。\n\n示例 (Oracle):\n\n CREATE TABLE ot.foo(\n a NUMBER GENERATED BY DEFAULT AS IDENTITY,\n b LONG NOT NULL\n );\n\nInspection ID: SqlDeprecateTypeInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlDeprecateType", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 40, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlAggregatesInspection", + "shortDescription": { + "text": "与聚合相关的问题" + }, + "fullDescription": { + "text": "报告 SQL 聚合函数的无效用法。 即以下情况: 在 HAVING 和 ORDER BY 子句中使用但在 GROUP BY 子句中遗漏的列。 'CREATE TABLE foo(id INT PRIMARY KEY, a INT, b INT);\nSELECT a, MAX(b) FROM foo GROUP BY a HAVING b > 0;\nSELECT * FROM foo GROUP BY a ORDER BY b;' 当按主键进行分组时,此规则不适用。 'SELECT * FROM foo GROUP BY id ORDER BY b;' 在错误的上下文中聚合函数。 通常,您可以在以下上下文中使用聚合函数: SELECT 中的表达式列表; 在 HAVING 和 ORDER BY 部分; 和其他特定于方言的案例。 以下查询将显示错误。 'SELECT a FROM foo WHERE MAX(b) > 0;\nSELECT a FROM foo GROUP BY MAX(a);' 聚合函数的嵌套调用。 'SELECT MAX(SUM(a)) FROM foo GROUP BY a;' 此规则不适用于解析函数。 以下查询有效且正确。 'SELECT MAX(SUM(a) OVER ()) FROM foo;' 没有聚合函数的 HAVING 的用法。 在这种情况下,请考虑使用 WHERE 部分重写您的代码。 'SELECT a, MAX(b) FROM foo GROUP BY a HAVING a > 0;' Inspection ID: SqlAggregatesInspection", + "markdown": "报告 SQL 聚合函数的无效用法。\n\n即以下情况:\n\n* 在 HAVING 和 ORDER BY 子句中使用但在 GROUP BY 子句中遗漏的列。\n\n CREATE TABLE foo(id INT PRIMARY KEY, a INT, b INT);\n SELECT a, MAX(b) FROM foo GROUP BY a HAVING b > 0;\n SELECT * FROM foo GROUP BY a ORDER BY b;\n\n 当按主键进行分组时,此规则不适用。\n\n SELECT * FROM foo GROUP BY id ORDER BY b;\n\n* 在错误的上下文中聚合函数。 通常,您可以在以下上下文中使用聚合函数: SELECT 中的表达式列表; 在 HAVING 和 ORDER BY 部分; 和其他特定于方言的案例。 以下查询将显示错误。\n\n SELECT a FROM foo WHERE MAX(b) > 0;\n SELECT a FROM foo GROUP BY MAX(a);\n\n* 聚合函数的嵌套调用。\n\n SELECT MAX(SUM(a)) FROM foo GROUP BY a;\n\n 此规则不适用于解析函数。 以下查询有效且正确。\n\n SELECT MAX(SUM(a) OVER ()) FROM foo;\n\n* 没有聚合函数的 HAVING 的用法。 在这种情况下,请考虑使用 WHERE 部分重写您的代码。\n\n SELECT a, MAX(b) FROM foo GROUP BY a HAVING a > 0;\n\nInspection ID: SqlAggregatesInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlAggregates", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 40, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlConstantExpressionInspection", + "shortDescription": { + "text": "常量表达式" + }, + "fullDescription": { + "text": "报告始终为 true、false 或 null 的条件和表达式。 示例 (MySQL): 'CREATE TABLE t1 (a TEXT, b INT, c BOOLEAN);\nSELECT a FROM t1 WHERE 'Cat' = 'Cat';\nSELECT a FROM t1 WHERE 'Cat' = null;' ''Cat' = 'Cat'' 始终为 true,将被报告。 ''Cat' = null' 始终为 null,将被报告。 Inspection ID: SqlConstantExpressionInspection", + "markdown": "报告始终为 true、false 或 null 的条件和表达式。\n\n示例 (MySQL):\n\n CREATE TABLE t1 (a TEXT, b INT, c BOOLEAN);\n SELECT a FROM t1 WHERE 'Cat' = 'Cat';\n SELECT a FROM t1 WHERE 'Cat' = null;\n\n`'Cat' = 'Cat'` 始终为 true,将被报告。\n\n`'Cat' = null` 始终为 null,将被报告。\n\nInspection ID: SqlConstantExpressionInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlConstantExpression", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 40, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlMissingColumnAliasesInspection", + "shortDescription": { + "text": "缺少列别名" + }, + "fullDescription": { + "text": "报告在输出表达式中没有显式别名的查询(例如,在 SELECT 语句中)。 示例(PostgreSQL): 'CREATE TABLE foo(a INT, b INT);\n\nSELECT 1, a + 1 AS A2, MAX(b) AS M\nFROM foo;' Inspection ID: SqlMissingColumnAliasesInspection", + "markdown": "报告在输出表达式中没有显式别名的查询(例如,在 SELECT 语句中)。\n\n示例(PostgreSQL):\n\n CREATE TABLE foo(a INT, b INT);\n\n SELECT 1, a + 1 AS A2, MAX(b) AS M\n FROM foo;\n\nInspection ID: SqlMissingColumnAliasesInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlMissingColumnAliases", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 40, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlAddNotNullColumnInspection", + "shortDescription": { + "text": "添加没有默认值的非 null 列" + }, + "fullDescription": { + "text": "报告创建没有 DEFAULT 值的 NOT NULL 列的尝试。 示例 (Microsoft SQL Server): 'CREATE TABLE foo (a INT, b INT)\n\nALTER TABLE foo ADD c INT NOT NULL;' 默认情况下,列包含 NULL 值。 在示例中,我们使用 NOT NULL 约束强制列不接受 NULL 值。 如果我们禁止使用 NULL 值,则必须设置 SQL 在创建新记录时可以使用的 DEFAULT 值。 'ALTER TABLE foo ADD c INT NOT NULL DEFAULT 42;' 您可以使用添加 DEFAULT 值快速修复快速添加 DEFAULT 值。 Inspection ID: SqlAddNotNullColumnInspection", + "markdown": "报告创建没有 DEFAULT 值的 NOT NULL 列的尝试。\n\n示例 (Microsoft SQL Server):\n\n CREATE TABLE foo (a INT, b INT)\n\n ALTER TABLE foo ADD c INT NOT NULL;\n\n默认情况下,列包含 NULL 值。 在示例中,我们使用 NOT NULL 约束强制列不接受 NULL 值。\n如果我们禁止使用 NULL 值,则必须设置 SQL 在创建新记录时可以使用的 DEFAULT 值。\n\n ALTER TABLE foo ADD c INT NOT NULL DEFAULT 42;\n\n您可以使用**添加 DEFAULT 值**快速修复快速添加 DEFAULT 值。\n\nInspection ID: SqlAddNotNullColumnInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlAddNotNullColumn", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 40, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "OraOverloadInspection", + "shortDescription": { + "text": "重载错误" + }, + "fullDescription": { + "text": "报告 Oracle 中子程序重载的无效情况。 示例 (Oracle): 'DECLARE\n SUBTYPE fff IS BINARY_INTEGER;\n SUBTYPE ggg IS NATURAL;\n PROCEDURE foo (a IN ggg) IS BEGIN NULL; END;\n PROCEDURE foo (a IN fff) IS BEGIN NULL; END;\nBEGIN\n NULL;\nEND;' 您不能重载形参仅在子类型方面不同的子程序。 例如,您不能重载一个接受 BINARY INTEGER 形参而另一个接受 NATURAL 形参的过程。 有关过程重载限制的更多信息,请参阅 docs.oracle.com 上的 Restrictions on Overloading。 Inspection ID: OraOverloadInspection", + "markdown": "报告 Oracle 中子程序重载的无效情况。\n\n示例 (Oracle):\n\n DECLARE\n SUBTYPE fff IS BINARY_INTEGER;\n SUBTYPE ggg IS NATURAL;\n PROCEDURE foo (a IN ggg) IS BEGIN NULL; END;\n PROCEDURE foo (a IN fff) IS BEGIN NULL; END;\n BEGIN\n NULL;\n END;\n\n您不能重载形参仅在子类型方面不同的子程序。 例如,您不能重载一个接受 BINARY INTEGER 形参而另一个接受 NATURAL 形参的过程。 有关过程重载限制的更多信息,请参阅 [docs.oracle.com 上的 Restrictions on Overloading](https://docs.oracle.com/cd/B19306_01/appdev.102/b14261/subprograms.htm)。\n\nInspection ID: OraOverloadInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlOverload", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Unspecified" + } + }, + "relationships": [ + { + "target": { + "id": "Oracle", + "index": 73, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "OraMissingBodyInspection", + "shortDescription": { + "text": "缺少软件包/对象类型规范的主体" + }, + "fullDescription": { + "text": "报告缺少主体声明的软件包和对象类型规范。 声明例程的软件包规范和对象类型以及带有光标的软件包规范必须具有实现这些例程和光标的主体声明。 在程序代码中调用例程或光标时,缺少主体会导致运行时错误。 示例 (Oracle): 'CREATE OR REPLACE PACKAGE ppp IS\n FUNCTION foo(a INT) RETURN INT;\nEND;' Inspection ID: OraMissingBodyInspection", + "markdown": "报告缺少主体声明的软件包和对象类型规范。\n\n声明例程的软件包规范和对象类型以及带有光标的软件包规范必须具有实现这些例程和光标的主体声明。 在程序代码中调用例程或光标时,缺少主体会导致运行时错误。\n\n示例 (Oracle):\n\n CREATE OR REPLACE PACKAGE ppp IS\n FUNCTION foo(a INT) RETURN INT;\n END;\n\nInspection ID: OraMissingBodyInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlMissingBody", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "Oracle", + "index": 73, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "OraUnmatchedForwardDeclarationInspection", + "shortDescription": { + "text": "不含定义的前向声明" + }, + "fullDescription": { + "text": "报告在代码中缺少实现的过程和函数的声明。 在 Oracle 中,您可以声明一个没有主体的过程或函数,并在稍后的某个时间编写实现。 该检查将报告未实现的此类过程或函数的名称。 示例 (Oracle): 'DECLARE PROCEDURE foo(a int, b varchar2);\nBEGIN\n NULL;\nEND;' 'foo' 过程已被声明,但缺少实现。 我们可以添加实现来消除错误。 'DECLARE PROCEDURE foo(a int, b varchar2);\n PROCEDURE foo(a int, b varchar2) IS\nBEGIN\n NULL;\nEND;\nBEGIN\n NULL;\nEND;' Inspection ID: OraUnmatchedForwardDeclarationInspection", + "markdown": "报告在代码中缺少实现的过程和函数的声明。\n\n在 Oracle 中,您可以声明一个没有主体的过程或函数,并在稍后的某个时间编写实现。 该检查将报告未实现的此类过程或函数的名称。\n\n示例 (Oracle):\n\n DECLARE PROCEDURE foo(a int, b varchar2);\n BEGIN\n NULL;\n END;\n\n`foo` 过程已被声明,但缺少实现。 我们可以添加实现来消除错误。\n\n DECLARE PROCEDURE foo(a int, b varchar2);\n PROCEDURE foo(a int, b varchar2) IS\n BEGIN\n NULL;\n END;\n BEGIN\n NULL;\n END;\n\nInspection ID: OraUnmatchedForwardDeclarationInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "SqlUnmatchedForwardDeclaration", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "Oracle", + "index": 73, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MongoJSExtResolveInspection", + "shortDescription": { + "text": "解析问题" + }, + "fullDescription": { + "text": "报告 MongoDB 和 JavaScript 代码中未解析的引用。 Inspection ID: MongoJSExtResolveInspection", + "markdown": "报告 MongoDB 和 JavaScript 代码中未解析的引用。\n\nInspection ID: MongoJSExtResolveInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "MongoJSResolve", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "MongoJS", + "index": 17, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlGotoInspection", + "shortDescription": { + "text": "使用 GOTO 语句" + }, + "fullDescription": { + "text": "报告后向 GOTO 语句和用于退出循环的 GOTO 语句的用法。 通常不推荐大量使用 GOTO 语句。 有关详细信息,请参阅 ibm.com 上的 GOTO statement in SQL procedures。 考虑使用循环而不是使用 GOTO 返回到上一条语句。 考虑使用另一个流控制语句,例如 RETURN 或 BREAK,而不是使用 GOTO 退出 WHILE 循环。 示例 (Oracle): 'CREATE PROCEDURE test(n INT) AS\nDECLARE\n x INT;\nBEGIN\n x := 0;\n GOTO a;\n <> x := 1;\n IF (n = 0) THEN\n GOTO a;\n END IF;\n WHILE TRUE\n LOOP\n GOTO b;\n END LOOP;\n <> x := 3;\nEND;' Inspection ID: SqlGotoInspection", + "markdown": "报告后向 GOTO 语句和用于退出循环的 GOTO 语句的用法。\n\n通常不推荐大量使用 GOTO 语句。 有关详细信息,请参阅 [ibm.com 上的 GOTO statement in SQL procedures](https://www.ibm.com/docs/no/db2/11.5?topic=procedures-goto-statement-in-sql)。\n\n考虑使用循环而不是使用 GOTO 返回到上一条语句。\n\n考虑使用另一个流控制语句,例如 RETURN 或 BREAK,而不是使用 GOTO 退出 WHILE 循环。\n\n示例 (Oracle):\n\n CREATE PROCEDURE test(n INT) AS\n DECLARE\n x INT;\n BEGIN\n x := 0;\n GOTO a;\n <> x := 1;\n IF (n = 0) THEN\n GOTO a;\n END IF;\n WHILE TRUE\n LOOP\n GOTO b;\n END LOOP;\n <> x := 3;\n END;\n\nInspection ID: SqlGotoInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlGoto", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 40, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlWithoutWhereInspection", + "shortDescription": { + "text": "不带 where 子句的删除或更新语句" + }, + "fullDescription": { + "text": "报告不带 WHERE 子句的 DELETE 或 UPDATE 语句的用法。 如果没有 WHERE 子句,DELETE 会删除表中的所有数据,而 UPDATE 会覆盖所有表行的值。 示例 (MySQL): 'CREATE TABLE t1 (a TEXT, b INT, c BOOLEAN);\nupdate t1 set a = 'Smith';\ndelete from t1;' Inspection ID: SqlWithoutWhereInspection", + "markdown": "报告不带 WHERE 子句的 DELETE 或 UPDATE 语句的用法。\n\n如果没有 WHERE 子句,DELETE 会删除表中的所有数据,而 UPDATE 会覆盖所有表行的值。\n\n示例 (MySQL):\n\n CREATE TABLE t1 (a TEXT, b INT, c BOOLEAN);\n update t1 set a = 'Smith';\n delete from t1;\n\nInspection ID: SqlWithoutWhereInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlWithoutWhere", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 40, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlAmbiguousColumnInspection", + "shortDescription": { + "text": "不明确的引用" + }, + "fullDescription": { + "text": "报告名称相同但属于不同表的列。 示例 (MySQL): 'CREATE TABLE foo(id INT PRIMARY KEY);\nCREATE TABLE bar(id INT PRIMARY KEY);\n\nSELECT foo.id, bar.id FROM foo, bar WHERE id > 0;' 'id' 列出现在 'foo' 和 'bar' 表中。 您需要限定列名以使查询正确。 'SELECT foo.id, bar.id FROM foo, bar WHERE foo.id > 0;' Inspection ID: SqlAmbiguousColumnInspection", + "markdown": "报告名称相同但属于不同表的列。\n\n示例 (MySQL):\n\n CREATE TABLE foo(id INT PRIMARY KEY);\n CREATE TABLE bar(id INT PRIMARY KEY);\n\n SELECT foo.id, bar.id FROM foo, bar WHERE id > 0;\n\n`id` 列出现在 `foo` 和 `bar` 表中。 您需要限定列名以使查询正确。\n\n SELECT foo.id, bar.id FROM foo, bar WHERE foo.id > 0;\n\nInspection ID: SqlAmbiguousColumnInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlAmbiguousColumn", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 40, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SqlUnusedCteInspection", + "shortDescription": { + "text": "未使用的通用表表达式" + }, + "fullDescription": { + "text": "报告查询中未使用的通用表表达式 (CTE)。 示例 (PostgreSQL): 'CREATE TABLE foo(a INT);\n\nWITH a AS (SELECT 1 AS x FROM foo)\nSELECT 1 + 2 FROM foo;' 通过使用 WITH,我们创建了一个名为 'a' 的临时命名结果集,也称为通用表表达式 (CTE)。 但是,我们稍后不会在代码中使用此 CTE。 未使用的 CTE 显示为灰色。 Inspection ID: SqlUnusedCteInspection", + "markdown": "报告查询中未使用的通用表表达式 (CTE)。\n\n示例 (PostgreSQL):\n\n CREATE TABLE foo(a INT);\n\n WITH a AS (SELECT 1 AS x FROM foo)\n SELECT 1 + 2 FROM foo;\n\n通过使用 WITH,我们创建了一个名为 `a` 的临时命名结果集,也称为通用表表达式 (CTE)。 但是,我们稍后不会在代码中使用此 CTE。 未使用的 CTE 显示为灰色。\n\nInspection ID: SqlUnusedCteInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SqlUnusedCte", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "SQL", + "index": 40, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MongoJSResolveInspection", + "shortDescription": { + "text": "解析问题" + }, + "fullDescription": { + "text": "报告 MongoDB 和 JavaScript 代码中未解析的引用。 示例: 'db\nuse foo\n -- a reference to a non-existing collection\ndb.non_existing_collection\ndb['non_existing_collection']\ndb['non_existing_collection'].find().hasNext()' 'non_existing_collection' 集合在数据库中不存在,将被报告。 Inspection ID: MongoJSResolveInspection", + "markdown": "报告 MongoDB 和 JavaScript 代码中未解析的引用。\n\n示例:\n\n db\n use foo\n -- a reference to a non-existing collection\n db.non_existing_collection\n db['non_existing_collection']\n db['non_existing_collection'].find().hasNext()\n\n`non_existing_collection` 集合在数据库中不存在,将被报告。\n\nInspection ID: MongoJSResolveInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "MongoJSResolve", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "MongoJS", + "index": 17, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "org.intellij.plugins.markdown", + "version": "261.26222.73", + "rules": [ + { + "id": "MarkdownOutdatedTableOfContents", + "shortDescription": { + "text": "过期的目录部分" + }, + "fullDescription": { + "text": "检查特定目录部分是否与文档的实际结构相对应。 Inspection ID: MarkdownOutdatedTableOfContents", + "markdown": "检查特定目录部分是否与文档的实际结构相对应。\n\nInspection ID: MarkdownOutdatedTableOfContents" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "MarkdownOutdatedTableOfContents", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "Markdown", + "index": 23, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MarkdownUnresolvedLinkLabel", + "shortDescription": { + "text": "未解析的链接标签" + }, + "fullDescription": { + "text": "报告 Markdown 文件中的未解析链接标签。 Inspection ID: MarkdownUnresolvedLinkLabel", + "markdown": "报告 Markdown 文件中的未解析链接标签。\n\nInspection ID: MarkdownUnresolvedLinkLabel" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "MarkdownUnresolvedLinkLabel", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "Markdown", + "index": 23, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MarkdownIncorrectTableFormatting", + "shortDescription": { + "text": "表格式设置不正确" + }, + "fullDescription": { + "text": "检查表的格式是否正确。 Inspection ID: MarkdownIncorrectTableFormatting", + "markdown": "检查表的格式是否正确。\n\nInspection ID: MarkdownIncorrectTableFormatting" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "MarkdownIncorrectTableFormatting", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "Markdown", + "index": 23, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MarkdownIncorrectlyNumberedListItem", + "shortDescription": { + "text": "列表项编号错误" + }, + "fullDescription": { + "text": "排序列表条目应从 1 开始连续编号。 这背后的动机是,大多数 Markdown 处理器都会忽略有序列表的编号。 处理器将为此类列表生成 '
    ' 元素,该元素将从 1 开始对条目进行连续编号。 Inspection ID: MarkdownIncorrectlyNumberedListItem", + "markdown": "排序列表条目应从 1 开始连续编号。\n\n这背后的动机是,大多数 Markdown 处理器都会忽略有序列表的编号。 处理器将为此类列表生成 `
      ` 元素,该元素将从 1 开始对条目进行连续编号。\n\nInspection ID: MarkdownIncorrectlyNumberedListItem" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "MarkdownIncorrectlyNumberedListItem", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "Markdown", + "index": 23, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MarkdownLinkDestinationWithSpaces", + "shortDescription": { + "text": "链接不应包含空格" + }, + "fullDescription": { + "text": "为确保不同工具之间的一致性,文件链接不应包含空格。 示例: '[Some file link](some file.md)' 快速修复会将空格替换为它们的 URL 编码等效项: '[Some file link](some%20file.md)' Inspection ID: MarkdownLinkDestinationWithSpaces", + "markdown": "为确保不同工具之间的一致性,文件链接不应包含空格。\n\n**示例:**\n\n\n [Some file link](some file.md)\n\n快速修复会将空格替换为它们的 URL 编码等效项:\n\n\n [Some file link](some%20file.md)\n\nInspection ID: MarkdownLinkDestinationWithSpaces" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "MarkdownLinkDestinationWithSpaces", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "Markdown", + "index": 23, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MarkdownNoTableBorders", + "shortDescription": { + "text": "表没有边框" + }, + "fullDescription": { + "text": "检查表是否有正确的边框。 出于兼容性原因,所有表行的开头和结尾都应该有边框(管道符号)。 Inspection ID: MarkdownNoTableBorders", + "markdown": "检查表是否有正确的边框。 出于兼容性原因,所有表行的开头和结尾都应该有边框(管道符号)。\n\nInspection ID: MarkdownNoTableBorders" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "MarkdownNoTableBorders", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "Markdown", + "index": 23, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MarkdownUnresolvedFileReference", + "shortDescription": { + "text": "未解析的文件引用" + }, + "fullDescription": { + "text": "报告 Markdown 文件中的未解析文件引用。 Inspection ID: MarkdownUnresolvedFileReference", + "markdown": "报告 Markdown 文件中的未解析文件引用。\n\nInspection ID: MarkdownUnresolvedFileReference" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "MarkdownUnresolvedFileReference", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "Markdown", + "index": 23, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MarkdownUnresolvedHeaderReference", + "shortDescription": { + "text": "未解析的头引用" + }, + "fullDescription": { + "text": "报告 Markdown 文件中的未解析头引用。 Inspection ID: MarkdownUnresolvedHeaderReference", + "markdown": "报告 Markdown 文件中的未解析头引用。\n\nInspection ID: MarkdownUnresolvedHeaderReference" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "MarkdownUnresolvedHeaderReference", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "Markdown", + "index": 23, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "com.jetbrains.edu", + "version": "2026.6-2026.1-630", + "rules": [ + { + "id": "StudyItemNotFound", + "shortDescription": { + "text": "找不到任务、课次或小节" + }, + "fullDescription": { + "text": "报告 'course-info.yaml'、'section-info.yaml' 和 'lesson-info.yaml' 文件中与本地文件系统中的任何目录都不对应的路径 Inspection ID: StudyItemNotFound", + "markdown": "报告 `course-info.yaml`、`section-info.yaml` 和 `lesson-info.yaml` 文件中与本地文件系统中的任何目录都不对应的路径\n\nInspection ID: StudyItemNotFound" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "StudyItemNotFound", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Unspecified" + } + }, + "relationships": [ + { + "target": { + "id": "JetBrains Academy/Yaml 配置", + "index": 25, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "AdditionalFileNotFound", + "shortDescription": { + "text": "找不到附加文件" + }, + "fullDescription": { + "text": "报告附加文件列表中 'course-info.yaml' 内指定的路径与本地文件系统中的任何现有文件不对应的情况。 Inspection ID: AdditionalFileNotFound", + "markdown": "报告附加文件列表中 `course-info.yaml` 内指定的路径与本地文件系统中的任何现有文件不对应的情况。\n\nInspection ID: AdditionalFileNotFound" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "AdditionalFileNotFound", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Unspecified" + } + }, + "relationships": [ + { + "target": { + "id": "JetBrains Academy/Yaml 配置", + "index": 25, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "UnsupportedLanguageVersion", + "shortDescription": { + "text": "不支持的编程语言" + }, + "fullDescription": { + "text": "报告课程中不正确的编程语言。 Inspection ID: UnsupportedLanguageVersion", + "markdown": "报告课程中不正确的编程语言。\n\nInspection ID: UnsupportedLanguageVersion" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "UnsupportedLanguageVersion", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Unspecified" + } + }, + "relationships": [ + { + "target": { + "id": "JetBrains Academy/Yaml 配置", + "index": 25, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "TaskFileNotFound", + "shortDescription": { + "text": "找不到任务文件" + }, + "fullDescription": { + "text": "报告 'task-info.yaml' 中与本地文件系统中的任何文件都不对应的路径 Inspection ID: TaskFileNotFound", + "markdown": "报告 `task-info.yaml` 中与本地文件系统中的任何文件都不对应的路径\n\nInspection ID: TaskFileNotFound" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "TaskFileNotFound", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Unspecified" + } + }, + "relationships": [ + { + "target": { + "id": "JetBrains Academy/Yaml 配置", + "index": 25, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "DuplicateAdditionalFiles", + "shortDescription": { + "text": "重复的附加文件" + }, + "fullDescription": { + "text": "检测重复的附加文件。 课程归档中的每个附加文件必须具有唯一名称。 Inspection ID: DuplicateAdditionalFiles", + "markdown": "检测重复的附加文件。\n\n\n课程归档中的每个附加文件必须具有唯一名称。\n\nInspection ID: DuplicateAdditionalFiles" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "DuplicateAdditionalFiles", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Unspecified" + } + }, + "relationships": [ + { + "target": { + "id": "JetBrains Academy/Yaml 配置", + "index": 25, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "com.intellij", + "version": "261.26222.73", + "rules": [ + { + "id": "HtmlUnknownBooleanAttribute", + "shortDescription": { + "text": "不正确的布尔特性" + }, + "fullDescription": { + "text": "报告不含值的 HTML 非布尔特性。 建议配置不应报告的特性。 Inspection ID: HtmlUnknownBooleanAttribute", + "markdown": "报告不含值的 HTML 非布尔特性。 建议配置不应报告的特性。\n\nInspection ID: HtmlUnknownBooleanAttribute" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "HtmlUnknownBooleanAttribute", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "HTML", + "index": 27, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "DuplicatedCode", + "shortDescription": { + "text": "重复的代码段" + }, + "fullDescription": { + "text": "报告所选作用域内的重复代码块: 相同文件、或整个项目。 检查功能快速修复,可以帮助您设置检测到的重复项的大小,导航至重复的代码段,然后在工具窗口中进行比较。 检查选项允许您选择已报告重复片段的作用域,并为重复语言结构设置初始大小。 您还可以在 文件 | 设置 | 编辑器 | 重复项中配置要匿名化的结构。", + "markdown": "报告所选作用域内的重复代码块: 相同文件、或整个项目。\n\n检查功能快速修复,可以帮助您设置检测到的重复项的大小,导航至重复的代码段,然后在工具窗口中进行比较。\n\n检查选项允许您选择已报告重复片段的作用域,并为重复语言结构设置初始大小。\n\n您还可以在 [文件 \\| 设置 \\| 编辑器 \\| 重复项](settings://duplicates.index)中配置要匿名化的结构。" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "DuplicatedCode", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "codeQualityCategory": "Unspecified" + } + }, + "relationships": [ + { + "target": { + "id": "常规", + "index": 32, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "InconsistentLineSeparators", + "shortDescription": { + "text": "行分隔符不一致" + }, + "fullDescription": { + "text": "报告包含的行分隔符与项目设置中指定的行分隔符不同的文件。 例如,如果在设置 | 编辑器 | 代码样式 | 行分隔符中将行分隔符设置为 '\\n',而您正在编辑的文件使用 '\\r\\n' 作为行分隔符,就会触发该检查。 该检查还会警告留意文件中的混合行分隔符。 Inspection ID: InconsistentLineSeparators", + "markdown": "报告包含的行分隔符与项目设置中指定的行分隔符不同的文件。\n\n例如,如果在[设置 \\| 编辑器 \\| 代码样式 \\| 行分隔符](settings://preferences.sourceCode?Line%20separator)中将行分隔符设置为 `\\n`,而您正在编辑的文件使用 `\\r\\n` 作为行分隔符,就会触发该检查。\n\n该检查还会警告留意文件中的混合行分隔符。\n\nInspection ID: InconsistentLineSeparators" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "InconsistentLineSeparators", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "常规", + "index": 32, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "RedundantSuppression", + "shortDescription": { + "text": "冗余禁止" + }, + "fullDescription": { + "text": "报告由于它们所影响的检查在此上下文中不再适用而可以安全移除的下列元素: '@SuppressWarning' 注解或 '// noinspection' 行注释,或 '/** noinspection */' JavaDoc 注释 示例: 'public class C {\n // 符号已经为 private,\n // 但周围仍有注解\n @SuppressWarnings({\"WeakerAccess\"})\n private boolean CONST = true;\n void f() {\n CONST = false;\n }\n}' Inspection ID: RedundantSuppression", + "markdown": "报告由于它们所影响的检查在此上下文中不再适用而可以安全移除的下列元素:\n\n* `@SuppressWarning` 注解或\n* `// noinspection` 行注释,或\n* `/** noinspection */` JavaDoc 注释\n\n示例:\n\n\n public class C {\n // 符号已经为 private,\n // 但周围仍有注解\n @SuppressWarnings({\"WeakerAccess\"})\n private boolean CONST = true;\n void f() {\n CONST = false;\n }\n }\n\nInspection ID: RedundantSuppression" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "RedundantSuppression", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "常规", + "index": 32, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ProblematicWhitespace", + "shortDescription": { + "text": "有问题的空格" + }, + "fullDescription": { + "text": "报告以下问题: 当代码样式配置为只使用空格时使用制表符进行缩进。 当代码样式配置为只使用制表符时使用空格进行缩进。 当代码样式配置为使用智能制表符时,使用空格进行缩进,以及使用制表符进行对齐。 Inspection ID: ProblematicWhitespace", + "markdown": "报告以下问题:\n\n* 当代码样式配置为只使用空格时使用制表符进行缩进。\n* 当代码样式配置为只使用制表符时使用空格进行缩进。\n* 当代码样式配置为使用智能制表符时,使用空格进行缩进,以及使用制表符进行对齐。\n\n\nInspection ID: ProblematicWhitespace" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ProblematicWhitespace", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "常规", + "index": 32, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HtmlUnknownTarget", + "shortDescription": { + "text": "链接中未解析的文件" + }, + "fullDescription": { + "text": "报告链接中未解析的文件。 Inspection ID: HtmlUnknownTarget", + "markdown": "报告链接中未解析的文件。\n\nInspection ID: HtmlUnknownTarget" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "HtmlUnknownTarget", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "HTML", + "index": 27, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "SSBasedInspection", + "shortDescription": { + "text": "结构搜索检查" + }, + "fullDescription": { + "text": "允许配置可以应用于您正在编辑的文件的结构搜索/结构替换模板。 所有匹配项都将高亮显示并使用您配置的模板名称标记。 如果您还配置了结构替换模式,相应的替换选项将作为快速修复提供。 Inspection ID: SSBasedInspection", + "markdown": "允许配置可以应用于您正在编辑的文件的**结构搜索/结构替换**模板。\n\n所有匹配项都将高亮显示并使用您配置的模板名称标记。\n如果您还配置了**结构替换**模式,相应的替换选项将作为快速修复提供。\n\nInspection ID: SSBasedInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "SSBasedInspection", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Unspecified" + } + }, + "relationships": [ + { + "target": { + "id": "结构搜索", + "index": 44, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "LongLine", + "shortDescription": { + "text": "行长度超出代码样式的允许范围" + }, + "fullDescription": { + "text": "报告比在设置 | 编辑器 | 代码样式 | 常规中指定的强制换行位置参数长的行。 Inspection ID: LongLine", + "markdown": "报告比在[设置 \\| 编辑器 \\| 代码样式 \\| 常规](settings://preferences.sourceCode?Hard%20wrap%20at)中指定的**强制换行位置** 参数长的行。\n\nInspection ID: LongLine" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "LongLine", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "常规", + "index": 32, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "XmlWrongRootElement", + "shortDescription": { + "text": "错误的根元素" + }, + "fullDescription": { + "text": "报告与 '' 标记中指定的名称不同的根标记名称。 Inspection ID: XmlWrongRootElement", + "markdown": "报告与 `` 标记中指定的名称不同的根标记名称。\n\nInspection ID: XmlWrongRootElement" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "XmlWrongRootElement", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "XML", + "index": 47, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CheckValidXmlInScriptTagBody", + "shortDescription": { + "text": "'script' 标记的内容格式错误" + }, + "fullDescription": { + "text": "报告是无效 XML 的 'script' 标记的内容。 示例: '' 在应用快速修复后: '' Inspection ID: CheckValidXmlInScriptTagBody", + "markdown": "报告是无效 XML 的 `script` 标记的内容。 \n\n**示例:**\n\n\n \n\n在应用快速修复后:\n\n\n \n\nInspection ID: CheckValidXmlInScriptTagBody" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "CheckValidXmlInScriptTagBody", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "HTML", + "index": 27, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "InjectedReferences", + "shortDescription": { + "text": "已注入的引用" + }, + "fullDescription": { + "text": "报告语言注入所注入的未解析引用。 示例: '@Language(\"file-reference\")\n String fileName = \"/home/user/nonexistent.file\"; // 文件不存在时高亮显示' Inspection ID: InjectedReferences", + "markdown": "报告[语言注入](https://www.jetbrains.com/help/idea/using-language-injections.html)所注入的未解析引用。\n\n示例:\n\n\n @Language(\"file-reference\")\n String fileName = \"/home/user/nonexistent.file\"; // 文件不存在时高亮显示\n\nInspection ID: InjectedReferences" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "InjectedReferences", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "常规", + "index": 32, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "RegExpSuspiciousBackref", + "shortDescription": { + "text": "可疑的反向引用" + }, + "fullDescription": { + "text": "报告在运行时无法解析的反向引用。 这意味着反向引用永远无法匹配任何内容。 如果组是在反向引用之后定义的,或者组是在替代项的不同分支中定义的,则反向引用将不可解析。 在其反向引用之后定义的组的示例: '\\1(abc)' 不同分支中的组和反向引用的示例: 'a(b)c|(xy)\\1z' 2022.1 最新变化 Inspection ID: RegExpSuspiciousBackref", + "markdown": "报告在运行时无法解析的反向引用。 这意味着反向引用永远无法匹配任何内容。 如果组是在反向引用之后定义的,或者组是在替代项的不同分支中定义的,则反向引用将不可解析。\n\n**在其反向引用之后定义的组的示例:**\n\n\n \\1(abc)\n\n**不同分支中的组和反向引用的示例:**\n\n\n a(b)c|(xy)\\1z\n\n2022.1 最新变化\n\nInspection ID: RegExpSuspiciousBackref" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "RegExpSuspiciousBackref", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "正则表达式", + "index": 51, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "RegExpSingleCharAlternation", + "shortDescription": { + "text": "单字符替代项" + }, + "fullDescription": { + "text": "报告正则表达式中的单一字符替换。 改用一个字符类更简单。 这还可能提高匹配性能。 示例: 'a|b|c|d' 在应用快速修复后: '[abcd]' 2017.1 最新变化 Inspection ID: RegExpSingleCharAlternation", + "markdown": "报告正则表达式中的单一字符替换。 改用一个字符类更简单。 这还可能提高匹配性能。\n\n**示例:**\n\n\n a|b|c|d\n\n在应用快速修复后:\n\n\n [abcd]\n\n\n2017.1 最新变化\n\nInspection ID: RegExpSingleCharAlternation" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "RegExpSingleCharAlternation", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Performance" + } + }, + "relationships": [ + { + "target": { + "id": "正则表达式", + "index": 51, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HtmlUnknownAttribute", + "shortDescription": { + "text": "未知特性" + }, + "fullDescription": { + "text": "报告未知的 HTML 特性。 建议配置不应报告的特性。 Inspection ID: HtmlUnknownAttribute", + "markdown": "报告未知的 HTML 特性。 建议配置不应报告的特性。\n\nInspection ID: HtmlUnknownAttribute" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "HtmlUnknownAttribute", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "HTML", + "index": 27, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CheckTagEmptyBody", + "shortDescription": { + "text": "空元素内容" + }, + "fullDescription": { + "text": "报告没有内容的 XML 元素。 示例: '\n \n ' 在应用快速修复后: '\n \n ' Inspection ID: CheckTagEmptyBody", + "markdown": "报告没有内容的 XML 元素。\n\n**示例:**\n\n\n \n \n \n\n在应用快速修复后:\n\n\n \n \n \n\nInspection ID: CheckTagEmptyBody" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "CheckTagEmptyBody", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "XML", + "index": 47, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "RegExpRedundantEscape", + "shortDescription": { + "text": "冗余字符转义" + }, + "fullDescription": { + "text": "报告可以替换为保留其含义的非转义字符的冗余字符转义序列。 许多在字符类外部必需的转义序列在字符类的方括号 '[]' 内部冗余。 尽管某些方言(JavaScript、Python 等)允许在字符类外部使用未转义的左大括号 '{',但这样可能会导致混乱并降低模式的可移植性,因为某些方言要求将大括号作为字符进行转义。 因此,该检查不会报告转义的左大括号。 示例: '\\-\\;[\\.]' 在应用快速修复后: '-;[.]' 忽略转义的右括号 '}' 和 ']' 选项可以指定当 RegExp 方言允许在字符类外部使用未转义的 '\\}' 和 '\\]' 时是否报告它们。 同样,忽略转义斜杠 '/' 选项指定是否在 RegExp 方言未转义斜杠时报告 '\\/'。 2017.3 最新变化 Inspection ID: RegExpRedundantEscape", + "markdown": "报告可以替换为保留其含义的非转义字符的冗余字符转义序列。 许多在字符类外部必需的转义序列在字符类的方括号 `[]` 内部冗余。\n\n\n尽管某些方言(JavaScript、Python 等)允许在字符类外部使用未转义的左大括号 `{`,但这样可能会导致混乱并降低模式的可移植性,因为某些方言要求将大括号作为字符进行转义。\n因此,该检查不会报告转义的左大括号。\n\n**示例:**\n\n\n \\-\\;[\\.]\n\n在应用快速修复后:\n\n\n -;[.]\n\n\n**忽略转义的右括号 '}' 和 '\\]'** 选项可以指定当 RegExp 方言允许在字符类外部使用未转义的 `\\}` 和 `\\]` 时是否报告它们。\n\n\n同样,**忽略转义斜杠 '/'** 选项指定是否在 RegExp 方言未转义斜杠时报告 `\\/`。\n\n2017.3 最新变化\n\nInspection ID: RegExpRedundantEscape" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "RegExpRedundantEscape", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "正则表达式", + "index": 51, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "UnresolvedReference", + "shortDescription": { + "text": "未解析的引用" + }, + "fullDescription": { + "text": "报告使用 XML 语法的 RELAX-NG 文件中对命名模式 ('define') 的未解析引用。 建议创建引用的 'define' 元素。 Inspection ID: UnresolvedReference", + "markdown": "报告使用 XML 语法的 RELAX-NG 文件中对命名模式 (`define`) 的未解析引用。 建议创建引用的 `define` 元素。\n\nInspection ID: UnresolvedReference" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "UnresolvedReference", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "RELAX NG", + "index": 56, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HtmlMissingClosingTag", + "shortDescription": { + "text": "缺少结束标记" + }, + "fullDescription": { + "text": "报告不含结束标记的 HTML 元素。 即便在可选的情况下,有些编码样式也要求 HTML 元素包含结束标记。 示例: '\n \n

      Behold!\n \n ' 在应用快速修复后: '\n \n

      Behold!

      \n \n ' Inspection ID: HtmlMissingClosingTag", + "markdown": "报告不含结束标记的 HTML 元素。 即便在可选的情况下,有些编码样式也要求 HTML 元素包含结束标记。\n\n**示例:**\n\n\n \n \n

      Behold!\n \n \n\n在应用快速修复后:\n\n\n \n \n

      Behold!

      \n \n \n\nInspection ID: HtmlMissingClosingTag" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "HtmlMissingClosingTag", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "HTML", + "index": 27, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CustomRegExpInspection", + "shortDescription": { + "text": "自定义正则表达式检查" + }, + "fullDescription": { + "text": "自定义正则表达式检查 Inspection ID: CustomRegExpInspection", + "markdown": "自定义正则表达式检查\n\nInspection ID: CustomRegExpInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "CustomRegExpInspection", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Unspecified" + } + }, + "relationships": [ + { + "target": { + "id": "正则表达式", + "index": 51, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "IncorrectFormatting", + "shortDescription": { + "text": "格式设置不正确" + }, + "fullDescription": { + "text": "报告代码不遵循项目代码样式设置时出现的格式问题。 此检查与需要第三方格式化程序进行代码格式设置的语言(例如启用了 CLangFormat 的 Go 或 C 语言)不兼容。 Inspection ID: IncorrectFormatting", + "markdown": "报告代码不遵循项目代码样式设置时出现的格式问题。\n\n\n此检查与需要第三方格式化程序进行代码格式设置的语言(例如启用了 CLangFormat 的 Go 或 C 语言)不兼容。\n\nInspection ID: IncorrectFormatting" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "IncorrectFormatting", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "常规", + "index": 32, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HtmlExtraClosingTag", + "shortDescription": { + "text": "冗余结束标记" + }, + "fullDescription": { + "text": "报告空元素的冗余结束标记,例如 'img' 或 'br'。 示例: '\n \n

      \n \n ' 在应用快速修复后: '\n \n
      \n \n ' Inspection ID: HtmlExtraClosingTag", + "markdown": "报告空元素的冗余结束标记,例如 `img` 或 `br`。\n\n**示例:**\n\n\n \n \n

      \n \n \n\n在应用快速修复后:\n\n\n \n \n
      \n \n \n\nInspection ID: HtmlExtraClosingTag" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "HtmlExtraClosingTag", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "HTML", + "index": 27, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HtmlUnknownAnchorTarget", + "shortDescription": { + "text": "链接中未解析的片段" + }, + "fullDescription": { + "text": "报告 '#' 符号后面的 URL 中未解析的最后部分。 Inspection ID: HtmlUnknownAnchorTarget", + "markdown": "报告 `#` 符号后面的 URL 中未解析的最后部分。\n\nInspection ID: HtmlUnknownAnchorTarget" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "HtmlUnknownAnchorTarget", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "HTML", + "index": 27, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "RegExpUnexpectedAnchor", + "shortDescription": { + "text": "起始或结束定位点在意外位置" + }, + "fullDescription": { + "text": "报告不在模式开头的 '^' 或 '\\A' 定位标记以及不在模式末尾的 '$'、'\\Z' 或 '\\z' 定位标记。 如果这些正则表达式定位标记位于错误的位置,则会阻止模式与任何对象匹配。 对于 '^' 和 '$' 定位标记,则很可能是指字面量字符,并且忘记了转义。 示例: '(Price $10)' 2018.1 最新变化 Inspection ID: RegExpUnexpectedAnchor", + "markdown": "报告不在模式开头的 `^` 或 `\\A` 定位标记以及不在模式末尾的 `$`、`\\Z` 或 `\\z` 定位标记。 如果这些正则表达式定位标记位于错误的位置,则会阻止模式与任何对象匹配。 对于 `^` 和 `$` 定位标记,则很可能是指字面量字符,并且忘记了转义。\n\n**示例:**\n\n\n (Price $10)\n\n\n2018.1 最新变化\n\nInspection ID: RegExpUnexpectedAnchor" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "RegExpUnexpectedAnchor", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "正则表达式", + "index": 51, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CheckXmlFileWithXercesValidator", + "shortDescription": { + "text": "外部验证失败" + }, + "fullDescription": { + "text": "报告 Xerces 验证程序检测到的 XML 文件和指定 DTD 或架构的差异。 Inspection ID: CheckXmlFileWithXercesValidator", + "markdown": "报告 Xerces 验证程序检测到的 XML 文件和指定 DTD 或架构的差异。\n\nInspection ID: CheckXmlFileWithXercesValidator" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "CheckXmlFileWithXercesValidator", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "XML", + "index": 47, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HtmlUnknownTag", + "shortDescription": { + "text": "未知标记" + }, + "fullDescription": { + "text": "报告未知的 HTML 标记。 建议配置不应报告的标记。 Inspection ID: HtmlUnknownTag", + "markdown": "报告未知的 HTML 标记。 建议配置不应报告的标记。\n\nInspection ID: HtmlUnknownTag" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "HtmlUnknownTag", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "HTML", + "index": 27, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "RegExpEscapedMetaCharacter", + "shortDescription": { + "text": "转义元字符" + }, + "fullDescription": { + "text": "报告转义元字符。 某些正则表达式代码样式指定应将元字符放在字符类中,从而使正则表达式更易于理解。 此检查不会警告元字符 '[', ']' 和 '^',因为这些字符可能需要在字符类中进行额外的转义。 示例: '\\d+\\.\\d+' 在应用快速修复后: '\\d+[.]\\d+' 2017.1 最新变化 Inspection ID: RegExpEscapedMetaCharacter", + "markdown": "报告转义元字符。 某些正则表达式代码样式指定应将元字符放在字符类中,从而使正则表达式更易于理解。 此检查不会警告元字符 `[`, `]` 和 `^`,因为这些字符可能需要在字符类中进行额外的转义。\n\n**示例:**\n\n\n \\d+\\.\\d+\n\n在应用快速修复后:\n\n\n \\d+[.]\\d+\n\n2017.1 最新变化\n\nInspection ID: RegExpEscapedMetaCharacter" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "RegExpEscapedMetaCharacter", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "正则表达式", + "index": 51, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "XmlHighlighting", + "shortDescription": { + "text": "XML 高亮显示" + }, + "fullDescription": { + "text": "报告批量代码检查结果中的 XML 验证问题。 Inspection ID: XmlHighlighting", + "markdown": "报告批量代码检查结果中的 XML 验证问题。\n\nInspection ID: XmlHighlighting" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "XmlHighlighting", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "XML", + "index": 47, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "XmlDuplicatedId", + "shortDescription": { + "text": "重复 'id' 特性" + }, + "fullDescription": { + "text": "报告 XML 和 HTML 中 'id' 特性的重复值。 Inspection ID: XmlDuplicatedId", + "markdown": "报告 XML 和 HTML 中 `id` 特性的重复值。\n\nInspection ID: XmlDuplicatedId" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "XmlDuplicatedId", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "XML", + "index": 47, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "RegExpDuplicateCharacterInClass", + "shortDescription": { + "text": "字符类中存在重复字符" + }, + "fullDescription": { + "text": "报告正则表达式字符类中的重复字符。 重复字符是多余的,可将其移除而不改变正则表达式的语义。 示例: '[aabc]' 在应用快速修复后: '[abc]' Inspection ID: RegExpDuplicateCharacterInClass", + "markdown": "报告正则表达式字符类中的重复字符。 重复字符是多余的,可将其移除而不改变正则表达式的语义。\n\n**示例:**\n\n\n [aabc]\n\n在应用快速修复后:\n\n\n [abc]\n\nInspection ID: RegExpDuplicateCharacterInClass" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "RegExpDuplicateCharacterInClass", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "正则表达式", + "index": 51, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "XmlInvalidId", + "shortDescription": { + "text": "未解析的 'id' 引用" + }, + "fullDescription": { + "text": "报告未在 XML 和 HTML 中的任何地方定义的 'id' 的使用情况。 Inspection ID: XmlInvalidId", + "markdown": "报告未在 XML 和 HTML 中的任何地方定义的 `id` 的使用情况。\n\nInspection ID: XmlInvalidId" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "XmlInvalidId", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "XML", + "index": 47, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "XmlUnboundNsPrefix", + "shortDescription": { + "text": "未绑定的命名空间前缀" + }, + "fullDescription": { + "text": "报告 XML 中未绑定的命名空间前缀。 Inspection ID: XmlUnboundNsPrefix", + "markdown": "报告 XML 中未绑定的命名空间前缀。\n\nInspection ID: XmlUnboundNsPrefix" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "XmlUnboundNsPrefix", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "XML", + "index": 47, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "RequiredAttributes", + "shortDescription": { + "text": "缺少必要的特性" + }, + "fullDescription": { + "text": "报告 XML/HTML 标记中缺少的强制特性。 建议配置不应报告的特性。 Inspection ID: RequiredAttributes", + "markdown": "报告 XML/HTML 标记中缺少的强制特性。 建议配置不应报告的特性。\n\nInspection ID: RequiredAttributes" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "RequiredAttributes", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "HTML", + "index": 27, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "ReassignedToPlainText", + "shortDescription": { + "text": "重新分配为纯文本" + }, + "fullDescription": { + "text": "报告被显式重新分配为纯文本文件类型的文件。 这种关联是不必要的,因为平台会根据内容自动检测文本文件。 您可以通过在设置 | 编辑器 | 文件类型 | 文本中移除文件类型关联来关闭此警告。 Inspection ID: ReassignedToPlainText", + "markdown": "报告被显式重新分配为纯文本文件类型的文件。 这种关联是不必要的,因为平台会根据内容自动检测文本文件。\n\n您可以通过在**设置 \\| 编辑器 \\| 文件类型 \\| 文本**中移除文件类型关联来关闭此警告。\n\nInspection ID: ReassignedToPlainText" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "ReassignedToPlainText", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Unspecified" + } + }, + "relationships": [ + { + "target": { + "id": "常规", + "index": 32, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "XmlUnusedNamespaceDeclaration", + "shortDescription": { + "text": "未使用的架构声明" + }, + "fullDescription": { + "text": "报告 XML 中未使用的命名空间声明或位置提示。 Inspection ID: XmlUnusedNamespaceDeclaration", + "markdown": "报告 XML 中未使用的命名空间声明或位置提示。\n\nInspection ID: XmlUnusedNamespaceDeclaration" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "XmlUnusedNamespaceDeclaration", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "XML", + "index": 47, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "RegExpRedundantClassElement", + "shortDescription": { + "text": "冗余的 '\\d', '[:digit:]',或 '\\D' 类元素" + }, + "fullDescription": { + "text": "报告在同一个类中与 '\\w' 或 '[:word:]'(带 '\\W' 的 '\\D')一起使用且可移除的冗余 '\\d' 或 '[:digit:]'。 示例: '[\\w\\d]' 在应用快速修复后: '[\\w]' 2022.2 最新变化 Inspection ID: RegExpRedundantClassElement", + "markdown": "报告在同一个类中与 `\\w` 或 `[:word:]`(带 `\\W` 的 `\\D`)一起使用且可移除的冗余 `\\d` 或 `[:digit:]`。\n\n**示例:**\n\n\n [\\w\\d]\n\n在应用快速修复后:\n\n\n [\\w]\n\n2022.2 最新变化\n\nInspection ID: RegExpRedundantClassElement" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "RegExpRedundantClassElement", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "正则表达式", + "index": 51, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "RegExpSimplifiable", + "shortDescription": { + "text": "正则表达式可以简化" + }, + "fullDescription": { + "text": "报告可以简化的正则表达式。 示例: '[a] xx* [ah-hz]' 在应用快速修复后: 'a x+ [ahz]' 2022.1 最新变化 Inspection ID: RegExpSimplifiable", + "markdown": "报告可以简化的正则表达式。\n\n**示例:**\n\n\n [a] xx* [ah-hz]\n\n在应用快速修复后:\n\n\n a x+ [ahz]\n\n2022.1 最新变化\n\nInspection ID: RegExpSimplifiable" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "RegExpSimplifiable", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "正则表达式", + "index": 51, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "RegExpEmptyAlternationBranch", + "shortDescription": { + "text": "替代项中存在空分支" + }, + "fullDescription": { + "text": "报告正则表达式替换中的空分支。 空分支只能匹配空字符串,在大多数情况下,这并不是我们的目的。 此检查不会报告位于替换开头或末尾的单个空分支。 示例: '(alpha||bravo)' 在应用快速修复后: '(alpha|bravo)' 2017.2 最新变化 Inspection ID: RegExpEmptyAlternationBranch", + "markdown": "报告正则表达式替换中的空分支。 空分支只能匹配空字符串,在大多数情况下,这并不是我们的目的。 此检查不会报告位于替换开头或末尾的单个空分支。\n\n**示例:**\n\n\n (alpha||bravo)\n\n在应用快速修复后:\n\n\n (alpha|bravo)\n\n2017.2 最新变化\n\nInspection ID: RegExpEmptyAlternationBranch" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "RegExpEmptyAlternationBranch", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "正则表达式", + "index": 51, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "Annotator", + "shortDescription": { + "text": "注解器" + }, + "fullDescription": { + "text": "报告批处理代码检查运行结果中对此文件至关重要的问题(例如,语法错误)。 与检查不同,这些问题通常会在编辑器中高亮显示,并且无法配置。 这些选项控制此检查所执行检查的作用域: 选项报告语法错误:报告解析器相关问题。 选项报告来自语言特定注解器的问题:报告由为相关语言配置的注解器发现的问题 请参阅自定义语言支持:注解器以了解详情。 选项报告其他高亮显示问题:报告特定于当前文件语言的问题(例如,类型不匹配或未报告的异常)。 请参阅自定义语言支持:高亮显示以了解详情。 Inspection ID: Annotator", + "markdown": "报告批处理代码检查运行结果中对此文件至关重要的问题(例如,语法错误)。 与检查不同,这些问题通常会在编辑器中高亮显示,并且无法配置。 这些选项控制此检查所执行检查的作用域:\n\n* 选项**报告语法错误**:报告解析器相关问题。\n* 选项**报告来自语言特定注解器的问题** :报告由为相关语言配置的注解器发现的问题 请参阅[自定义语言支持:注解器](https://plugins.jetbrains.com/docs/intellij/annotator.html)以了解详情。\n* 选项**报告其他高亮显示问题** :报告特定于当前文件语言的问题(例如,类型不匹配或未报告的异常)。 请参阅[自定义语言支持:高亮显示](https://plugins.jetbrains.com/docs/intellij/syntax-highlighting-and-error-highlighting.html#semantic-highlighting)以了解详情。\n\nInspection ID: Annotator" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "Annotator", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "常规", + "index": 32, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "XmlPathReference", + "shortDescription": { + "text": "未解析的文件引用" + }, + "fullDescription": { + "text": "报告 XML 中未解析的文件引用。 Inspection ID: XmlPathReference", + "markdown": "报告 XML 中未解析的文件引用。\n\nInspection ID: XmlPathReference" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "XmlPathReference", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "XML", + "index": 47, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "RegExpUnnecessaryNonCapturingGroup", + "shortDescription": { + "text": "不必要的非捕获组" + }, + "fullDescription": { + "text": "报告不必要的非捕获组(对匹配结果无影响)。 示例: 'Everybody be cool, (?:this) is a robbery!' 在应用快速修复后: 'Everybody be cool, this is a robbery!' 2021.1 最新变化 Inspection ID: RegExpUnnecessaryNonCapturingGroup", + "markdown": "报告不必要的非捕获组(对匹配结果无影响)。\n\n**示例:**\n\n\n Everybody be cool, (?:this) is a robbery!\n\n在应用快速修复后:\n\n\n Everybody be cool, this is a robbery!\n\n2021.1 最新变化\n\nInspection ID: RegExpUnnecessaryNonCapturingGroup" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "RegExpUnnecessaryNonCapturingGroup", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "正则表达式", + "index": 51, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "TodoComment", + "shortDescription": { + "text": "TODO 注释" + }, + "fullDescription": { + "text": "报告代码中的 TODO 注释。 您可以在设置 | 编辑器 | TODO 中配置 TODO 注释的格式。 启用只对没有任何详细信息的 TODO 注释发出警告选项,以仅对不提供有关应完成任务的任何描述的空 TODO 注释发出警告。 禁用可报告所有 TODO 注释。 Inspection ID: TodoComment", + "markdown": "报告代码中的 **TODO** 注释。\n\n您可以在[设置 \\| 编辑器 \\| TODO](settings://preferences.toDoOptions) 中配置 **TODO** 注释的格式。\n\n启用**只对没有任何详细信息的 TODO 注释发出警告**选项,以仅对不提供有关应完成任务的任何描述的空 TODO 注释发出警告。 禁用可报告所有 TODO 注释。\n\nInspection ID: TodoComment" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "TodoComment", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "常规", + "index": 32, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "RegExpRedundantNestedCharacterClass", + "shortDescription": { + "text": "冗余嵌套字符类" + }, + "fullDescription": { + "text": "报告非必要的嵌套字符类。 示例: '[a-c[x-z]]' 在应用快速修复后: '[a-cx-z]' 2020.2 最新变化 Inspection ID: RegExpRedundantNestedCharacterClass", + "markdown": "报告非必要的嵌套字符类。\n\n**示例:**\n\n\n [a-c[x-z]]\n\n在应用快速修复后:\n\n\n [a-cx-z]\n\n2020.2 最新变化\n\nInspection ID: RegExpRedundantNestedCharacterClass" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "RegExpRedundantNestedCharacterClass", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "正则表达式", + "index": 51, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "XmlDeprecatedElement", + "shortDescription": { + "text": "弃用的符号" + }, + "fullDescription": { + "text": "报告弃用的 XML 元素或特性。 可以通过 XML 注释或带有 'deprecated' 文本的文档标记来标记符号。 Inspection ID: XmlDeprecatedElement", + "markdown": "报告弃用的 XML 元素或特性。\n\n可以通过 XML 注释或带有 'deprecated' 文本的文档标记来标记符号。\n\nInspection ID: XmlDeprecatedElement" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "XmlDeprecatedElement", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "XML", + "index": 47, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HtmlWrongAttributeValue", + "shortDescription": { + "text": "特性值错误" + }, + "fullDescription": { + "text": "报告不正确的 HTML 特性值。 Inspection ID: HtmlWrongAttributeValue", + "markdown": "报告不正确的 HTML 特性值。\n\nInspection ID: HtmlWrongAttributeValue" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "HtmlWrongAttributeValue", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "HTML", + "index": 27, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "XmlDefaultAttributeValue", + "shortDescription": { + "text": "包含默认值的冗余特性" + }, + "fullDescription": { + "text": "报告对 XML 特性默认值的冗余赋值。 Inspection ID: XmlDefaultAttributeValue", + "markdown": "报告对 XML 特性默认值的冗余赋值。\n\nInspection ID: XmlDefaultAttributeValue" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "XmlDefaultAttributeValue", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "XML", + "index": 47, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "RegExpOctalEscape", + "shortDescription": { + "text": "八进制转义" + }, + "fullDescription": { + "text": "报告八进制转义(容易与反向引用混淆)。 使用十六进制转义可避免混淆。 示例: '\\07' 在应用快速修复后: '\\x07' 2017.1 最新变化 Inspection ID: RegExpOctalEscape", + "markdown": "报告八进制转义(容易与反向引用混淆)。 使用十六进制转义可避免混淆。\n\n**示例:**\n\n\n \\07\n\n在应用快速修复后:\n\n\n \\x07\n\n2017.1 最新变化\n\nInspection ID: RegExpOctalEscape" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "RegExpOctalEscape", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "正则表达式", + "index": 51, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "UnusedDefine", + "shortDescription": { + "text": "未使用的定义" + }, + "fullDescription": { + "text": "报告 RELAX-NG 文件 (XML 或 Compact 语法) 中未使用的命名模式 ('define')。 通过另一个文件中的 include 使用的 'define' 元素将被忽略。 Inspection ID: UnusedDefine", + "markdown": "报告 RELAX-NG 文件 (XML 或 Compact 语法) 中未使用的命名模式 (`define`)。 通过另一个文件中的 include 使用的 `define` 元素将被忽略。\n\nInspection ID: UnusedDefine" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "UnusedDefine", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "RELAX NG", + "index": 56, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "EmptyDirectory", + "shortDescription": { + "text": "空目录" + }, + "fullDescription": { + "text": "报告空目录。 仅适用于代码 | 检查代码或代码 | 分析代码 | 通过名称运行检查,并且不会在编辑器中报告。 使用仅报告位于源文件夹下的空目录选项可以仅报告源根下的目录。 Inspection ID: EmptyDirectory", + "markdown": "报告空目录。\n\n仅适用于**代码 \\| 检查代码** 或**代码 \\| 分析代码 \\| 通过名称运行检查**,并且不会在编辑器中报告。\n\n使用**仅报告位于源文件夹下的空目录**选项可以仅报告源根下的目录。\n\n\nInspection ID: EmptyDirectory" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "EmptyDirectory", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "常规", + "index": 32, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "RegExpAnonymousGroup", + "shortDescription": { + "text": "匿名捕获组或数字反向引用" + }, + "fullDescription": { + "text": "报告正则表达式中的匿名捕获组和数字反向引用。 只有正则表达式方言支持命名组和命名组引用,才支持这些用法。 命名组和命名反向引用可改进代码可读性,建议改用。 无需捕获时,使用非捕获组,即使用 '(?:xxx)' 而不是 '(xxx)',可以提高匹配效率和减少需要使用的内存。 示例: '(\\d\\d\\d\\d)\\1' 更好的正则表达式模式如下: '(?\\d\\d\\d\\d)\\k' 2017.2 最新变化 Inspection ID: RegExpAnonymousGroup", + "markdown": "报告正则表达式中的匿名捕获组和数字反向引用。 只有正则表达式方言支持命名组和命名组引用,才支持这些用法。 命名组和命名反向引用可改进代码可读性,建议改用。 无需捕获时,使用非捕获组,即使用 `(?:xxx)` 而不是 `(xxx)`,可以提高匹配效率和减少需要使用的内存。\n\n**示例:**\n\n\n (\\d\\d\\d\\d)\\1\n\n更好的正则表达式模式如下:\n\n\n (?\\d\\d\\d\\d)\\k\n\n2017.2 最新变化\n\nInspection ID: RegExpAnonymousGroup" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "RegExpAnonymousGroup", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "正则表达式", + "index": 51, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CheckDtdRefs", + "shortDescription": { + "text": "未解析的 DTD 引用" + }, + "fullDescription": { + "text": "报告特定于 DTD 的引用(例如,对 XML 实体或 DTD 元素声明的引用)中的不一致。 适用于 DTD 和 XML 文件。 Inspection ID: CheckDtdRefs", + "markdown": "报告特定于 DTD 的引用(例如,对 XML 实体或 DTD 元素声明的引用)中的不一致。 适用于 DTD 和 XML 文件。\n\nInspection ID: CheckDtdRefs" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "CheckDtdRefs", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "XML", + "index": 47, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "NonAsciiCharacters", + "shortDescription": { + "text": "非 ASCII 字符" + }, + "fullDescription": { + "text": "报告在异常上下文中使用非 ASCII 符号的代码元素。 示例: 标识符、字符串或注释中使用的非 ASCII 字符。 使用不同语言编写的标识符,例如带有使用西里尔文编写的字母 'C' 的 'myСollection'。 包含 Unicode 符号(如长划线和箭头)的注释或字符串。 Inspection ID: NonAsciiCharacters", + "markdown": "报告在异常上下文中使用非 ASCII 符号的代码元素。\n\n示例:\n\n* 标识符、字符串或注释中使用的非 ASCII 字符。\n* 使用不同语言编写的标识符,例如带有使用西里尔文编写的字母 **C** 的 `my`**С**`ollection`。\n* 包含 Unicode 符号(如长划线和箭头)的注释或字符串。\n\nInspection ID: NonAsciiCharacters" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "NonAsciiCharacters", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "国际化", + "index": 74, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "XmlUnresolvedReference", + "shortDescription": { + "text": "未解析的引用" + }, + "fullDescription": { + "text": "报告 XML 中的未解析引用。 Inspection ID: XmlUnresolvedReference", + "markdown": "报告 XML 中的未解析引用。\n\nInspection ID: XmlUnresolvedReference" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "XmlUnresolvedReference", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "XML", + "index": 47, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "LossyEncoding", + "shortDescription": { + "text": "有损编码" + }, + "fullDescription": { + "text": "报告由于当前文档编码而无法显示的字符。 示例: 如果在带有 US-ASCII 字符集的文档中键入国际字符,保存时会丢失某些字符。 如果加载使用 ISO-8859-1 一字节字符集的 UTF-8 编码文件,某些字符将无法正确显示。 要解决此问题,可以直接在文件中指定编码来更改文件编码,例如编辑 XML 文件的 XML prolog 中的 'encoding=' 特性,或者在设置 | 编辑器 | 文件编码中更改相应选项。 Inspection ID: LossyEncoding", + "markdown": "报告由于当前文档编码而无法显示的字符。\n\n示例:\n\n* 如果在带有 **US-ASCII** 字符集的文档中键入国际字符,保存时会丢失某些字符。\n* 如果加载使用 **ISO-8859-1** 一字节字符集的 **UTF-8** 编码文件,某些字符将无法正确显示。\n\n要解决此问题,可以直接在文件中指定编码来更改文件编码,例如编辑 XML 文件的 XML prolog 中的 `encoding=` 特性,或者在**设置 \\| 编辑器 \\| 文件编码**中更改相应选项。\n\nInspection ID: LossyEncoding" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "LossyEncoding", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "国际化", + "index": 74, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "RegExpRepeatedSpace", + "shortDescription": { + "text": "连续空格" + }, + "fullDescription": { + "text": "报告正则表达式中的多个连续空格。 由于空格默认不可见,因此,很难了解需要的空格数量。 使用单个空格和计数量词来替换连续空格可以让正则表达式更清晰易懂。 示例: '( )' 在应用快速修复后: '( {5})' 2017.1 最新变化 Inspection ID: RegExpRepeatedSpace", + "markdown": "报告正则表达式中的多个连续空格。 由于空格默认不可见,因此,很难了解需要的空格数量。 使用单个空格和计数量词来替换连续空格可以让正则表达式更清晰易懂。\n\n**示例:**\n\n\n ( )\n\n在应用快速修复后:\n\n\n ( {5})\n\n\n2017.1 最新变化\n\nInspection ID: RegExpRepeatedSpace" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "RegExpRepeatedSpace", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "正则表达式", + "index": 51, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "RegExpDuplicateAlternationBranch", + "shortDescription": { + "text": "替代项中存在重复分支" + }, + "fullDescription": { + "text": "报告正则表达式替换中的重复分支。 重复分支会降低匹配速度并导致表达式意图不明。 示例: '(alpha|bravo|charlie|alpha)' 在应用快速修复后: '(alpha|bravo|charlie)' 2017.1 最新变化 Inspection ID: RegExpDuplicateAlternationBranch", + "markdown": "报告正则表达式替换中的重复分支。 重复分支会降低匹配速度并导致表达式意图不明。\n\n**示例:**\n\n\n (alpha|bravo|charlie|alpha)\n\n在应用快速修复后:\n\n\n (alpha|bravo|charlie)\n\n2017.1 最新变化\n\nInspection ID: RegExpDuplicateAlternationBranch" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "RegExpDuplicateAlternationBranch", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Performance" + } + }, + "relationships": [ + { + "target": { + "id": "正则表达式", + "index": 51, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "IgnoreFileDuplicateEntry", + "shortDescription": { + "text": "忽略文件重复项" + }, + "fullDescription": { + "text": "报告忽略文件(例如 .gitignore、.hgignore)中的重复条目(模式)。 这些文件中的重复条目冗余,可以移除。 示例: '# 输出目录\n /out/\n /target/\n /out/' Inspection ID: IgnoreFileDuplicateEntry", + "markdown": "报告忽略文件(例如 .gitignore、.hgignore)中的重复条目(模式)。 这些文件中的重复条目冗余,可以移除。\n\n示例:\n\n\n # 输出目录\n /out/\n /target/\n /out/\n\nInspection ID: IgnoreFileDuplicateEntry" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "IgnoreFileDuplicateEntry", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "版本控制", + "index": 76, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CheckEmptyScriptTag", + "shortDescription": { + "text": "空标记" + }, + "fullDescription": { + "text": "报告在某些浏览器中无法正常运行的空标记。 示例: '\n \n ' Inspection ID: CheckEmptyScriptTag", + "markdown": "报告在某些浏览器中无法正常运行的空标记。\n\n**示例:**\n\n\n \n \n \n\nInspection ID: CheckEmptyScriptTag" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "CheckEmptyScriptTag", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "HTML", + "index": 27, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "HtmlTools", + "version": "261.26222.73", + "rules": [ + { + "id": "HtmlRequiredAltAttribute", + "shortDescription": { + "text": "缺少所需的 'alt' 特性" + }, + "fullDescription": { + "text": "报告 'img' 或 'applet' 标记或图像映射的 'area' 元素中缺少的 'alt' 特性。 建议添加含标签内容替代文本的必要特性。 基于 WCAG 2.0:H24、H35、H36、H37。 Inspection ID: HtmlRequiredAltAttribute", + "markdown": "报告 `img` 或 `applet` 标记或图像映射的 `area` 元素中缺少的 `alt` 特性。 建议添加含标签内容替代文本的必要特性。 基于 WCAG 2.0:[H24](https://www.w3.org/TR/WCAG20-TECHS/H24.html)、[H35](https://www.w3.org/TR/WCAG20-TECHS/H35.html)、[H36](https://www.w3.org/TR/WCAG20-TECHS/H36.html)、[H37](https://www.w3.org/TR/WCAG20-TECHS/H37.html)。\n\nInspection ID: HtmlRequiredAltAttribute" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "HtmlRequiredAltAttribute", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "HTML/可访问性", + "index": 33, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HtmlFormInputWithoutLabel", + "shortDescription": { + "text": "表单输入没有相关的label" + }, + "fullDescription": { + "text": "报告没有关联标签的表单元素 ('input'、'textarea' 或 'select')。 建议创建新标签。 基于 WCAG 2.0:H44。 Inspection ID: HtmlFormInputWithoutLabel", + "markdown": "报告没有关联标签的表单元素 (`input`、`textarea` 或 `select`)。 建议创建新标签。 基于 WCAG 2.0:[H44](https://www.w3.org/TR/WCAG20-TECHS/H44.html)。 \n\nInspection ID: HtmlFormInputWithoutLabel" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "HtmlFormInputWithoutLabel", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "HTML/可访问性", + "index": 33, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HtmlRequiredTitleAttribute", + "shortDescription": { + "text": "缺少所需的 'title' 特性" + }, + "fullDescription": { + "text": "报告缺少的标题特性 'frame'、'iframe'、'dl' 和 'a' 标记。 建议添加标题特性。 基于 WCAG 2.0:H33、H40 和 H64。 Inspection ID: HtmlRequiredTitleAttribute", + "markdown": "报告缺少的标题特性 `frame`、`iframe`、`dl` 和 `a` 标记。 建议添加标题特性。 基于 WCAG 2.0:[H33](https://www.w3.org/TR/WCAG20-TECHS/H33.html)、[H40](https://www.w3.org/TR/WCAG20-TECHS/H40.html) 和 [H64](https://www.w3.org/TR/WCAG20-TECHS/H64.html)。\n\nInspection ID: HtmlRequiredTitleAttribute" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "HtmlRequiredTitleAttribute", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "HTML/可访问性", + "index": 33, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HtmlDeprecatedTag", + "shortDescription": { + "text": "废弃的标记" + }, + "fullDescription": { + "text": "报告过时的 HTML5 标记。 建议将过时的标记替换为 CSS 或其他标记。 Inspection ID: HtmlDeprecatedTag", + "markdown": "报告过时的 HTML5 标记。 建议将过时的标记替换为 CSS 或其他标记。\n\nInspection ID: HtmlDeprecatedTag" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "HtmlDeprecatedTag", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "HTML", + "index": 27, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CheckImageSize", + "shortDescription": { + "text": "不匹配的图像大小" + }, + "fullDescription": { + "text": "报告与所引用图像的实际宽度和高度不同的 'img' 标记的 'width' 和 'height' 特性值。 Inspection ID: CheckImageSize", + "markdown": "报告与所引用图像的实际宽度和高度不同的 `img` 标记的 `width` 和 `height` 特性值。\n\nInspection ID: CheckImageSize" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "CheckImageSize", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "HTML", + "index": 27, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HtmlRequiredSummaryAttribute", + "shortDescription": { + "text": "缺少所需的 'summary' 特性" + }, + "fullDescription": { + "text": "报告 'table' 标记中缺少的 'summary' 特性。 建议添加 'summary' 特性。 基于 WCAG 2.0:H73。 Inspection ID: HtmlRequiredSummaryAttribute", + "markdown": "报告 `table` 标记中缺少的 `summary` 特性。 建议添加 `summary` 特性。 基于 WCAG 2.0:[H73](https://www.w3.org/TR/WCAG20-TECHS/H73.html)。\n\nInspection ID: HtmlRequiredSummaryAttribute" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "HtmlRequiredSummaryAttribute", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "HTML/可访问性", + "index": 33, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HtmlRequiredLangAttribute", + "shortDescription": { + "text": "缺少所需的 'lang' 特性" + }, + "fullDescription": { + "text": "报告 'html' 标记中缺少的 'lang'(或 'xml:lang')特性。 建议添加一项必备特性来声明文档的默认语言。 基于 WCAG 2.0:H57。 Inspection ID: HtmlRequiredLangAttribute", + "markdown": "报告 `html` 标记中缺少的 `lang`(或 `xml:lang`)特性。 建议添加一项必备特性来声明文档的默认语言。 基于 WCAG 2.0:[H57](https://www.w3.org/TR/WCAG20-TECHS/H57.html)。\n\nInspection ID: HtmlRequiredLangAttribute" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "HtmlRequiredLangAttribute", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "HTML/可访问性", + "index": 33, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HtmlNonExistentInternetResource", + "shortDescription": { + "text": "未解析的 Web 链接" + }, + "fullDescription": { + "text": "报告未解析的 Web 链接。 通过在后台发出网络请求来发挥作用。 Inspection ID: HtmlNonExistentInternetResource", + "markdown": "报告未解析的 Web 链接。 通过在后台发出网络请求来发挥作用。\n\nInspection ID: HtmlNonExistentInternetResource" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "HtmlNonExistentInternetResource", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "HTML", + "index": 27, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HtmlRequiredTitleElement", + "shortDescription": { + "text": "缺少所需的 'title' 元素" + }, + "fullDescription": { + "text": "报告 'head' 部分中缺少的 'title' 元素。 建议添加 'title' 元素。 标题应能说明文档。 基于 WCAG 2.0:H25。 Inspection ID: HtmlRequiredTitleElement", + "markdown": "报告 `head` 部分中缺少的 `title` 元素。 建议添加 `title` 元素。 标题应能说明文档。 基于 WCAG 2.0:[H25](https://www.w3.org/TR/WCAG20-TECHS/H25.html)。\n\nInspection ID: HtmlRequiredTitleElement" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "HtmlRequiredTitleElement", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "HTML/可访问性", + "index": 33, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HtmlDeprecatedAttribute", + "shortDescription": { + "text": "废弃的特性" + }, + "fullDescription": { + "text": "报告过时的 HTML5 特性。 Inspection ID: HtmlDeprecatedAttribute", + "markdown": "报告过时的 HTML5 特性。\n\nInspection ID: HtmlDeprecatedAttribute" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "HtmlDeprecatedAttribute", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "HTML", + "index": 27, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "HtmlPresentationalElement", + "shortDescription": { + "text": "演示标记" + }, + "fullDescription": { + "text": "报告 HTML 表示标记。 建议将表示标记替换为 CSS 或其他标记。 Inspection ID: HtmlPresentationalElement", + "markdown": "报告 HTML 表示标记。 建议将表示标记替换为 CSS 或其他标记。\n\nInspection ID: HtmlPresentationalElement" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "HtmlPresentationalElement", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "HTML", + "index": 27, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "com.intellij.css", + "version": "261.26222.73", + "rules": [ + { + "id": "CssInvalidHtmlTagReference", + "shortDescription": { + "text": "无效类型选择器" + }, + "fullDescription": { + "text": "报告与未知 HTML 元素匹配的 CSS 类型选择器。 Inspection ID: CssInvalidHtmlTagReference", + "markdown": "报告与未知 HTML 元素匹配的 CSS [类型选择器](https://developer.mozilla.org/en-US/docs/Web/CSS/Type_selectors)。\n\nInspection ID: CssInvalidHtmlTagReference" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "CssInvalidHtmlTagReference", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/无效元素", + "index": 42, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssInvalidCustomPropertyAtRuleDeclaration", + "shortDescription": { + "text": "@property 声明无效" + }, + "fullDescription": { + "text": "报告自定义属性的声明中缺少的必需语法、继承或 initial-value 属性。 Inspection ID: CssInvalidCustomPropertyAtRuleDeclaration", + "markdown": "报告自定义属性的声明中缺少的必需[语法](https://developer.mozilla.org/en-US/docs/web/css/@property/syntax)、[继承](https://developer.mozilla.org/en-US/docs/web/css/@property/inherits)或 [initial-value](https://developer.mozilla.org/en-US/docs/web/css/@property/initial-value) 属性。\n\nInspection ID: CssInvalidCustomPropertyAtRuleDeclaration" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "CssInvalidCustomPropertyAtRuleDeclaration", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/无效元素", + "index": 42, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssInvalidFunction", + "shortDescription": { + "text": "无效函数" + }, + "fullDescription": { + "text": "报告未知的 CSS 函数或不正确的函数形参。 Inspection ID: CssInvalidFunction", + "markdown": "报告未知的 [CSS 函数](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Functions)或不正确的函数形参。\n\nInspection ID: CssInvalidFunction" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "CssInvalidFunction", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/无效元素", + "index": 42, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssMissingSemicolon", + "shortDescription": { + "text": "缺少分号" + }, + "fullDescription": { + "text": "报告声明末尾处缺少的分号。 Inspection ID: CssMissingSemicolon", + "markdown": "报告声明末尾处缺少的分号。\n\nInspection ID: CssMissingSemicolon" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "CssMissingSemicolon", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/代码样式问题", + "index": 49, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssRedundantUnit", + "shortDescription": { + "text": "冗余度量单位" + }, + "fullDescription": { + "text": "在规范不要求提供单位的情况下,报告值为零的度量单位。 示例: 'width: 0px' Inspection ID: CssRedundantUnit", + "markdown": "在规范不要求提供单位的情况下,报告值为零的度量单位。\n\n**示例:**\n\n width: 0px\n\nInspection ID: CssRedundantUnit" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "CssRedundantUnit", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/代码样式问题", + "index": 49, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssMissingComma", + "shortDescription": { + "text": "选择器列表中缺少逗号" + }, + "fullDescription": { + "text": "报告多行选择器。 这很可能表明实际上要使用多个单行选择器,但有一行或几行的末尾缺少逗号。 示例: 'input /* comma has probably been forgotten */\n.button {\n margin: 1px;\n}' Inspection ID: CssMissingComma", + "markdown": "报告多行选择器。 这很可能表明实际上要使用多个单行选择器,但有一行或几行的末尾缺少逗号。\n\n**示例:**\n\n\n input /* comma has probably been forgotten */\n .button {\n margin: 1px;\n }\n\nInspection ID: CssMissingComma" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "CssMissingComma", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/可能的 bug", + "index": 57, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssInvalidPropertyValue", + "shortDescription": { + "text": "无效的属性值" + }, + "fullDescription": { + "text": "报告不正确的 CSS 属性值。 Inspection ID: CssInvalidPropertyValue", + "markdown": "报告不正确的 CSS 属性值。\n\nInspection ID: CssInvalidPropertyValue" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "CssInvalidPropertyValue", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/无效元素", + "index": 42, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssBrowserCompatibilityForProperties", + "shortDescription": { + "text": "属性与所选浏览器不兼容" + }, + "fullDescription": { + "text": "报告不受指定浏览器支持的 CSS 属性。 基于 MDN 兼容性数据。 Inspection ID: CssBrowserCompatibilityForProperties", + "markdown": "报告不受指定浏览器支持的 CSS 属性。 基于 [MDN 兼容性数据](https://github.com/mdn/browser-compat-data)。\n\nInspection ID: CssBrowserCompatibilityForProperties" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "CssBrowserCompatibilityForProperties", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "CSS", + "index": 41, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssInvalidCustomPropertyAtRuleName", + "shortDescription": { + "text": "@property 名称无效" + }, + "fullDescription": { + "text": "报告无效的自定义属性名称。 自定义属性名称应以两个短划线作为前缀。 示例: '@property invalid-property-name {\n ...\n}\n\n@property --valid-property-name {\n ...\n}' Inspection ID: CssInvalidCustomPropertyAtRuleName", + "markdown": "报告无效的自定义属性名称。 自定义属性名称应以两个短划线作为前缀。\n\n**示例:**\n\n\n @property invalid-property-name {\n ...\n }\n\n @property --valid-property-name {\n ...\n }\n\nInspection ID: CssInvalidCustomPropertyAtRuleName" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "CssInvalidCustomPropertyAtRuleName", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/无效元素", + "index": 42, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssConvertColorToHexInspection", + "shortDescription": { + "text": "颜色可被替换为 #-hex" + }, + "fullDescription": { + "text": "报告 'rgb()'、'hsl()' 或其他颜色函数。 建议用等效的十六进制表示法代替颜色函数。 示例: 'rgb(12, 15, 255)' 在应用快速修复后: '#0c0fff'. Inspection ID: CssConvertColorToHexInspection", + "markdown": "报告 `rgb()`、`hsl()` 或其他颜色函数。\n\n建议用等效的十六进制表示法代替颜色函数。\n\n**示例:**\n\n rgb(12, 15, 255)\n\n在应用快速修复后:\n\n #0c0fff.\n\nInspection ID: CssConvertColorToHexInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "CssConvertColorToHexInspection", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "CSS", + "index": 41, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssReplaceWithShorthandUnsafely", + "shortDescription": { + "text": "属性或许可被替换为速记形式" + }, + "fullDescription": { + "text": "报告一组 CSS 常规属性,并建议将不完整的一组 CSS 常规属性替换为速记形式,但在本例中,速记形式并非 100% 等效。 例如,'outline-color' 和 'outline-style' 这 2 个属性可以替换为单个 'outline'。 此类替换不是 100% 等效,因为速记形式会将所有忽略的子值重置为其初始状态。 在本例中,切换到 'outling' 简写形式意味着 'outling-width' 也将设置为其初始值,即 'medium'。 此检查不会处理整组常规属性(在切换到速记形式 100% 安全时)。 对于此类情况,请参阅“属性可以安全替换为速记形式”检查。 Inspection ID: CssReplaceWithShorthandUnsafely", + "markdown": "报告一组 CSS 常规属性,并建议将不完整的一组 CSS 常规属性替换为速记形式,但在本例中,速记形式并非 100% 等效。\n\n\n例如,`outline-color` 和 `outline-style` 这 2 个属性可以替换为单个 `outline`。\n此类替换不是 100% 等效,因为速记形式会将所有忽略的子值重置为其初始状态。\n在本例中,切换到 `outling` 简写形式意味着 `outling-width` 也将设置为其初始值,即 `medium`。\n\n\n此检查不会处理整组常规属性(在切换到速记形式 100% 安全时)。\n对于此类情况,请参阅\"属性可以安全替换为速记形式\"检查。\n\nInspection ID: CssReplaceWithShorthandUnsafely" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "CssReplaceWithShorthandUnsafely", + "ideaSeverity": "INFORMATION", + "qodanaSeverity": "Info", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "CSS", + "index": 41, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssUnknownUnit", + "shortDescription": { + "text": "未知单位" + }, + "fullDescription": { + "text": "报告未知单元. Inspection ID: CssUnknownUnit", + "markdown": "报告未知单元.\n\nInspection ID: CssUnknownUnit" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "CssUnknownUnit", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/无效元素", + "index": 42, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssInvalidMediaFeature", + "shortDescription": { + "text": "无效媒体特性" + }, + "fullDescription": { + "text": "报告未知 CSS 媒体特性或不正确的媒体特性值。 Inspection ID: CssInvalidMediaFeature", + "markdown": "报告未知 [CSS 媒体特性](https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries)或不正确的媒体特性值。\n\nInspection ID: CssInvalidMediaFeature" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "CssInvalidMediaFeature", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/无效元素", + "index": 42, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssConvertColorToRgbInspection", + "shortDescription": { + "text": "颜色可被替换为 rgb()" + }, + "fullDescription": { + "text": "报告 'hsl()' 或 'hwb()' 颜色函数或十六进制的颜色表示法。 建议将此类颜色值替换为等效的 'rgb()' 或 'rgba()' 颜色函数。 示例: '#0c0fff' 在应用快速修复后: 'rgb(12, 15, 255)'. Inspection ID: CssConvertColorToRgbInspection", + "markdown": "报告 `hsl()` 或 `hwb()` 颜色函数或十六进制的颜色表示法。\n\n建议将此类颜色值替换为等效的 `rgb()` 或 `rgba()` 颜色函数。\n\n**示例:**\n\n #0c0fff\n\n在应用快速修复后:\n\n rgb(12, 15, 255).\n\nInspection ID: CssConvertColorToRgbInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "CssConvertColorToRgbInspection", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "CSS", + "index": 41, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssUnusedSymbol", + "shortDescription": { + "text": "未使用的选择器" + }, + "fullDescription": { + "text": "报告出现在选择器中但未在 HTML 中使用的 CSS 类或元素 ID。 请注意,只有通过代码 | 检查代码或代码 | 分析代码 | 按名称运行检查运行时,才能获得完整的检查结果。 由于性能原因,不实时检查样式表文件。 Inspection ID: CssUnusedSymbol", + "markdown": "报告出现在选择器中但未在 HTML 中使用的 CSS 类或元素 ID。\n\n\n请注意,只有通过**代码 \\| 检查代码** 或**代码 \\| 分析代码 \\| 按名称运行检查**运行时,才能获得完整的检查结果。\n由于性能原因,不实时检查样式表文件。\n\nInspection ID: CssUnusedSymbol" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "CssUnusedSymbol", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "CSS", + "index": 41, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssDeprecatedValue", + "shortDescription": { + "text": "弃用的值" + }, + "fullDescription": { + "text": "报告已弃用的 CSS 值。 建议将已弃用的值替换为其有效的等效值。 Inspection ID: CssDeprecatedValue", + "markdown": "报告已弃用的 CSS 值。 建议将已弃用的值替换为其有效的等效值。\n\nInspection ID: CssDeprecatedValue" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "CssDeprecatedValue", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "CSS", + "index": 41, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssNonIntegerLengthInPixels", + "shortDescription": { + "text": "非整数长度(像素)" + }, + "fullDescription": { + "text": "报告以像素为单位的非整数长度。 示例: 'width: 3.14px' Inspection ID: CssNonIntegerLengthInPixels", + "markdown": "报告以像素为单位的非整数长度。\n\n**示例:**\n\n width: 3.14px\n\nInspection ID: CssNonIntegerLengthInPixels" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "CssNonIntegerLengthInPixels", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/可能的 bug", + "index": 57, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssInvalidImport", + "shortDescription": { + "text": "@import 位置错误" + }, + "fullDescription": { + "text": "报告位置错误的 '@import' 语句。 根据规范,'@import' 规则必须在样式表的顶部定义,位于任何其他 at-rule('@charset' 和 '@layer' 除外)和样式声明之前,否则将被忽略。 Inspection ID: CssInvalidImport", + "markdown": "报告位置错误的 `@import` 语句。\n\n\n根据[规范](https://developer.mozilla.org/en-US/docs/Web/CSS/@import),`@import` 规则必须在样式表的顶部定义,位于任何其他 at-rule(`@charset` 和 `@layer` 除外)和样式声明之前,否则将被忽略。\n\nInspection ID: CssInvalidImport" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "CssInvalidImport", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/无效元素", + "index": 42, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssInvalidAtRule", + "shortDescription": { + "text": "未知 @ 规则" + }, + "fullDescription": { + "text": "报告未知的 CSS @ 规则。 Inspection ID: CssInvalidAtRule", + "markdown": "报告未知的 [CSS @ 规则](https://developer.mozilla.org/en-US/docs/Web/CSS/At-rule)。\n\nInspection ID: CssInvalidAtRule" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "CssInvalidAtRule", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/无效元素", + "index": 42, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssUnresolvedCustomProperty", + "shortDescription": { + "text": "未解析的自定义属性" + }, + "fullDescription": { + "text": "报告对 'var()' 函数实参中的自定义属性的未解析引用。 Inspection ID: CssUnresolvedCustomProperty", + "markdown": "报告对 `var()` 函数实参中的[自定义属性](https://developer.mozilla.org/en-US/docs/Web/CSS/--*)的未解析引用。\n\nInspection ID: CssUnresolvedCustomProperty" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "CssUnresolvedCustomProperty", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/无效元素", + "index": 42, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssOverwrittenProperties", + "shortDescription": { + "text": "覆盖的属性" + }, + "fullDescription": { + "text": "报告规则集中重复的 CSS 属性。 遵循速记属性。 示例: '.foo {\n margin-bottom: 1px;\n margin-bottom: 1px; /* duplicates margin-bottom */\n margin: 0; /* overrides margin-bottom */\n}' Inspection ID: CssOverwrittenProperties", + "markdown": "报告规则集中重复的 CSS 属性。 遵循速记属性。\n\n**示例:**\n\n\n .foo {\n margin-bottom: 1px;\n margin-bottom: 1px; /* duplicates margin-bottom */\n margin: 0; /* overrides margin-bottom */\n }\n\nInspection ID: CssOverwrittenProperties" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "CssOverwrittenProperties", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "CSS", + "index": 41, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssUnknownTarget", + "shortDescription": { + "text": "未解析的文件引用" + }, + "fullDescription": { + "text": "报告未解析的文件引用,例如 '@import' 语句中的不正确路径。 Inspection ID: CssUnknownTarget", + "markdown": "报告未解析的文件引用,例如 `@import` 语句中的不正确路径。\n\nInspection ID: CssUnknownTarget" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "CssUnknownTarget", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/无效元素", + "index": 42, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssNegativeValue", + "shortDescription": { + "text": "负属性值" + }, + "fullDescription": { + "text": "报告应不小于零的 CSS 负值属性(例如对象的宽度或高度)。 Inspection ID: CssNegativeValue", + "markdown": "报告应不小于零的 CSS 负值属性(例如对象的宽度或高度)。\n\nInspection ID: CssNegativeValue" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "CssNegativeValue", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/无效元素", + "index": 42, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssNoGenericFontName", + "shortDescription": { + "text": "缺少通用字体系列名称" + }, + "fullDescription": { + "text": "验证 'font-family' 属性是否包含通用的字体系列名称作为回退备选项。 通用字体系列名称包括:'serif'、'sans-serif'、'cursive'、'fantasy' 和 'monospace'。 Inspection ID: CssNoGenericFontName", + "markdown": "验证 [font-family](https://developer.mozilla.org/en-US/docs/Web/CSS/font-family) 属性是否包含通用的字体系列名称作为回退备选项。\n\n\n通用字体系列名称包括:`serif`、`sans-serif`、`cursive`、`fantasy` 和 `monospace`。\n\nInspection ID: CssNoGenericFontName" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "CssNoGenericFontName", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/可能的 bug", + "index": 57, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssUnresolvedClassInComposesRule", + "shortDescription": { + "text": "'composes' 规则中的未解析类" + }, + "fullDescription": { + "text": "报告 'composes' 规则中无法解析为任何有效目标的 CSS 类引用。 示例: '.className {/* ... */}\n\n .otherClassName {\n composes: className;\n }' Inspection ID: CssUnresolvedClassInComposesRule", + "markdown": "报告 ['composes'](https://github.com/css-modules/css-modules#composition) 规则中无法解析为任何有效目标的 CSS 类引用。\n\n**示例:**\n\n\n .className {/* ... */}\n\n .otherClassName {\n composes: className;\n }\n\nInspection ID: CssUnresolvedClassInComposesRule" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "CssUnresolvedClassInComposesRule", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/无效元素", + "index": 42, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssInvalidCharsetRule", + "shortDescription": { + "text": "@charset 位置错误或不正确" + }, + "fullDescription": { + "text": "报告位置错误的 '@charset' @ 规则或不正确的字符集值。 Inspection ID: CssInvalidCharsetRule", + "markdown": "报告位置错误的 `@charset` @ 规则或不正确的字符集值。\n\nInspection ID: CssInvalidCharsetRule" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "CssInvalidCharsetRule", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/无效元素", + "index": 42, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssReplaceWithShorthandSafely", + "shortDescription": { + "text": "属性可以安全地替换为速记形式" + }, + "fullDescription": { + "text": "报告一组普通属性。 建议将整组 CSS 常规属性替换为等效的速记形式。 例如,'padding-top'、'padding-right'、'padding-bottom' 和 'padding-left' 这 4 个属性可以安全地替换为单个 'padding' 属性。 注意,如果这组常规属性不完整(例如,规则集中只有 3 个 'padding-xxx' 属性),则不会显示此检查,因为切换到速记形式可能会改变结果。 对于此类情况,可以考虑执行“属性可能已被替换为速记形式”检查。 Inspection ID: CssReplaceWithShorthandSafely", + "markdown": "报告一组普通属性。 建议将整组 CSS 常规属性替换为等效的速记形式。\n\n\n例如,`padding-top`、`padding-right`、`padding-bottom` 和 `padding-left`\n这 4 个属性可以安全地替换为单个 `padding` 属性。\n\n\n注意,如果这组常规属性不完整(例如,规则集中只有 3 个 `padding-xxx` 属性),则不会显示此检查,因为切换到速记形式可能会改变结果。\n对于此类情况,可以考虑执行\"属性可能已被替换为速记形式\"检查。\n\nInspection ID: CssReplaceWithShorthandSafely" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "CssReplaceWithShorthandSafely", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "CSS", + "index": 41, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssUnknownProperty", + "shortDescription": { + "text": "未知属性" + }, + "fullDescription": { + "text": "报告未知的 CSS 属性或在错误的上下文中使用的属性。 将未知属性添加到“自定义 CSS 属性”列表以跳过验证。 Inspection ID: CssUnknownProperty", + "markdown": "报告未知的 CSS 属性或在错误的上下文中使用的属性。\n\n将未知属性添加到\"自定义 CSS 属性\"列表以跳过验证。\n\nInspection ID: CssUnknownProperty" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "CssUnknownProperty", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/无效元素", + "index": 42, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssInvalidPseudoSelector", + "shortDescription": { + "text": "无效的伪选择器" + }, + "fullDescription": { + "text": "报告不正确的 CSS pseudo-class pseudo-element。 Inspection ID: CssInvalidPseudoSelector", + "markdown": "报告不正确的 CSS [pseudo-class](https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-classes) [pseudo-element](https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-elements)。\n\nInspection ID: CssInvalidPseudoSelector" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "CssInvalidPseudoSelector", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/无效元素", + "index": 42, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CssInvalidNestedSelector", + "shortDescription": { + "text": "嵌套选择器无效" + }, + "fullDescription": { + "text": "报告以标识符或函数表示法开头的嵌套选择器。 Inspection ID: CssInvalidNestedSelector", + "markdown": "报告以标识符或函数表示法开头的嵌套选择器。\n\nInspection ID: CssInvalidNestedSelector" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "CssInvalidNestedSelector", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/无效元素", + "index": 42, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "org.jetbrains.plugins.yaml", + "version": "261.26222.73", + "rules": [ + { + "id": "YAMLSchemaValidation", + "shortDescription": { + "text": "由 JSON 架构验证" + }, + "fullDescription": { + "text": "如果指定了架构,则报告 YAML 文件和 JSON 架构之间的不一致。 方案示例: '{\n \"properties\": {\n \"SomeNumberProperty\": {\n \"type\": \"number\"\n }\n }\n }' 以下是带有相应警告的示例: 'SomeNumberProperty: hello world' Inspection ID: YAMLSchemaValidation", + "markdown": "如果指定了架构,则报告 YAML 文件和 JSON 架构之间的不一致。\n\n**方案示例:**\n\n\n {\n \"properties\": {\n \"SomeNumberProperty\": {\n \"type\": \"number\"\n }\n }\n }\n\n**以下是带有相应警告的示例:**\n\n\n SomeNumberProperty: hello world\n\nInspection ID: YAMLSchemaValidation" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "YAMLSchemaValidation", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "YAML", + "index": 46, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "YAMLIncompatibleTypes", + "shortDescription": { + "text": "可疑的类型不匹配" + }, + "fullDescription": { + "text": "报告 YAML 文件中的标量值类型与相似位置中的值类型不匹配。 示例: 'myElements:\n - value1\n - value2\n - false # <- 已报告,因为它是布尔值,而其他值是字符串' Inspection ID: YAMLIncompatibleTypes", + "markdown": "报告 YAML 文件中的标量值类型与相似位置中的值类型不匹配。\n\n**示例:**\n\n\n myElements:\n - value1\n - value2\n - false # <- 已报告,因为它是布尔值,而其他值是字符串\n\nInspection ID: YAMLIncompatibleTypes" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "YAMLIncompatibleTypes", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "YAML", + "index": 46, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "YAMLUnresolvedAlias", + "shortDescription": { + "text": "未解析的别名" + }, + "fullDescription": { + "text": "报告 YAML 文件中的未解析别名。 示例: 'some_key: *unknown_alias' Inspection ID: YAMLUnresolvedAlias", + "markdown": "报告 YAML 文件中的未解析别名。\n\n**示例:**\n\n\n some_key: *unknown_alias\n\nInspection ID: YAMLUnresolvedAlias" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "YAMLUnresolvedAlias", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "YAML", + "index": 46, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "YAMLSchemaDeprecation", + "shortDescription": { + "text": "弃用的 YAML 键" + }, + "fullDescription": { + "text": "报告 YAML 文件中已弃用的键。 仅当存在与相应 YAML 文件关联的 JSON 架构时,才会检查是否弃用。 请注意,JSON 架构规范中尚未定义弃用机制,并且此检查使用非标准的 'deprecationMessage' 扩展。 方案弃用示例: '{\n \"properties\": {\n \"SomeDeprecatedProperty\": {\n \"deprecationMessage\": \"Baz\",\n \"description\": \"Foo bar\"\n }\n }\n }' 以下是带有相应警告的示例: 'SomeDeprecatedProperty: some value' Inspection ID: YAMLSchemaDeprecation", + "markdown": "报告 YAML 文件中已弃用的键。\n\n仅当存在与相应 YAML 文件关联的 JSON 架构时,才会检查是否弃用。\n\n请注意,JSON 架构规范中尚未定义弃用机制,并且此检查使用非标准的 `deprecationMessage` 扩展。\n\n**方案弃用示例:**\n\n\n {\n \"properties\": {\n \"SomeDeprecatedProperty\": {\n \"deprecationMessage\": \"Baz\",\n \"description\": \"Foo bar\"\n }\n }\n }\n\n**以下是带有相应警告的示例:**\n\n\n SomeDeprecatedProperty: some value\n\nInspection ID: YAMLSchemaDeprecation" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "YAMLSchemaDeprecation", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "YAML", + "index": 46, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "YAMLRecursiveAlias", + "shortDescription": { + "text": "递归别名" + }, + "fullDescription": { + "text": "报告 YAML 别名中的递归。 别名不能递归并在相应定位标记引用的数据中使用。 示例: 'some_key: &some_anchor\n sub_key1: value1\n sub_key2: *some_anchor' Inspection ID: YAMLRecursiveAlias", + "markdown": "报告 YAML 别名中的递归。\n\n别名不能递归并在相应定位标记引用的数据中使用。\n\n**示例:**\n\n\n some_key: &some_anchor\n sub_key1: value1\n sub_key2: *some_anchor\n\nInspection ID: YAMLRecursiveAlias" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "YAMLRecursiveAlias", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "YAML", + "index": 46, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "YAMLDuplicatedKeys", + "shortDescription": { + "text": "重复的 YAML 键" + }, + "fullDescription": { + "text": "报告 YAML 文件中的重复键。 示例: 'same_key: some value\n same_key: another value' Inspection ID: YAMLDuplicatedKeys", + "markdown": "报告 YAML 文件中的重复键。\n\n**示例:**\n\n\n same_key: some value\n same_key: another value\n\nInspection ID: YAMLDuplicatedKeys" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "YAMLDuplicatedKeys", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "YAML", + "index": 46, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "YAMLUnusedAnchor", + "shortDescription": { + "text": "未使用的定位标记" + }, + "fullDescription": { + "text": "报告未使用的定位标记。 示例: 'some_key: &some_anchor\n key1: value1' Inspection ID: YAMLUnusedAnchor", + "markdown": "报告未使用的定位标记。\n\n**示例:**\n\n\n some_key: &some_anchor\n key1: value1\n\nInspection ID: YAMLUnusedAnchor" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "YAMLUnusedAnchor", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "YAML", + "index": 46, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "org.jetbrains.plugins.less", + "version": "261.26222.73", + "rules": [ + { + "id": "LessUnresolvedMixin", + "shortDescription": { + "text": "未解析的 mixin" + }, + "fullDescription": { + "text": "报告对未解析的 Less mixin 的引用。 示例: '* {\n .unknown-mixin();\n}' Inspection ID: LessUnresolvedMixin", + "markdown": "报告对未解析的 [Less mixin](http://lesscss.org/features/#mixins-feature) 的引用。\n\n**示例:**\n\n\n * {\n .unknown-mixin();\n }\n\nInspection ID: LessUnresolvedMixin" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "LessUnresolvedMixin", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "Less", + "index": 50, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "LessUnresolvedVariable", + "shortDescription": { + "text": "未解析的变量" + }, + "fullDescription": { + "text": "报告对未解析的 Less 变量的引用。 示例: '* {\n margin: @unknown-var;\n}' Inspection ID: LessUnresolvedVariable", + "markdown": "报告对未解析的 [Less 变量](http://lesscss.org/features/#variables-feature)的引用。\n\n**示例:**\n\n\n * {\n margin: @unknown-var;\n }\n\nInspection ID: LessUnresolvedVariable" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "LessUnresolvedVariable", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "Less", + "index": 50, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "LessResolvedByNameOnly", + "shortDescription": { + "text": "缺少 import" + }, + "fullDescription": { + "text": "报告对在另一个文件中已声明但未在当前文件中显式导入的变量或 mixin 的引用。 示例: '* {\n margin: @var-in-other-file;\n}' Inspection ID: LessResolvedByNameOnly", + "markdown": "报告对在另一个文件中已声明但未在当前文件中显式[导入](http://lesscss.org/features/#import-atrules-feature)的变量或 mixin 的引用。\n\n**示例:**\n\n\n * {\n margin: @var-in-other-file;\n }\n\nInspection ID: LessResolvedByNameOnly" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "LessResolvedByNameOnly", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "Less", + "index": 50, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "org.jetbrains.plugins.vue", + "version": "261.26222.73", + "rules": [ + { + "id": "VueDataFunction", + "shortDescription": { + "text": "数据函数" + }, + "fullDescription": { + "text": "报告并非函数的 Vue 组件 data 属性。 建议用函数包装对象字面量。 在定义组件时,'data' 必须声明为返回初始数据对象的函数,因为将使用相同的定义创建多个实例。 如果 'data' 仍然使用普通对象,那么该对象将通过引用来在创建的所有实例中共享! 有了 'data' 函数,每次创建新实例时,都可以直接调用它以返回初始数据的新副本。 Inspection ID: VueDataFunction", + "markdown": "报告并非函数的 Vue 组件 [data](https://vuejs.org/v2/api/#data) 属性。 建议用函数包装对象字面量。\n\n在定义组件时,`data` 必须声明为返回初始数据对象的函数,因为将使用相同的定义创建多个实例。 如果 `data` 仍然使用普通对象,那么该对象将通过引用来在创建的所有实例中共享! 有了 `data` 函数,每次创建新实例时,都可以直接调用它以返回初始数据的新副本。\n\nInspection ID: VueDataFunction" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "VueDataFunction", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "Vue", + "index": 52, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "VueUnrecognizedSlot", + "shortDescription": { + "text": "无法识别的槽位" + }, + "fullDescription": { + "text": "报告无法识别的 Vue 插槽。 Inspection ID: VueUnrecognizedSlot", + "markdown": "报告无法识别的 Vue 插槽。\n\nInspection ID: VueUnrecognizedSlot" + }, + "defaultConfiguration": { + "enabled": false, + "level": "note", + "parameters": { + "suppressToolId": "VueUnrecognizedSlot", + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "Vue", + "index": 52, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "VueMissingComponentImportInspection", + "shortDescription": { + "text": "缺少组件导入" + }, + "fullDescription": { + "text": "报告需要在 Vue 模板中导入的 Vue 组件。 它提供了一个快速修复来添加缺失的导入。 Inspection ID: VueMissingComponentImportInspection", + "markdown": "报告需要在 Vue 模板中导入的 Vue 组件。 它提供了一个快速修复来添加缺失的导入。\n\nInspection ID: VueMissingComponentImportInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "VueMissingComponentImportInspection", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "Vue", + "index": 52, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "VueUnrecognizedDirective", + "shortDescription": { + "text": "无法识别的指令" + }, + "fullDescription": { + "text": "报告无法识别的 Vue 指令。 Inspection ID: VueUnrecognizedDirective", + "markdown": "报告无法识别的 Vue 指令。\n\nInspection ID: VueUnrecognizedDirective" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "VueUnrecognizedDirective", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "Vue", + "index": 52, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "VueDuplicateTag", + "shortDescription": { + "text": "重复的模板/脚本标记" + }, + "fullDescription": { + "text": "报告 Vue 文件中 'template' 或 'script' 标记的多次用法。 Vue 组件规范指示每个 '*.vue' 文件一次最多只能包含一个 'template' 或 'script' 块。 Inspection ID: VueDuplicateTag", + "markdown": "报告 Vue 文件中 `template` 或 `script` 标记的多次用法。\n\n[Vue 组件规范](https://vue-loader.vuejs.org/spec.html)指示每个 `*.vue` 文件一次最多只能包含一个 `template` 或 `script` 块。\n\nInspection ID: VueDuplicateTag" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "VueDuplicateTag", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "Vue", + "index": 52, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "VueDeprecatedSymbol", + "shortDescription": { + "text": "已弃用的符号" + }, + "fullDescription": { + "text": "报告已弃用的 Vue 符号。 Inspection ID: VueDeprecatedSymbol", + "markdown": "报告已弃用的 Vue 符号。\n\nInspection ID: VueDeprecatedSymbol" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "VueDeprecatedSymbol", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "Vue", + "index": 52, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "org.intellij.qodana", + "version": "261.26222.73", + "rules": [ + { + "id": "JsCoverageInspection", + "shortDescription": { + "text": "检查 JavaScript 和 TypeScript 源代码覆盖率" + }, + "fullDescription": { + "text": "报告覆盖率低于某个阈值的方法、类和文件。 Inspection ID: JsCoverageInspection", + "markdown": "报告覆盖率低于某个阈值的方法、类和文件。\n\nInspection ID: JsCoverageInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JsCoverageInspection", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Unspecified" + } + }, + "relationships": [ + { + "target": { + "id": "代码覆盖率", + "index": 63, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CyclomaticComplexityInspection", + "shortDescription": { + "text": "代码指标" + }, + "fullDescription": { + "text": "计算循环复杂度。 Inspection ID: CyclomaticComplexityInspection", + "markdown": "计算循环复杂度。\n\nInspection ID: CyclomaticComplexityInspection" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "CyclomaticComplexityInspection", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Unspecified" + } + }, + "relationships": [ + { + "target": { + "id": "Qodana", + "index": 66, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "org.jetbrains.plugins.github", + "version": "261.26222.73", + "rules": [ + { + "id": "GithubFunctionSignatureValidation", + "shortDescription": { + "text": "标准库函数验证" + }, + "fullDescription": { + "text": "报告无效的 GitHub Actions Expression 语言标准库函数调用 有关 GitHub Actions Expression 语言的详细信息,请参阅 GitHub 文档。 Inspection ID: GithubFunctionSignatureValidation", + "markdown": "报告无效的 GitHub Actions Expression 语言标准库函数调用\n\n\n有关 GitHub Actions Expression 语言的详细信息,请参阅 [GitHub 文档](https://docs.github.com/en/actions/learn-github-actions/expressions)。\n\nInspection ID: GithubFunctionSignatureValidation" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "GithubFunctionSignatureValidation", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "GitHub 操作", + "index": 64, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "IllegalJobDependency", + "shortDescription": { + "text": "未定义的作业依赖项" + }, + "fullDescription": { + "text": "检测 GitHub 工作流 YML 文件中未定义作业的依赖关系。 有关工作流语法的更多信息,请参阅 GitHub Actions 文档。 Inspection ID: IllegalJobDependency", + "markdown": "检测 GitHub 工作流 YML 文件中未定义作业的依赖关系。\n\n\n有关工作流语法的更多信息,请参阅 [GitHub Actions 文档](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idneeds)。\n\nInspection ID: IllegalJobDependency" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "IllegalJobDependency", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "GitHub 操作", + "index": 64, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "CyclicJobDependency", + "shortDescription": { + "text": "循环作业依赖关系" + }, + "fullDescription": { + "text": "检测 GitHub 工作流 YML 文件中作业的循环依赖关系。 有关工作流语法的更多信息,请参阅 GitHub Actions 文档。 Inspection ID: CyclicJobDependency", + "markdown": "检测 GitHub 工作流 YML 文件中作业的循环依赖关系。\n\n\n有关工作流语法的更多信息,请参阅 [GitHub Actions 文档](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idneeds)。\n\nInspection ID: CyclicJobDependency" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "CyclicJobDependency", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "GitHub 操作", + "index": 64, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "UndefinedParamsPresent", + "shortDescription": { + "text": "未定义的形参" + }, + "fullDescription": { + "text": "报告是否存在未在操作中定义的形参。 它还通过移除未定义的形参提供快速修复。 有关操作形参的详细信息,请参阅 GitHub 文档。 Inspection ID: UndefinedParamsPresent", + "markdown": "报告是否存在未在操作中定义的形参。 它还通过移除未定义的形参提供快速修复。\n\n\n有关操作形参的详细信息,请参阅 [GitHub 文档](https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#runsstepswith)。\n\nInspection ID: UndefinedParamsPresent" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "UndefinedParamsPresent", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "GitHub 操作", + "index": 64, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "MandatoryParamsAbsent", + "shortDescription": { + "text": "形参无效" + }, + "fullDescription": { + "text": "报告缺少无操作默认值的强制形参的情况。 它还通过用空值添加缺少的形参来提供快速修复。 有关操作形参的详细信息,请参阅 GitHub 文档。 Inspection ID: MandatoryParamsAbsent", + "markdown": "报告缺少无操作默认值的强制形参的情况。 它还通过用空值添加缺少的形参来提供快速修复。\n\n\n有关操作形参的详细信息,请参阅 [GitHub 文档](https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#runsstepswith)。\n\nInspection ID: MandatoryParamsAbsent" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "MandatoryParamsAbsent", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "GitHub 操作", + "index": 64, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "UndefinedAction", + "shortDescription": { + "text": "未定义的操作/文件引用" + }, + "fullDescription": { + "text": "检测 GitHub 操作和工作流文件中未解析的操作引用。 有关操作引用的详细信息,请参阅 GitHub文档。 Inspection ID: UndefinedAction", + "markdown": "检测 GitHub 操作和工作流文件中未解析的操作引用。\n\n\n有关操作引用的详细信息,请参阅 [GitHub文档](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsuses)。\n\nInspection ID: UndefinedAction" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "UndefinedAction", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "GitHub 操作", + "index": 64, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "org.jetbrains.plugins.gitlab", + "version": "261.26222.73", + "rules": [ + { + "id": "DuplicatedJobUsage", + "shortDescription": { + "text": "重复的作业用法" + }, + "fullDescription": { + "text": "检测 GitLab CI/CD 配置文件中重复的作业用法。 有关作业引用的更多信息,请参阅 GitLab 文档。 Inspection ID: DuplicatedJobUsage", + "markdown": "检测 GitLab CI/CD 配置文件中重复的作业用法。\n\n\n有关作业引用的更多信息,请参阅 [GitLab 文档](https://docs.gitlab.com/ee/ci/jobs/index.html)。\n\nInspection ID: DuplicatedJobUsage" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "DuplicatedJobUsage", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Unspecified" + } + }, + "relationships": [ + { + "target": { + "id": "GitLab CI_CD", + "index": 65, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "UndefinedStage", + "shortDescription": { + "text": "未定义的暂存" + }, + "fullDescription": { + "text": "检测 GitLab CI/CD 配置文件中未解析的暂存引用。 有关暂存引用的更多信息,请参阅 GitLab 文档。 Inspection ID: UndefinedStage", + "markdown": "检测 GitLab CI/CD 配置文件中未解析的暂存引用。\n\n\n有关暂存引用的更多信息,请参阅 [GitLab 文档](https://docs.gitlab.com/ee/ci/yaml/index.html#stages)。\n\nInspection ID: UndefinedStage" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "UndefinedStage", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Unspecified" + } + }, + "relationships": [ + { + "target": { + "id": "GitLab CI_CD", + "index": 65, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "UndefinedJob", + "shortDescription": { + "text": "未定义的作业" + }, + "fullDescription": { + "text": "检测 GitLab CI/CD 配置文件中未解析的作业引用。 有关作业引用的更多信息,请参阅 GitLab 文档。 Inspection ID: UndefinedJob", + "markdown": "检测 GitLab CI/CD 配置文件中未解析的作业引用。\n\n\n有关作业引用的更多信息,请参阅 [GitLab 文档](https://docs.gitlab.com/ee/ci/jobs/index.html)。\n\nInspection ID: UndefinedJob" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "UndefinedJob", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Unspecified" + } + }, + "relationships": [ + { + "target": { + "id": "GitLab CI_CD", + "index": 65, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "com.intellij.stylelint", + "version": "261.26222.73", + "rules": [ + { + "id": "Stylelint", + "shortDescription": { + "text": "Stylelint" + }, + "fullDescription": { + "text": "报告 Stylelint linter 检测到的差异。 高亮显示基于 Stylelint 配置文件中为每条规则指定的规则严重性。 Inspection ID: Stylelint", + "markdown": "报告 [Stylelint](http://stylelint.io) linter 检测到的差异。 \n\n高亮显示基于 [Stylelint 配置文件](https://stylelint.io/user-guide/configure)中为每条规则指定的规则严重性。\n\nInspection ID: Stylelint" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "Stylelint", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Code Style" + } + }, + "relationships": [ + { + "target": { + "id": "CSS/代码质量工具", + "index": 67, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "intellij.webpack", + "version": "261.26222.73", + "rules": [ + { + "id": "WebpackConfigHighlighting", + "shortDescription": { + "text": "Webpack 配置符合 JSON 架构" + }, + "fullDescription": { + "text": "根据 webpack 选项架构验证 webpack 配置文件中的选项(名称应以 `webpack` 开头,例如 `webpack.config.js`)。 禁用此检查以关闭配置对象内部的验证和代码补全。 Inspection ID: WebpackConfigHighlighting", + "markdown": "根据 [webpack 选项架构](https://github.com/webpack/webpack/blob/master/schemas/WebpackOptions.json)验证 webpack 配置文件中的选项(名称应以 \\`webpack\\` 开头,例如 \\`webpack.config.js\\`)。 \n\n禁用此检查以关闭配置对象内部的验证和代码补全。\n\nInspection ID: WebpackConfigHighlighting" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "WebpackConfigHighlighting", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/常规", + "index": 18, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "tslint", + "version": "261.26222.73", + "rules": [ + { + "id": "TsLint", + "shortDescription": { + "text": "TSLint" + }, + "fullDescription": { + "text": "报告 TSLint linter 检测到的差异。 高亮显示基于 TSLint 配置文件中为每条规则指定的规则严重性。 清除“使用配置文件中的规则严重性”复选框,对所有 TSLint 规则使用该项检查中配置的严重性。 Inspection ID: TsLint", + "markdown": "报告 [TSLint](https://github.com/palantir/tslint) linter 检测到的差异。 \n\n高亮显示基于 [TSLint 配置文件](https://palantir.github.io/tslint/usage/configuration/)中为每条规则指定的规则严重性。 \n\n清除\"使用配置文件中的规则严重性\"复选框,对所有 TSLint 规则使用该项检查中配置的严重性。\n\nInspection ID: TsLint" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "TsLint", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Unspecified" + } + }, + "relationships": [ + { + "target": { + "id": "JavaScript 和 TypeScript/代码质量工具", + "index": 62, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "org.jetbrains.plugins.docker.gateway", + "version": "261.26222.73", + "rules": [ + { + "id": "DevcontainerFolder", + "shortDescription": { + "text": "Dev Container 文件夹结构问题" + }, + "fullDescription": { + "text": "检查嵌套的 .devcontainer 文件夹,查看其是否具有不明确的 Dev Container 上下文,或者是否在需要的地方缺少父级 .devcontainer 文件夹。 Inspection ID: DevcontainerFolder", + "markdown": "检查嵌套的 .devcontainer 文件夹,查看其是否具有不明确的 Dev Container 上下文,或者是否在需要的地方缺少父级 .devcontainer 文件夹。\n\nInspection ID: DevcontainerFolder" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "DevcontainerFolder", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Unspecified" + } + }, + "relationships": [ + { + "target": { + "id": "Dev Container", + "index": 70, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "DevContainerIdeSettings", + "shortDescription": { + "text": "验证 IDE 设置" + }, + "fullDescription": { + "text": "验证 IDE 设置名称和值。 Inspection ID: DevContainerIdeSettings", + "markdown": "验证 IDE 设置名称和值。\n\nInspection ID: DevContainerIdeSettings" + }, + "defaultConfiguration": { + "enabled": false, + "level": "error", + "parameters": { + "suppressToolId": "DevContainerIdeSettings", + "ideaSeverity": "ERROR", + "qodanaSeverity": "Critical", + "codeQualityCategory": "Unspecified" + } + }, + "relationships": [ + { + "target": { + "id": "Dev Container", + "index": 70, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "com.intellij.jsonpath", + "version": "261.26222.73", + "rules": [ + { + "id": "JsonPathEvaluateUnknownKey", + "shortDescription": { + "text": "为 JSONPath 求值表达式使用未知属性键" + }, + "fullDescription": { + "text": "报告源 JSON 文档中要求值的 JSONPath 表达式中缺少的键。 Inspection ID: JsonPathEvaluateUnknownKey", + "markdown": "报告源 JSON 文档中要求值的 JSONPath 表达式中缺少的键。\n\nInspection ID: JsonPathEvaluateUnknownKey" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JsonPathEvaluateUnknownKey", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JSONPath", + "index": 71, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JsonPathUnknownFunction", + "shortDescription": { + "text": "未知 JSONPath 函数" + }, + "fullDescription": { + "text": "报告在 JSONPath 函数调用中使用了未知名称,而不是已知的标准函数名称: 'concat'、'keys'、'length'、'min'、'max'、'avg'、'stddev'、'sum'。 Inspection ID: JsonPathUnknownFunction", + "markdown": "报告在 JSONPath 函数调用中使用了未知名称,而不是已知的标准函数名称: `concat`、`keys`、`length`、`min`、`max`、`avg`、`stddev`、`sum`。\n\nInspection ID: JsonPathUnknownFunction" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JsonPathUnknownFunction", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JSONPath", + "index": 71, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + }, + { + "id": "JsonPathUnknownOperator", + "shortDescription": { + "text": "未知 JSONPath 运算符" + }, + "fullDescription": { + "text": "报告在 JSONPath 表达式中使用了未知运算符,而不是其中一种标准运算符: 'in'、'nin'、'subsetof'、'anyof'、'noneof'、'size'、'empty'、'contains'。 Inspection ID: JsonPathUnknownOperator", + "markdown": "报告在 JSONPath 表达式中使用了未知运算符,而不是其中一种标准运算符: `in`、`nin`、`subsetof`、`anyof`、`noneof`、`size`、`empty`、`contains`。\n\nInspection ID: JsonPathUnknownOperator" + }, + "defaultConfiguration": { + "enabled": false, + "level": "warning", + "parameters": { + "suppressToolId": "JsonPathUnknownOperator", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Reliability" + } + }, + "relationships": [ + { + "target": { + "id": "JSONPath", + "index": 71, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + }, + { + "name": "org.toml.lang", + "version": "261.26222.73", + "rules": [ + { + "id": "TomlUnresolvedReference", + "shortDescription": { + "text": "未解析的引用" + }, + "fullDescription": { + "text": "报告 TOML 文件中未解析的引用。 Inspection ID: TomlUnresolvedReference", + "markdown": "报告 TOML 文件中未解析的引用。\n\nInspection ID: TomlUnresolvedReference" + }, + "defaultConfiguration": { + "enabled": true, + "level": "warning", + "parameters": { + "suppressToolId": "TomlUnresolvedReference", + "ideaSeverity": "WARNING", + "qodanaSeverity": "High", + "codeQualityCategory": "Sanity" + } + }, + "relationships": [ + { + "target": { + "id": "TOML", + "index": 75, + "toolComponent": { + "name": "RR" + } + }, + "kinds": [ + "superset" + ] + } + ] + } + ], + "language": "en-US", + "contents": [ + "localizedData", + "nonLocalizedData" + ], + "isComprehensive": false + } + ] + }, + "invocations": [ + { + "startTimeUtc": "2026-07-16T00:56:42.253056Z", + "exitCode": 0, + "executionSuccessful": true + } + ], + "language": "en-US", + "versionControlProvenance": [ + { + "repositoryUri": "https://github.com/IvanHanloth/Boss-Key.git", + "revisionId": "a33c47131a3c7e1840727588c00f00c707ee52a7", + "branch": "chore/clean-up", + "properties": { + "repoUrl": "https://github.com/IvanHanloth/Boss-Key.git", + "lastAuthorName": "Ivan Hanloth", + "vcsType": "Git", + "lastAuthorEmail": "ivan@hanloth.com" + } + } + ], + "originalUriBaseIds": { + "SRCROOT": { + "description": { + "text": "The subdirectory within the project that was analyzed (--project-dir qodana CLI parameter)" + } + } + }, + "results": [ + { + "ruleId": "RsAssertEqual", + "kind": "fail", + "level": "note", + "message": { + "text": "`assert!(a != b)` 可被替换为 `assert_ne!(a, b)`", + "markdown": "\\`assert!(a != b)\\` 可被替换为 \\`assert_ne!(a, b)\\`" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "crates/core/src/mouse_hook.rs", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 463, + "startColumn": 9, + "charOffset": 13667, + "charLength": 107, + "snippet": { + "text": "assert!(\r\n corner_flags_from(&Setting::default()) & F_FAST != 0,\r\n \"默认只认快速移动\"\r\n " + }, + "sourceLanguage": "Rust" + }, + "contextRegion": { + "startLine": 461, + "startColumn": 1, + "charOffset": 13590, + "charLength": 279, + "snippet": { + "text": " });\r\n assert_eq!(corner_flags_from(&s) & F_FAST, 0);\r\n assert!(\r\n corner_flags_from(&Setting::default()) & F_FAST != 0,\r\n \"默认只认快速移动\"\r\n );\r\n assert!(\r\n !wants_hook(&setting_with(|s| s.corner_fast_only = true)),\r" + }, + "sourceLanguage": "Rust" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "Boss-Key", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "ca336fed2bd6a26a", + "equalIndicator/v1": "7ebabe6abc67f084ae94ca5f50edc7fe51e552ee5e2f3623c208f5dcf364d86a" + }, + "properties": { + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "problemType": "REGULAR", + "tags": [ + "Rust" + ] + } + }, + { + "ruleId": "RsUnnecessaryQualifications", + "kind": "fail", + "level": "note", + "message": { + "text": "路径前缀不必要", + "markdown": "路径前缀不必要" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "crates/core/src/icon.rs", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 73, + "startColumn": 17, + "charOffset": 2271, + "charLength": 10, + "snippet": { + "text": "std::mem::" + }, + "sourceLanguage": "Rust" + }, + "contextRegion": { + "startLine": 71, + "startColumn": 1, + "charOffset": 2196, + "charLength": 196, + "snippet": { + "text": " if GetObjectW(\r\n color.into(),\r\n std::mem::size_of::() as i32,\r\n Some(&mut bmp as *mut BITMAP as *mut c_void),\r\n ) == 0\r" + }, + "sourceLanguage": "Rust" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "Boss-Key", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "546ba0ca16e1947d", + "equalIndicator/v1": "0dceb28d2e83e49775668a590fab1bc4309a3e620ec198379b967aacc5496100" + }, + "properties": { + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "problemType": "REGULAR", + "tags": [ + "Rust" + ] + } + }, + { + "ruleId": "RsUnnecessaryQualifications", + "kind": "fail", + "level": "note", + "message": { + "text": "路径前缀不必要", + "markdown": "路径前缀不必要" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "crates/core/src/freeze.rs", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 83, + "startColumn": 21, + "charOffset": 2744, + "charLength": 10, + "snippet": { + "text": "std::mem::" + }, + "sourceLanguage": "Rust" + }, + "contextRegion": { + "startLine": 81, + "startColumn": 1, + "charOffset": 2669, + "charLength": 168, + "snippet": { + "text": " };\r\n let mut entry = PROCESSENTRY32W {\r\n dwSize: std::mem::size_of::() as u32,\r\n ..Default::default()\r\n };\r" + }, + "sourceLanguage": "Rust" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "Boss-Key", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "c9477bdf7d366cc8", + "equalIndicator/v1": "1a53aa74f109f6d7fcb4dbb71500cd44cbcfb79a89947eea695baad29083722f" + }, + "properties": { + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "problemType": "REGULAR", + "tags": [ + "Rust" + ] + } + }, + { + "ruleId": "RsUnnecessaryQualifications", + "kind": "fail", + "level": "note", + "message": { + "text": "路径前缀不必要", + "markdown": "路径前缀不必要" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "crates/core/src/ipc_server.rs", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 194, + "startColumn": 13, + "charOffset": 5429, + "charLength": 10, + "snippet": { + "text": "std::mem::" + }, + "sourceLanguage": "Rust" + }, + "contextRegion": { + "startLine": 192, + "startColumn": 1, + "charOffset": 5360, + "charLength": 128, + "snippet": { + "text": " assert_eq!(\n sec.sa.nLength as usize,\n std::mem::size_of::()\n );\n }" + }, + "sourceLanguage": "Rust" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "Boss-Key", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "97b037593971775b", + "equalIndicator/v1": "1f8c335225dac12c055aeb8ec81cf09bef3f1333873b940b68a76ab8a85d7581" + }, + "properties": { + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "problemType": "REGULAR", + "tags": [ + "Rust" + ] + } + }, + { + "ruleId": "RsUnnecessaryQualifications", + "kind": "fail", + "level": "note", + "message": { + "text": "路径前缀不必要", + "markdown": "路径前缀不必要" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "crates/core/src/idle.rs", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 6, + "startColumn": 17, + "charOffset": 237, + "charLength": 10, + "snippet": { + "text": "std::mem::" + }, + "sourceLanguage": "Rust" + }, + "contextRegion": { + "startLine": 4, + "startColumn": 1, + "charOffset": 148, + "charLength": 159, + "snippet": { + "text": "pub fn idle_millis() -> Option {\n let mut info = LASTINPUTINFO {\n cbSize: std::mem::size_of::() as u32,\n dwTime: 0,\n };" + }, + "sourceLanguage": "Rust" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "Boss-Key", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "2114c055f371ac92", + "equalIndicator/v1": "2d12c131b1b1fdbb675dce2d44c7e44cc08daa33db3ffc030cb586deaa87a19c" + }, + "properties": { + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "problemType": "REGULAR", + "tags": [ + "Rust" + ] + } + }, + { + "ruleId": "RsUnnecessaryQualifications", + "kind": "fail", + "level": "note", + "message": { + "text": "路径前缀不必要", + "markdown": "路径前缀不必要" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "crates/core/src/tray.rs", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 107, + "startColumn": 21, + "charOffset": 2805, + "charLength": 10, + "snippet": { + "text": "std::mem::" + }, + "sourceLanguage": "Rust" + }, + "contextRegion": { + "startLine": 105, + "startColumn": 1, + "charOffset": 2697, + "charLength": 212, + "snippet": { + "text": " fn base_data(&self) -> NOTIFYICONDATAW {\r\n let mut data = NOTIFYICONDATAW {\r\n cbSize: std::mem::size_of::() as u32,\r\n hWnd: self.hwnd,\r\n uID: TRAY_ID,\r" + }, + "sourceLanguage": "Rust" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "Boss-Key", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "4f2d5d20848b10c0", + "equalIndicator/v1": "58fc91dd5a5dd2c38a73de2560aa971718d85dd3862d2c5202127ee8dd7331b9" + }, + "properties": { + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "problemType": "REGULAR", + "tags": [ + "Rust" + ] + } + }, + { + "ruleId": "RsUnnecessaryQualifications", + "kind": "fail", + "level": "note", + "message": { + "text": "路径前缀不必要", + "markdown": "路径前缀不必要" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "apps/config/src-tauri/src/lib.rs", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 532, + "startColumn": 40, + "charOffset": 15663, + "charLength": 11, + "snippet": { + "text": "std::time::" + }, + "sourceLanguage": "Rust" + }, + "contextRegion": { + "startLine": 530, + "startColumn": 1, + "charOffset": 15510, + "charLength": 301, + "snippet": { + "text": " if let Some(window) = app.get_webview_window(\"main\") {\r\n std::thread::spawn(move || {\r\n std::thread::sleep(std::time::Duration::from_secs(5));\r\n if !window.is_visible().unwrap_or(false) {\r\n let _ = window.show();\r" + }, + "sourceLanguage": "Rust" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "Boss-Key", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "b48f49f301e41b9d", + "equalIndicator/v1": "65e0ebb6ead46088b1ecb350f1590e85ba940c44c7de6854716b455e6b31482e" + }, + "properties": { + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "problemType": "REGULAR", + "tags": [ + "Rust" + ] + } + }, + { + "ruleId": "RsUnnecessaryQualifications", + "kind": "fail", + "level": "note", + "message": { + "text": "路径前缀不必要", + "markdown": "路径前缀不必要" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "crates/core/src/icon.rs", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 87, + "startColumn": 25, + "charOffset": 2772, + "charLength": 10, + "snippet": { + "text": "std::mem::" + }, + "sourceLanguage": "Rust" + }, + "contextRegion": { + "startLine": 85, + "startColumn": 1, + "charOffset": 2667, + "charLength": 252, + "snippet": { + "text": " let hdc = GetDC(None);\r\n let header = BITMAPINFOHEADER {\r\n biSize: std::mem::size_of::() as u32,\r\n biWidth: width as i32,\r\n biHeight: -(height as i32), // 负值 = 顶到底行序\r" + }, + "sourceLanguage": "Rust" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "Boss-Key", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "a4a4efb76d81d750", + "equalIndicator/v1": "699058fe2a76cc40ecdc0ad8b5aaf8093a5d42dd56f6a085d6ae2ee239da3545" + }, + "properties": { + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "problemType": "REGULAR", + "tags": [ + "Rust" + ] + } + }, + { + "ruleId": "RsUnnecessaryQualifications", + "kind": "fail", + "level": "note", + "message": { + "text": "路径前缀不必要", + "markdown": "路径前缀不必要" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "crates/core/src/icon.rs", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 45, + "startColumn": 13, + "charOffset": 1477, + "charLength": 10, + "snippet": { + "text": "std::mem::" + }, + "sourceLanguage": "Rust" + }, + "contextRegion": { + "startLine": 43, + "startColumn": 1, + "charOffset": 1392, + "charLength": 182, + "snippet": { + "text": " FILE_FLAGS_AND_ATTRIBUTES(0),\r\n Some(&mut info),\r\n std::mem::size_of::() as u32,\r\n SHGFI_ICON | SHGFI_LARGEICON,\r\n )\r" + }, + "sourceLanguage": "Rust" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "Boss-Key", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "744c16dfee540bfc", + "equalIndicator/v1": "86429ccdf282d3e34b2e78eba39096193af51101e488dcd07d923b798e2cfa8c" + }, + "properties": { + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "problemType": "REGULAR", + "tags": [ + "Rust" + ] + } + }, + { + "ruleId": "RsUnnecessaryQualifications", + "kind": "fail", + "level": "note", + "message": { + "text": "路径前缀不必要", + "markdown": "路径前缀不必要" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "crates/core/src/ipc_server.rs", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 48, + "startColumn": 22, + "charOffset": 1491, + "charLength": 10, + "snippet": { + "text": "std::mem::" + }, + "sourceLanguage": "Rust" + }, + "contextRegion": { + "startLine": 46, + "startColumn": 1, + "charOffset": 1421, + "charLength": 203, + "snippet": { + "text": " }\n let sa = SECURITY_ATTRIBUTES {\n nLength: std::mem::size_of::() as u32,\n lpSecurityDescriptor: psd.0,\n bInheritHandle: false.into()," + }, + "sourceLanguage": "Rust" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "Boss-Key", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "347129ca3c1c58f0", + "equalIndicator/v1": "c80a7eee5b601b62cc04bb998f33977d97ab39475d7698fea5605cc79b645a45" + }, + "properties": { + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "problemType": "REGULAR", + "tags": [ + "Rust" + ] + } + }, + { + "ruleId": "RsUnnecessaryQualifications", + "kind": "fail", + "level": "note", + "message": { + "text": "路径前缀不必要", + "markdown": "路径前缀不必要" + }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "crates/core/src/freeze.rs", + "uriBaseId": "SRCROOT" + }, + "region": { + "startLine": 113, + "startColumn": 21, + "charOffset": 3797, + "charLength": 10, + "snippet": { + "text": "std::mem::" + }, + "sourceLanguage": "Rust" + }, + "contextRegion": { + "startLine": 111, + "startColumn": 1, + "charOffset": 3722, + "charLength": 168, + "snippet": { + "text": " };\r\n let mut entry = PROCESSENTRY32W {\r\n dwSize: std::mem::size_of::() as u32,\r\n ..Default::default()\r\n };\r" + }, + "sourceLanguage": "Rust" + } + }, + "logicalLocations": [ + { + "fullyQualifiedName": "Boss-Key", + "kind": "module" + } + ] + } + ], + "partialFingerprints": { + "equalIndicator/v2": "7ec2fb43bfcd3147", + "equalIndicator/v1": "ff8de81b9ab41a9b62322eaa1af90282e5dc3c7a740e282166b9da628f31859e" + }, + "properties": { + "ideaSeverity": "WEAK WARNING", + "qodanaSeverity": "Moderate", + "problemType": "REGULAR", + "tags": [ + "Rust" + ] + } + } + ], + "automationDetails": { + "id": "Boss-Key/qodana/2026-07-16", + "guid": "3cfcd606-ad4b-4e80-8971-22f922906474", + "properties": { + "jobUrl": "", + "analysisKind": "ide" + } + }, + "newlineSequences": [ + "\r\n", + "\n" + ], + "properties": { + "qodana.coverage.files.provided": false, + "configProfile": "starter", + "deviceId": "0904241fc243541-8561-4533-9119-a208e32e0305", + "qodanaNewResultSummary": { + "moderate": 11.0, + "total": 11.0 + } + } + } + ], + "properties": { + "runTimestamp": "1784163447696" + } +} \ No newline at end of file diff --git a/qodana.yaml b/qodana.yaml new file mode 100644 index 0000000..7f368e9 --- /dev/null +++ b/qodana.yaml @@ -0,0 +1,46 @@ +#-------------------------------------------------------------------------------# +# Qodana analysis is configured by qodana.yaml file # +# https://www.jetbrains.com/help/qodana/qodana-yaml.html # +#-------------------------------------------------------------------------------# + +################################################################################# +# WARNING: Do not store sensitive information in this file, # +# as its contents will be included in the Qodana report. # +################################################################################# +version: "1.0" + +#Specify inspection profile for code analysis +profile: + name: qodana.starter + +#Enable inspections +#include: +# - name: + +#Disable inspections +#exclude: +# - name: +# paths: +# - + +#Execute shell command before Qodana execution (Applied in CI/CD pipeline) +#bootstrap: sh ./prepare-qodana.sh + +#Install IDE plugins before Qodana execution (Applied in CI/CD pipeline) +#plugins: +# - id: #(plugin id can be found at https://plugins.jetbrains.com) + +# Quality gate. Will fail the CI/CD pipeline if any condition is not met +# severityThresholds - configures maximum thresholds for different problem severities +# testCoverageThresholds - configures minimum code coverage on a whole project and newly added code +# Code Coverage is available in Ultimate and Ultimate Plus plans +#failureConditions: +# severityThresholds: +# any: 15 +# critical: 5 +# testCoverageThresholds: +# fresh: 70 +# total: 50 + +#Specify Qodana linter for analysis (Applied in CI/CD pipeline) +linter: jetbrains/qodana-:2026.1