Skip to content

Conversation

@bgn42
Copy link
Collaborator

@bgn42 bgn42 commented Jan 7, 2026

... also one level deeper and if found, correct the path

Fixes

  • Issue #455 : [Bug] cbridge: generated *.cgen.yml contains file references with incorrect path for selected middleware

Changes

  • check for existing files also one level deeper and then use that path

Checklist

  • 🤖 This change is covered by unit tests (if applicable).
  • 🤹 Manual testing has been performed (if necessary).
  • 🛡️ Security impacts have been considered (if relevant).
  • 📖 Documentation updates are complete (if required).
  • 🧠 Third-party dependencies and TPIP updated (if required).

@qltysh
Copy link

qltysh bot commented Jan 7, 2026

Qlty

Coverage Impact

⬆️ Merging this pull request will increase total coverage on main by 0.09%.

Modified Files with Diff Coverage (2)

RatingFile% DiffUncovered Line #s
Coverage rating: D Coverage rating: C
internal/utils/utils.go100.0%
Coverage rating: F Coverage rating: F
internal/readFile/readFile.go0.0%24-96
Total81.3%
🤖 Increase coverage with AI coding...

In the `issue455` branch, add test coverage for this new code:

- `internal/readFile/readFile.go` -- Line 24-96

🚦 See full report on Qlty Cloud »

🛟 Help
  • Diff Coverage: Coverage for added or modified lines of code (excludes deleted files). Learn more.

  • Total Coverage: Coverage for the whole repository, calculated as the sum of all File Coverage. Learn more.

  • File Coverage: Covered Lines divided by Covered Lines plus Missed Lines. (Excludes non-executable lines including blank lines and comments.)

    • Indirect Changes: Changes to File Coverage for files that were not modified in this PR. Learn more.

@github-actions
Copy link

github-actions bot commented Jan 7, 2026

Test Results

    6 files  ±0     54 suites  ±0   14s ⏱️ ±0s
  220 tests +1    220 ✅ +1  0 💤 ±0  0 ❌ ±0 
1 320 runs  +6  1 320 ✅ +6  0 💤 ±0  0 ❌ ±0 

Results for commit 8187484. ± Comparison against base commit 8bcaf13.

♻️ This comment has been updated with latest results.

@bgn42 bgn42 requested a review from Copilot January 7, 2026 14:15
Copy link
Contributor

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 addresses issue #455 by fixing incorrect file path references in generated *.cgen.yml files for selected middleware. The changes implement a more robust file path resolution strategy that checks for files at multiple directory levels.

Key Changes:

  • Enhanced file path resolution to check one directory level deeper when the initial path doesn't exist
  • Adjusted the output path calculation to go up one directory level
  • Updated STM32CubeMX.ioc file path to include the "STM32CubeMX" subdirectory

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
internal/utils/utils.go Added logic to check for files one level deeper in the directory structure and use that path if found
internal/readFile/readFile.go Modified output path to go up one directory and corrected STM32CubeMX.ioc file path to include subdirectory

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

@bgn42 bgn42 requested a review from jkrech January 7, 2026 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants