Loading...
Loading...
Automatically sorts C/C++ header files (#include statements) with full support for conditional compilation blocks. Use when Claude needs to organize
npx skill4agent add openharmonyinsight/openharmony-skills cpp-include-sorter#include.cpppython scripts/sort_includes.py <directory-path>python scripts/sort_includes.py <directory-path> --dry-runfile.cppfile.h<>""#ifdef#ifndef#if defined#ifdef#endif#elif#else#include "common/rs_log.h"
#include "rs_trace.h"
#include <memory>
#ifdef RS_ENABLE_GPU
#include "feature/uifirst/rs_sub_thread_manager.h"
#include "feature/capture/rs_ui_capture_task_parallel.h"
#endif
#include "platform/common/rs_system_properties.h"#include "rs_trace.h" // 1. Corresponding header (longest path preferred)
#include <memory> // 2. System headers (alphabetical)
#include "common/rs_log.h" // 3. Local headers (alphabetical)
#ifdef RS_ENABLE_GPU
#include "feature/capture/rs_ui_capture_task_parallel.h"
#include "feature/uifirst/rs_sub_thread_manager.h"
#endif
#include "platform/common/rs_system_properties.h""file.h""path/to/file.h"// comment#elif#else#ifdefscripts/sort_includes.pyextract_includes_with_ifdef()sort_includes_with_ifdef()format_ifdef_block()#ifdefgit diffgit diff <file.cpp> | grep "^[-+]" | grep "include"