diff --git a/.claude/commands/test-and-commit.md b/.claude/commands/test-and-commit.md index afad8ddf..a516649c 100644 --- a/.claude/commands/test-and-commit.md +++ b/.claude/commands/test-and-commit.md @@ -2,6 +2,6 @@ Validate and commit staged/unstaged changes. Run these steps in order, stopping 1. `./build.sh --debug` — Debug+ASAN build must succeed 2. `./test.sh` — all tests must pass -3. `./run_clang_tidy.sh` — no clang-tidy warnings +3. `git ls-files -z '*.cpp' | xargs -0 clang-tidy-22 -p build` — no clang-tidy warnings If all three pass, create a git commit following the repo's commit conventions (see git log for style). If any step fails, fix the issue and re-run from step 1. diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b0e4a96b..3dadb4f1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -138,22 +138,24 @@ jobs: # Anonymous read is enabled on the remote, so no login is needed here. conan remote add plotjuggler-conan "${JFROG_CONAN_URL}" --force + remote_revs="$(mktemp "${RUNNER_TEMP}/remote_revs.XXXXXX.json")" + trap 'rm -f "${remote_revs}"' EXIT conan list "plotjuggler_sdk/${version}#*" -r plotjuggler-conan --format=json \ - > /tmp/remote_revs.json 2>/dev/null || true + > "${remote_revs}" 2>/dev/null || true # Artifactory reports an unknown recipe as a plain "404: Not Found"; # conan_server / Cloudsmith use RECIPEUNKNOWN. Accept both. - if grep -q -E "RECIPEUNKNOWN|404: Not Found" /tmp/remote_revs.json; then + if grep -q -E "RECIPEUNKNOWN|404: Not Found" "${remote_revs}"; then echo "Version ${version} is not yet published — first release, proceeding." - elif grep -q '"error"' /tmp/remote_revs.json; then + elif grep -q '"error"' "${remote_revs}"; then # Fail closed: proceeding blind could publish changed sources under an # already-released version. The later authenticated upload would # succeed even if this anonymous read hit a 401/403/5xx. echo "::error::Could not read the published revisions of ${version} from the remote:" - cat /tmp/remote_revs.json + cat "${remote_revs}" echo "::error::Refusing to publish without the re-publish guard. Re-run once the remote is reachable, or use workflow_dispatch with allow_republish=true if you have verified the state by hand." exit 1 - elif grep -q "${local_rrev}" /tmp/remote_revs.json; then + elif grep -q "${local_rrev}" "${remote_revs}"; then echo "Recipe revision ${local_rrev} is already published for ${version} — idempotent re-run, proceeding." else echo "::error::plotjuggler_sdk/${version} is already published with a different recipe revision." diff --git a/CMakeLists.txt b/CMakeLists.txt index bbdcc4ac..858738f4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -55,8 +55,8 @@ else() # -Werror only when explicitly requested (default ON, see option above) and # never on wasm32: there size_t is 32-bit, so many uint64_t->size_t # conversions trip -Wshorten-64-to-32 / -Wsign-conversion that never fire on - # 64-bit desktop (see SUSTAINABILITY.md T0-3). TODO: make the ABI/size types - # 32-bit-clean, then wasm can opt back into -Werror. + # 64-bit desktop. TODO: make the ABI/size types 32-bit-clean, then wasm can + # opt back into -Werror. if(PJ_WARNINGS_AS_ERRORS AND NOT EMSCRIPTEN) list(APPEND PJ_WARNING_FLAGS -Werror) endif() diff --git a/README.md b/README.md index 60c8da08..59111b2d 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ cd plotjuggler_sdk ./build.sh # RelWithDebInfo (build/) ./build.sh --debug # Debug + ASAN (build/debug_asan) ./test.sh # runs tests in all discovered build dirs -./run_clang_tidy.sh # clang-tidy via clangd-22 +git ls-files -z '*.cpp' | xargs -0 clang-tidy-22 -p build # clang-tidy ``` ## Project Layout diff --git a/pj_plugins/docs/dialog-plugin-guide.md b/pj_plugins/docs/dialog-plugin-guide.md index 6ce255c7..32beb5af 100644 --- a/pj_plugins/docs/dialog-plugin-guide.md +++ b/pj_plugins/docs/dialog-plugin-guide.md @@ -773,7 +773,7 @@ PJ::FilePickerOptions options; options.mode = PJ::FilePickerMode::OpenFiles; options.title = "Select ROS bag files"; options.accept_label = "Open"; -options.initial_directory = "/data/bags"; +options.initial_directory = {}; // host picks; set only if you have a real one options.filters = { {"bags", "ROS bag files", {"*.bag", "*.db3", "*.mcap"}}, {"all", "All files", {"*"}}, diff --git a/pj_plugins/tests/source_dialog_integration_test.cpp b/pj_plugins/tests/source_dialog_integration_test.cpp index 7a56e5b6..633a9e64 100644 --- a/pj_plugins/tests/source_dialog_integration_test.cpp +++ b/pj_plugins/tests/source_dialog_integration_test.cpp @@ -197,7 +197,7 @@ TEST(SourceDialogIntegration, BorrowedDialogHandleWorks) { EXPECT_FALSE(j.is_discarded()); // sendEvent should work - bool refresh = dialog.sendEvent("host_input", R"({"text": "10.0.0.1"})"); + bool refresh = dialog.sendEvent("host_input", R"({"text": "192.0.2.1"})"); EXPECT_TRUE(refresh); // save_config should return valid JSON