Skip to content

Add neat includes for src and test code#53

Open
gomathishankar37 wants to merge 4 commits intodevelopfrom
feature/refactoring
Open

Add neat includes for src and test code#53
gomathishankar37 wants to merge 4 commits intodevelopfrom
feature/refactoring

Conversation

@gomathishankar37
Copy link
Copy Markdown
Contributor

No description provided.

@gomathishankar37 gomathishankar37 requested a review from a team as a code owner March 23, 2026 06:10
Copilot AI review requested due to automatic review settings March 23, 2026 06:10
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR simplifies header include statements across the unit tests and C implementation by switching from long relative paths (e.g., ../.../common/types.h) to short includes (e.g., "types.h"), and updates the autotools include paths so the compiler can resolve those headers.

Changes:

  • Replaced relative #include paths in unittest/*.cpp with short quoted includes.
  • Replaced relative #include paths in c_sourcecode/src/** with short quoted includes.
  • Expanded/adjusted AM_CPPFLAGS in both unittest/Makefile.am and c_sourcecode/src/Makefile.am to include the needed source subdirectories.

Reviewed changes

Copilot reviewed 35 out of 35 changed files in this pull request and generated no comments.

Show a summary per file
File Description
unittest/utils_gtest.cpp Switches C header includes to short names (relies on updated include paths).
unittest/upload_gtest.cpp Same include-path simplification for upload-related headers.
unittest/upload_gmock.cpp Same include-path simplification for common types header.
unittest/scanner_gtest.cpp Same include-path simplification for scanner + common headers.
unittest/scanner_gmock.cpp Same include-path simplification for common types header.
unittest/ratelimit_gtest.cpp Same include-path simplification for ratelimit + types headers.
unittest/prerequisites_gtest.cpp Same include-path simplification for prerequisites + common headers.
unittest/platform_gtest.cpp Same include-path simplification for platform + common headers.
unittest/mainapp_test_fixture.h Same include-path simplification for init + common headers.
unittest/mainapp_gmock.cpp Same include-path simplification for common headers used by mocks.
unittest/lock_manager_gtest.cpp Same include-path simplification for lock_manager header.
unittest/config_manager_gtest.cpp Same include-path simplification for config + RFC interface header.
unittest/archive_gtest.cpp Same include-path simplification for archive + common headers.
unittest/Makefile.am Adds required -I entries so unit tests can use short includes.
c_sourcecode/src/utils/prerequisites.h Switches types.h include to short form.
c_sourcecode/src/utils/prerequisites.c Switches errors.h include to short form.
c_sourcecode/src/utils/cleanup_batch.h Switches types.h include to short form.
c_sourcecode/src/utils/cleanup_batch.c Switches errors.h include to short form.
c_sourcecode/src/upload/upload.c Switches RFC interface + logger includes to short form.
c_sourcecode/src/t2Interface/telemetryinterface.c Switches logger include to short form.
c_sourcecode/src/scanner/scanner.h Switches types.h include to short form.
c_sourcecode/src/scanner/scanner.c Switches types.h + logger includes to short form.
c_sourcecode/src/rfcInterface/rfcinterface.c Switches logger include to short form.
c_sourcecode/src/rbusInterface/rbus_interface.c Switches logger include to short form.
c_sourcecode/src/ratelimit/ratelimit.c Switches logger include to short form.
c_sourcecode/src/platform/platform.h Switches types.h include to short form.
c_sourcecode/src/platform/platform.c Switches errors.h + logger includes to short form.
c_sourcecode/src/main.c Switches many internal includes to short form; updates telemetry header include.
c_sourcecode/src/init/system_init.h Switches types.h include to short form.
c_sourcecode/src/init/system_init.c Switches common + internal module includes to short form.
c_sourcecode/src/config/config_manager.h Switches types.h include to short form.
c_sourcecode/src/config/config_manager.c Switches common + interface includes to short form.
c_sourcecode/src/archive/archive_crash.h Switches types.h include to short form.
c_sourcecode/src/archive/archive.c Switches logger include to short form.
c_sourcecode/src/Makefile.am Adds needed -I entries (notably -I$(top_srcdir)/src and additional module dirs) to support short includes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 23, 2026
Copilot AI review requested due to automatic review settings March 23, 2026 07:20
@gomathishankar37 gomathishankar37 review requested due to automatic review settings March 23, 2026 07:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants