Skip to content

chore: refactor expr parser to keep comments#1012

Merged
almas-x merged 1 commit intomasterfrom
almas/chore
Apr 17, 2025
Merged

chore: refactor expr parser to keep comments#1012
almas-x merged 1 commit intomasterfrom
almas/chore

Conversation

@almas-x
Copy link
Contributor

@almas-x almas-x commented Apr 16, 2025

📑 Description

Closes https://github.com/goravel/goravel/issues/

✅ Checks

  • Added test cases for my code

Copilot AI review requested due to automatic review settings April 16, 2025 15:57
@almas-x almas-x requested a review from a team as a code owner April 16, 2025 15:57
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.

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

Comments suppressed due to low confidence (2)

packages/modify/utils.go:47

  • Direct type assertions on file.Decls[0] may cause a panic if the parsed file structure does not match the expected format. Consider adding explicit type checks before accessing Decorations to ensure stability.
expr.Decorations().Start = file.Decls[0].(*dst.GenDecl).Decorations().Start

packages/match/match.go:260

  • Removing the call to dstutil.Unparen may lead to incorrect comparisons of parenthesized expressions. Ensure that this change is intentional and that tests cover cases with extra parentheses.
dstutil.Unparen(x)

@codecov
Copy link

codecov bot commented Apr 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.73%. Comparing base (f5ade0f) to head (15e25b9).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1012   +/-   ##
=======================================
  Coverage   70.72%   70.73%           
=======================================
  Files         170      170           
  Lines       11617    11620    +3     
=======================================
+ Hits         8216     8219    +3     
  Misses       3048     3048           
  Partials      353      353           

☔ 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.

@almas-x almas-x changed the title chore: refactor expr parser to keep outer comments chore: refactor expr parser to keep comments Apr 16, 2025
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.

Nice

@almas-x almas-x merged commit a3845f9 into master Apr 17, 2025
13 checks passed
@almas-x almas-x deleted the almas/chore branch April 17, 2025 03:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants