Warn when a file is included from outside the cargo workspace
Open
Nobody has claimed this yet.
A-new-lint
S-needs-design
- Dominant language
- Rust
- Stars
- 15.5k
- Forks
- 3k
- Avg merge
- 23h 30m
- Merged PRs (30d)
- 51
Description
What it does
Checks that all include[_*]?d files are within the cargo workspace.
Advantage
No release with missing files.
Drawbacks
I'm not sure if cargo can have this information and rustc doesn't have enough information either.
Example
fn main() {
let x = include_str!("/etc/passwd");
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how Cargo handles include_str! and other include macros, and determine whether workspace-boundary information is available before rustc compiles the crate. The work is done when an include from outside the Cargo workspace produces a clear warning, with behavior validated for the listed include forms.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100