robotframework / robotframework/robotframework
Detect unused imports in dry-run mode
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 11.9k
- Forks
- 2.6k
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 10
Description
Detecting and reporting unused library and resource imports in dry-run mode would ease maintaining test data. Resource file should be considered used also if it contains any additional imports.
Unfortunately we cannot really detect unused variable file imports because dry-run doesn't validate variables in general. Similarly resource files containing only variables will be incorrectly reported as unused. Need to think are these false positives so big a problem that it should be possible to somehow disable this functionality.
This functionality has been requested by Zhang Yu from NSN.
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 dry-run mode handles library and resource imports, then review the existing handling of resources that contain additional imports. Define how unused imports should be reported and how variable-only resources and variable file imports should be treated, including whether false positives can be disabled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100