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

[cleanup] Refactor Eldritch Library Registration #579

Merged
merged 3 commits into from
Feb 12, 2024
Merged

Conversation

KCarretto
Copy link
Collaborator

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

  • adds eldritch_lib!() macro for defining libraries
  • Performs related cleanup (remove unused imports, add comments, silence unused args instead of if false)
  • Moves each module file to mod.rs to cleanup the eldritch root directory

@KCarretto KCarretto requested a review from hulto February 12, 2024 21:09
Copy link

codecov bot commented Feb 12, 2024

Codecov Report

Attention: 31 lines in your changes are missing coverage. Please review.

Comparison is base (67970e2) 71.28% compared to head (a66433e) 71.83%.

Files Patch % Lines
implants/lib/eldritch/src/sys/mod.rs 57.89% 8 Missing ⚠️
implants/lib/eldritch/src/lib.rs 41.66% 7 Missing ⚠️
implants/lib/eldritch/src/pivot/port_scan_impl.rs 57.14% 3 Missing ⚠️
implants/lib/eldritch/src/process/mod.rs 57.14% 3 Missing ⚠️
implants/lib/eldritch/src/assets/mod.rs 71.42% 2 Missing ⚠️
implants/lib/eldritch/src/file/mod.rs 91.30% 2 Missing ⚠️
implants/lib/eldritch/src/time/mod.rs 66.66% 2 Missing ⚠️
implants/lib/eldritch/src/assets/copy_impl.rs 0.00% 1 Missing ⚠️
implants/lib/eldritch/src/crypto/mod.rs 88.88% 1 Missing ⚠️
implants/lib/eldritch/src/pivot/mod.rs 90.90% 1 Missing ⚠️
... and 1 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #579      +/-   ##
==========================================
+ Coverage   71.28%   71.83%   +0.54%     
==========================================
  Files         141      142       +1     
  Lines       10092     9955     -137     
==========================================
- Hits         7194     7151      -43     
+ Misses       2732     2638      -94     
  Partials      166      166              

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

Copy link
Collaborator

@hulto hulto left a comment

Choose a reason for hiding this comment

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

Some nits otherwise LGTM

implants/lib/eldritch/src/file/mod.rs Show resolved Hide resolved
implants/lib/eldritch/src/pivot/mod.rs Outdated Show resolved Hide resolved
implants/lib/eldritch/src/pivot/mod.rs Show resolved Hide resolved
docs/_docs/dev-guide/eldritch.md Outdated Show resolved Hide resolved
docs/_docs/dev-guide/eldritch.md Outdated Show resolved Hide resolved
@@ -376,7 +419,8 @@ mod tests {
}
```

### Async PR example
#### Async PR example
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should probably remove this too since it's no longer a good reference.

Cictrone
Cictrone previously approved these changes Feb 12, 2024
Copy link
Collaborator

@Cictrone Cictrone left a comment

Choose a reason for hiding this comment

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

sheeesh

@KCarretto KCarretto merged commit ff93177 into main Feb 12, 2024
6 checks passed
@KCarretto KCarretto deleted the eldritch-macro branch February 12, 2024 22:39
nullmonk pushed a commit that referenced this pull request Feb 14, 2024
* added eldritch_lib macro, moved to mod.rs

* updated docs

* fix nits
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.

None yet

3 participants