Skip to content

feat: [#471] The methods of path should return absolute path#948

Merged
krishankumar01 merged 2 commits intomasterfrom
kkumar-gcc/#471
Mar 9, 2025
Merged

feat: [#471] The methods of path should return absolute path#948
krishankumar01 merged 2 commits intomasterfrom
kkumar-gcc/#471

Conversation

@krishankumar01
Copy link
Member

📑 Description

Closes goravel/goravel#471

✅ Checks

  • Added test cases for my code

@krishankumar01 krishankumar01 requested a review from a team as a code owner March 8, 2025 15:25
@codecov
Copy link

codecov bot commented Mar 8, 2025

Codecov Report

Attention: Patch coverage is 85.71429% with 3 lines in your changes missing coverage. Please review.

Project coverage is 69.15%. Comparing base (4d97391) to head (28915c3).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
foundation/application.go 85.71% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #948      +/-   ##
==========================================
- Coverage   69.16%   69.15%   -0.01%     
==========================================
  Files         157      157              
  Lines       10519    10526       +7     
==========================================
+ Hits         7275     7279       +4     
- Misses       2911     2913       +2     
- Partials      333      334       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@hwbrzzl hwbrzzl requested a review from Copilot March 9, 2025 02:55
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.

PR Overview

This PR updates the various application path methods so that they now return absolute paths instead of relative paths. Key changes include:

  • Replacing filepath.Join calls with a common absPath function to ensure absolute paths.
  • Prepending a new constant (support.RelativePath) to the path segments.
  • Updating test cases to assert that absolute paths based on support.RootPath are returned.

Reviewed Changes

File Description
foundation/application.go Updated path helper methods to use absPath and support constants
foundation/application_test.go Modified expectations in tests to account for absolute paths

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

foundation/application_test.go:65

  • The test expects the Path method to return a path prefixed with support.RootPath, but the implementation uses support.RelativePath. Ensure both the implementation and tests align on the correct prefix.
s.Equal(filepath.Join(support.RootPath, "app", "goravel.go"), s.app.Path("goravel.go"))

Copy link
Contributor

@hwbrzzl hwbrzzl left a comment

Choose a reason for hiding this comment

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

LGTM

@krishankumar01 krishankumar01 merged commit 42f55f7 into master Mar 9, 2025
13 checks passed
@krishankumar01 krishankumar01 deleted the kkumar-gcc/#471 branch March 9, 2025 03:24
almas-x pushed a commit that referenced this pull request Mar 12, 2025
almas-x pushed a commit that referenced this pull request Mar 18, 2025
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.

✨ [Feature] The methods of path should return absolute path

3 participants