[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6ACCS6GWR9FSEMARV8WS0CC":3,"skill-same:01M6ACCS6GWR9FSEMARV8WS0CC":55},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":27,"linkOnly":28,"markdownContent":29,"markdownBody":30,"frontMatter":31,"refName":32,"commitSha":33,"skillDirectory":34,"forksCount":35,"repositoryHtmlUrl":36,"repositoryHomepageUrl":37,"ownerHtmlUrl":38,"ownerBlogUrl":39,"ownerDescription":6,"updatedAt":40,"install":41,"resources":54},"01M6ACCS6GWR9FSEMARV8WS0CC","clang-tidy-check",null,"Run clang-tidy on newly added\u002Fmodified BE C++ code","apache\u002Fdoris","apache","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F47359?v=4","01M6AC83E6K4FDKK7HZ8WNMQKE","The Apache Software Foundation","01M6ACCEGVA78JF5SFGHJXS1H0",16206,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fapache\u002Fdoris\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Fclang-tidy-check\u002FSKILL.md",[],[19,20,21,22,23,24,25,26],"clang tidy check","tidy","check","clang","run","code","opencode","c++","2026-11-10 10:12:30",false,"---\nname: clang-tidy-check\ndescription: Run clang-tidy on newly added\u002Fmodified BE C++ code\ncompatibility: opencode\n---\n\n## What I do\n\nRun clang-tidy static analysis on newly added or modified C++ files in the BE and Cloud modules, using the project's `.clang-tidy` configuration. The script parses `git diff` to identify changed line ranges and filters clang-tidy output to diagnostics on those lines where possible, reducing noise from pre-existing code. Diagnostics from included headers that were not part of the diff are filtered out, though some edge cases may still appear.\n\n## When to use me\n\n- After building BE, before committing C++ code changes\n- When CI reports clang-tidy warnings on your PR\n- When you want to proactively check new code for common bugs and style issues\n\n## Prerequisites\n\n1. **The relevant module must be built first** — clang-tidy needs `compile_commands.json` generated during the CMake build. For BE files, build BE; for Cloud files, build Cloud.\n2. **clang-tidy must be installed** — the project uses clang-tidy from the LDB toolchain.\n\n## Procedure\n\n### Step 1: Build the relevant module (if not already done)\n\nFor **BE** files:\n```bash\n.\u002Fbuild.sh --be -j${DORIS_PARALLELISM}\n```\nThis generates `compile_commands.json` in `be\u002Fbuild_Release\u002F` or `be\u002Fbuild_ASAN\u002F`.\n\nFor **Cloud** files:\n```bash\n.\u002Fbuild.sh --cloud -j${DORIS_PARALLELISM}\n```\nThis generates `compile_commands.json` in `cloud\u002Fbuild_Release\u002F` or `cloud\u002Fbuild_ASAN\u002F`.\n\n**Note**: A single compilation database typically covers only one module (BE or Cloud). If your changes span both modules, you may need to run clang-tidy twice with different `--build-dir` values.\n\n### Step 2: Run clang-tidy on changed files\n\n```bash\nbuild-support\u002Frun-clang-tidy.sh\n```\n\nBy default, this script:\n- Detects changed C++ files via `git diff` (uncommitted changes + staged changes)\n- Automatically finds `compile_commands.json` from the latest BE build\n- Runs clang-tidy using the `.clang-tidy` config\n- Skips files in excluded directories (third-party, generated code)\n- Reports warnings grouped by file\n\n**Options:**\n\n```bash\n# Compare against a specific branch (e.g., for PR review)\nbuild-support\u002Frun-clang-tidy.sh --base origin\u002Fmaster\n\n# Check specific files (all lines, no line-level filtering)\nbuild-support\u002Frun-clang-tidy.sh --files be\u002Fsrc\u002Fvec\u002Ffunctions\u002Fmy_new_func.cpp\n\n# Report ALL warnings in changed files (no line filtering)\nbuild-support\u002Frun-clang-tidy.sh --full\n\n# Specify build directory explicitly (required for Cloud if BE build dir was auto-detected)\nbuild-support\u002Frun-clang-tidy.sh --build-dir be\u002Fbuild_ASAN\n\n# Check Cloud files with Cloud compilation database\nbuild-support\u002Frun-clang-tidy.sh --build-dir cloud\u002Fbuild_ASAN\n\n# Apply auto-fixes where possible (note: fixes may apply beyond changed lines)\nbuild-support\u002Frun-clang-tidy.sh --fix\n```\n\n**Important**: By default, only warnings on changed lines are reported (diagnostics from headers not in the diff are filtered out). This prevents the agent from \"fixing\" unrelated pre-existing warnings in large files. Use `--full` to see all warnings if needed.\n\n### Step 3: Interpret and fix warnings\n\nclang-tidy output looks like:\n\n```\nbe\u002Fsrc\u002Fvec\u002Ffunctions\u002Ffoo.cpp:42:5: warning: use auto when initializing with a cast [modernize-use-auto]\nbe\u002Fsrc\u002Fvec\u002Ffunctions\u002Ffoo.cpp:55:1: warning: function 'process' exceeds recommended size [readability-function-size]\n```\n\n**Fix approach:**\n1. Fix all warnings that represent real issues (bugs, performance, readability)\n2. For false positives or intentional patterns, add `\u002F\u002F NOLINT(check-name)` with a brief justification\n3. Report any warnings you cannot reasonably fix\n\n### Step 4: Verify\n\nRe-run the script to confirm all warnings are resolved:\n\n```bash\nbuild-support\u002Frun-clang-tidy.sh\n```\n\n## Enabled Checks (from `.clang-tidy`)\n\n| Category | Examples |\n|----------|----------|\n| `clang-diagnostic-*` | Compiler diagnostics |\n| `clang-analyzer-*` | Static analysis (null deref, use-after-free, etc.) |\n| `bugprone-*` | Use-after-move, redundant branch condition, unused RAII |\n| `modernize-*` | Auto, range-for, nullptr (excludes trailing return, nodiscard) |\n| `readability-*` | Function size (≤80 lines), cognitive complexity (≤50) |\n| `performance-*` | String find, inefficient algorithm, move-const-arg |\n| `misc-redundant-expression` | Redundant expressions |\n\n## Excluded Directories\n\nFiles in these paths are automatically skipped:\n- `be\u002Fsrc\u002Fapache-orc\u002F`, `be\u002Fsrc\u002Fclucene\u002F`, `be\u002Fsrc\u002Fgutil\u002F`\n- `be\u002Fsrc\u002Fglibc-compatibility\u002F`\n- `contrib\u002F` (all third-party code)\n- Generated code directories\n\n## NOLINT Usage\n\nWhen a clang-tidy warning cannot be fixed, suppress it with a comment:\n\n```cpp\n\u002F\u002F Good: specific check name + reason\nint x = (int)y; \u002F\u002F NOLINT(modernize-use-auto): explicit cast for clarity\n\n\u002F\u002F Bad: blanket suppression without reason\nint x = (int)y; \u002F\u002F NOLINT\n```\n\n## Troubleshooting\n\n| Problem | Solution |\n|---------|----------|\n| `compile_commands.json not found` | Build BE first: `.\u002Fbuild.sh --be -j${DORIS_PARALLELISM}` |\n| `clang-tidy not found` | Install via LDB toolchain or `apt install clang-tidy-16` |\n| Too many warnings on old code | Use `--base` to diff against a branch, ensuring only your changes are checked |\n| Warning in header included by your file | Only fix if the header is also in your changeset; otherwise note it in your report |\n","## What I do\n\nRun clang-tidy static analysis on newly added or modified C++ files in the BE and Cloud modules, using the project's `.clang-tidy` configuration. The script parses `git diff` to identify changed line ranges and filters clang-tidy output to diagnostics on those lines where possible, reducing noise from pre-existing code. Diagnostics from included headers that were not part of the diff are filtered out, though some edge cases may still appear.\n\n## When to use me\n\n- After building BE, before committing C++ code changes\n- When CI reports clang-tidy warnings on your PR\n- When you want to proactively check new code for common bugs and style issues\n\n## Prerequisites\n\n1. **The relevant module must be built first** — clang-tidy needs `compile_commands.json` generated during the CMake build. For BE files, build BE; for Cloud files, build Cloud.\n2. **clang-tidy must be installed** — the project uses clang-tidy from the LDB toolchain.\n\n## Procedure\n\n### Step 1: Build the relevant module (if not already done)\n\nFor **BE** files:\n```bash\n.\u002Fbuild.sh --be -j${DORIS_PARALLELISM}\n```\nThis generates `compile_commands.json` in `be\u002Fbuild_Release\u002F` or `be\u002Fbuild_ASAN\u002F`.\n\nFor **Cloud** files:\n```bash\n.\u002Fbuild.sh --cloud -j${DORIS_PARALLELISM}\n```\nThis generates `compile_commands.json` in `cloud\u002Fbuild_Release\u002F` or `cloud\u002Fbuild_ASAN\u002F`.\n\n**Note**: A single compilation database typically covers only one module (BE or Cloud). If your changes span both modules, you may need to run clang-tidy twice with different `--build-dir` values.\n\n### Step 2: Run clang-tidy on changed files\n\n```bash\nbuild-support\u002Frun-clang-tidy.sh\n```\n\nBy default, this script:\n- Detects changed C++ files via `git diff` (uncommitted changes + staged changes)\n- Automatically finds `compile_commands.json` from the latest BE build\n- Runs clang-tidy using the `.clang-tidy` config\n- Skips files in excluded directories (third-party, generated code)\n- Reports warnings grouped by file\n\n**Options:**\n\n```bash\n# Compare against a specific branch (e.g., for PR review)\nbuild-support\u002Frun-clang-tidy.sh --base origin\u002Fmaster\n\n# Check specific files (all lines, no line-level filtering)\nbuild-support\u002Frun-clang-tidy.sh --files be\u002Fsrc\u002Fvec\u002Ffunctions\u002Fmy_new_func.cpp\n\n# Report ALL warnings in changed files (no line filtering)\nbuild-support\u002Frun-clang-tidy.sh --full\n\n# Specify build directory explicitly (required for Cloud if BE build dir was auto-detected)\nbuild-support\u002Frun-clang-tidy.sh --build-dir be\u002Fbuild_ASAN\n\n# Check Cloud files with Cloud compilation database\nbuild-support\u002Frun-clang-tidy.sh --build-dir cloud\u002Fbuild_ASAN\n\n# Apply auto-fixes where possible (note: fixes may apply beyond changed lines)\nbuild-support\u002Frun-clang-tidy.sh --fix\n```\n\n**Important**: By default, only warnings on changed lines are reported (diagnostics from headers not in the diff are filtered out). This prevents the agent from \"fixing\" unrelated pre-existing warnings in large files. Use `--full` to see all warnings if needed.\n\n### Step 3: Interpret and fix warnings\n\nclang-tidy output looks like:\n\n```\nbe\u002Fsrc\u002Fvec\u002Ffunctions\u002Ffoo.cpp:42:5: warning: use auto when initializing with a cast [modernize-use-auto]\nbe\u002Fsrc\u002Fvec\u002Ffunctions\u002Ffoo.cpp:55:1: warning: function 'process' exceeds recommended size [readability-function-size]\n```\n\n**Fix approach:**\n1. Fix all warnings that represent real issues (bugs, performance, readability)\n2. For false positives or intentional patterns, add `\u002F\u002F NOLINT(check-name)` with a brief justification\n3. Report any warnings you cannot reasonably fix\n\n### Step 4: Verify\n\nRe-run the script to confirm all warnings are resolved:\n\n```bash\nbuild-support\u002Frun-clang-tidy.sh\n```\n\n## Enabled Checks (from `.clang-tidy`)\n\n| Category | Examples |\n|----------|----------|\n| `clang-diagnostic-*` | Compiler diagnostics |\n| `clang-analyzer-*` | Static analysis (null deref, use-after-free, etc.) |\n| `bugprone-*` | Use-after-move, redundant branch condition, unused RAII |\n| `modernize-*` | Auto, range-for, nullptr (excludes trailing return, nodiscard) |\n| `readability-*` | Function size (≤80 lines), cognitive complexity (≤50) |\n| `performance-*` | String find, inefficient algorithm, move-const-arg |\n| `misc-redundant-expression` | Redundant expressions |\n\n## Excluded Directories\n\nFiles in these paths are automatically skipped:\n- `be\u002Fsrc\u002Fapache-orc\u002F`, `be\u002Fsrc\u002Fclucene\u002F`, `be\u002Fsrc\u002Fgutil\u002F`\n- `be\u002Fsrc\u002Fglibc-compatibility\u002F`\n- `contrib\u002F` (all third-party code)\n- Generated code directories\n\n## NOLINT Usage\n\nWhen a clang-tidy warning cannot be fixed, suppress it with a comment:\n\n```cpp\n\u002F\u002F Good: specific check name + reason\nint x = (int)y; \u002F\u002F NOLINT(modernize-use-auto): explicit cast for clarity\n\n\u002F\u002F Bad: blanket suppression without reason\nint x = (int)y; \u002F\u002F NOLINT\n```\n\n## Troubleshooting\n\n| Problem | Solution |\n|---------|----------|\n| `compile_commands.json not found` | Build BE first: `.\u002Fbuild.sh --be -j${DORIS_PARALLELISM}` |\n| `clang-tidy not found` | Install via LDB toolchain or `apt install clang-tidy-16` |\n| Too many warnings on old code | Use `--base` to diff against a branch, ensuring only your changes are checked |\n| Warning in header included by your file | Only fix if the header is also in your changeset; otherwise note it in your report |\n",{"name":5,"description":7,"compatibility":25},"master","8e10b235cf030d486b6840cfd64b6218ab515e6d",".claude\u002Fskills\u002Fclang-tidy-check",4016,"https:\u002F\u002Fgithub.com\u002Fapache\u002Fdoris","https:\u002F\u002Fdoris.apache.org","https:\u002F\u002Fgithub.com\u002Fapache","https:\u002F\u002Fwww.apache.org\u002F","2026-11-10 21:11:53",{"source":8,"skillName":5,"commands":42,"prompt":52,"zipAvailable":53},[43,46,49],{"tool":44,"command":45},"npx","npx skills add apache\u002Fdoris --skill clang-tidy-check",{"tool":47,"command":48},"bunx","bunx skills add apache\u002Fdoris --skill clang-tidy-check",{"tool":50,"command":51},"pnpm","pnpm dlx skills add apache\u002Fdoris --skill clang-tidy-check","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fapache\u002Fdoris\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Fclang-tidy-check\u002FSKILL.md",true,[],[56,75,94,112],{"skillNo":57,"name":58,"nameZh":6,"description":59,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":67,"publishedAt":27},"01M6ACD1DMYFDN35VTW0XXTT9D","fe-code-style","Fix FE (Java) code style issues using Checkstyle","https:\u002F\u002Fgithub.com\u002Fapache\u002Fdoris\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Ffe-code-style\u002FSKILL.md",[62],{"categoryNo":63,"categoryName":64,"taxonomyType":65,"taxonomyTypeDesc":66},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[68,69,24,70,71,25,72,73,74],"style","fe code style","code style","checkstyle","fix","java","issues",{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":86,"publishedAt":27},"01M6ACCYN7KSG5HW2DJQV9KQVN","doris-docker-regression","Run Doris docker-based regression tests from a clean package","https:\u002F\u002Fgithub.com\u002Fapache\u002Fdoris\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Fdoris-docker-regression\u002FSKILL.md",[81],{"categoryNo":82,"categoryName":83,"taxonomyType":84,"taxonomyTypeDesc":85},"01JBSEEDCAT000000000000011","运维与部署","SCENARIO","使用场景",[87,88,89,90,91,92,25,93,23],"regression","doris","doris docker regression","docker","clean","tests","package",{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":107,"publishedAt":27},"01M6ACCVT0JJA0J15W3ERJ17FX","code-review","Review code with Doris-specific checklists","https:\u002F\u002Fgithub.com\u002Fapache\u002Fdoris\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Fcode-review\u002FSKILL.md",[100,103,106],{"categoryNo":101,"categoryName":102,"taxonomyType":84,"taxonomyTypeDesc":85},"01JBSEEDCAT000000000000007","代码审查",{"categoryNo":104,"categoryName":105,"taxonomyType":84,"taxonomyTypeDesc":85},"01JBSEEDCAT000000000000008","测试与质量",{"categoryNo":63,"categoryName":64,"taxonomyType":65,"taxonomyTypeDesc":66},[24,108,109,88,110,25,111],"review","code review","with","review code",{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":119,"publishedAt":27},"01M6ACCKMYNAYBF9NAVTT18S4A","be-code-style","Fix BE (C++) code formatting issues using clang-format","https:\u002F\u002Fgithub.com\u002Fapache\u002Fdoris\u002Fblob\u002Fmaster\u002F.claude\u002Fskills\u002Fbe-code-style\u002FSKILL.md",[118],{"categoryNo":63,"categoryName":64,"taxonomyType":65,"taxonomyTypeDesc":66},[24,68,70,120,121,122,74,22,123,72,25,124,26],"be code style","be code","code formatting","format","formatting"]