Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Box import separate packages modules #542

Merged
merged 16 commits into from
Feb 21, 2024

Conversation

radbasa
Copy link
Contributor

@radbasa radbasa commented Jan 12, 2024

Changes

How to test

  1. Unit tests for box_separate_calls_linter() exist.
  2. Locally install rhino, version should be 1.6.0.9004, initialize a new rhino application then proceed to declare box imports.
  3. Add a box::use() with both package and modules.
  4. rhino::lint_r() should find and point to the invalid box::use() call.

@codecov-commenter
Copy link

codecov-commenter commented Jan 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (b4722ba) 31.64% compared to head (be25e88) 34.11%.

❗ Current head be25e88 differs from pull request most recent head 3a30d82. Consider uploading reports for the commit 3a30d82 to get more accurate results

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #542      +/-   ##
==========================================
+ Coverage   31.64%   34.11%   +2.46%     
==========================================
  Files          10       10              
  Lines         534      554      +20     
==========================================
+ Hits          169      189      +20     
  Misses        365      365              

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

@radbasa radbasa requested a review from jakubnowicki January 12, 2024 09:39
@radbasa radbasa changed the title Feature/box import separate packages modules Box import separate packages modules Jan 12, 2024
@radbasa radbasa marked this pull request as ready for review January 16, 2024 03:34
@radbasa radbasa changed the base branch from main to dev_next January 26, 2024 06:37
Base automatically changed from box_universal_linter to main February 5, 2024 08:07
Copy link
Member

@jakubnowicki jakubnowicki left a comment

Choose a reason for hiding this comment

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

Linter is not able to detect problems if the package imports functions:

box::use(
  path/to/module,
  package[function1, function2],
)

@radbasa
Copy link
Contributor Author

radbasa commented Feb 21, 2024

Linter is not able to detect problems if the package imports functions:

box::use(
  path/to/module,
  package[function1, function2],
)

Fixed.

module and module[function] have different XML patterns.

Added unit tests for aliased modules and functions. Just in case.

Copy link
Member

@jakubnowicki jakubnowicki left a comment

Choose a reason for hiding this comment

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

LGTM

@jakubnowicki jakubnowicki merged commit 4009a24 into main Feb 21, 2024
20 checks passed
@jakubnowicki jakubnowicki deleted the feature/box-import-separate-packages-modules branch February 21, 2024 08:35
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.

Box import packages separate from modules
3 participants