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

Add unimported to workflow #2441

Merged
merged 5 commits into from
Jan 31, 2022
Merged

Add unimported to workflow #2441

merged 5 commits into from
Jan 31, 2022

Conversation

mroderick
Copy link
Member

This PR adds a check for unimported files to the GitHub Actions workflow, using https://github.com/smeijer/unimported

As always, the PR is easier to understand when you read the commits individually.

How to verify

  1. Add a file to lib/ that is not used
  2. npm run unimported
  3. Observe that there's an error
  4. Remove the file
  5. npm run unimported
  6. Observe that there is no error

The last reference to this file was removed in 6b1841f, making it safe to remove
This has only been in use by tests since e37e1a6, so doesn't belong in the src/ folder anymore
Searching the git history, we find that the last reference to this file
was removed with e37e1a6.

```
git log -p --full-history --all -G'require.*restore"' li
```

Therefore, it is safe to remove the file.
This allows us to find files that are no longer in use in the project
and can be safely removed.

See https://github.com/smeijer/unimported
@codecov
Copy link

codecov bot commented Jan 31, 2022

Codecov Report

Merging #2441 (d2e227c) into master (7f16cec) will decrease coverage by 0.03%.
The diff coverage is n/a.

❗ Current head d2e227c differs from pull request most recent head 6e369cd. Consider uploading reports for the commit 6e369cd to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2441      +/-   ##
==========================================
- Coverage   96.01%   95.97%   -0.04%     
==========================================
  Files          41       39       -2     
  Lines        1906     1888      -18     
==========================================
- Hits         1830     1812      -18     
  Misses         76       76              
Flag Coverage Δ
unit 95.97% <ø> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
test/get-config.js

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7f16cec...6e369cd. Read the comment docs.

@fatso83 fatso83 merged commit f329a01 into master Jan 31, 2022
@fatso83 fatso83 deleted the add-unimported-to-workflow branch January 31, 2022 21:42
@mroderick
Copy link
Member Author

Thank you for merging this @fatso83!

It was a bit fast, as I had a fixup commit in there :)

@fatso83
Copy link
Contributor

fatso83 commented Feb 2, 2022

Hmm ... not sure I follow. A fixup commit is supposed to be squashed with the previous when rebasing, right? And since all commits were squashed, the effect should be the same ... Or? 😬

f329a01

@Zaram22
Copy link

Zaram22 commented Feb 18, 2022

Nice

@Zaram22
Copy link

Zaram22 commented Feb 18, 2022

Project

@fatso83
Copy link
Contributor

fatso83 commented Feb 18, 2022

@mroderick I blocked this account after the bottish behavior in #2441 #2444 and #2445.

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.

3 participants