Skip to content

Add URL extraction utility with tests and enable clang-tidy check profiling#72

Merged
MisterVVP merged 3 commits into
mainfrom
dev-create-url-utility-in-sdk
May 25, 2026
Merged

Add URL extraction utility with tests and enable clang-tidy check profiling#72
MisterVVP merged 3 commits into
mainfrom
dev-create-url-utility-in-sdk

Conversation

@MisterVVP
Copy link
Copy Markdown
Owner

Motivation

  • Provide a single, robust implementation for extracting and normalizing URL target paths used across examples and tests.
  • Support different suffix policies (path, query, fragment) to avoid ad-hoc parsing in call sites.
  • Improve static-analysis observability by storing a clang-tidy check profile for later inspection.

Description

  • Add include/a2a/core/url_utils.h which implements ExtractTargetPath and UrlSuffixPolicy to normalize URL targets and preserve optional query/fragment suffixes.
  • Update examples/example_support.h to use core::ExtractTargetPath instead of the previous local UrlToTarget implementation.
  • Add unit tests tests/unit/url_utils_test.cpp and register url_utils_test in tests/CMakeLists.txt, and update tests/unit/examples_support_test.cpp to reflect normalized behavior.
  • Modify scripts/run_clang_tidy.sh to enable --enable-check-profile and write the profile to ${CLANG_TIDY_CHECK_PROFILE_FILE} (default under the build dir).

Testing

  • Ran the new url_utils_test which verifies absolute URLs, no-scheme inputs, suffix policies, and default-path behavior, and it succeeded.
  • Ran the updated examples_support_test which validates the normalized target extraction and executor flows, and it succeeded.
  • Ran the project unit test suite via CTest (tests discovered with gtest_discover_tests) and all tests passed; additionally scripts/run_clang_tidy.sh was executed and successfully produced a clang-tidy check profile file.

Codex Task

@MisterVVP MisterVVP merged commit cfb7929 into main May 25, 2026
14 checks passed
@MisterVVP MisterVVP deleted the dev-create-url-utility-in-sdk branch May 25, 2026 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant