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

New "module_missing" lint to detect missing, renamed, or non-visible modules #534

Merged
merged 6 commits into from
Sep 10, 2023

Conversation

nmathewson
Copy link
Contributor

Closes #482

I tried to follow your instructions at #482 and at obi1kenobi/trustfall-rustdoc-adapter#261 (comment) ; how does this look?

Copy link
Owner

@obi1kenobi obi1kenobi left a comment

Choose a reason for hiding this comment

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

Nicely done! All looks correct, just a few tiny nitpicks.

"public": "public",
"zero": 0,
},
error_message: "A publicly-visible module cannot be imported by its prior path. A `pub use` may have been removed, or the module may have been renamed, removed, or made non-visible.",
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
error_message: "A publicly-visible module cannot be imported by its prior path. A `pub use` may have been removed, or the module may have been renamed, removed, or made non-visible.",
error_message: "A publicly-visible module cannot be imported by its prior path. A `pub use` may have been removed, or the module may have been renamed, removed, or made non-public.",

test_crates/module_missing/new/src/lib.rs Outdated Show resolved Hide resolved
test_crates/module_missing/new/src/lib.rs Outdated Show resolved Hide resolved
test_crates/module_missing/old/src/lib.rs Outdated Show resolved Hide resolved
Adjust formatting on test_crates/module_missing
@nmathewson
Copy link
Contributor Author

Pushed the suggested changes. Thanks!

Copy link
Owner

@obi1kenobi obi1kenobi left a comment

Choose a reason for hiding this comment

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

Just a minor consistency fix applying the formatting to the commented-out code as well.

test_crates/module_missing/new/src/lib.rs Outdated Show resolved Hide resolved
@obi1kenobi obi1kenobi enabled auto-merge (squash) September 10, 2023 01:19
@obi1kenobi
Copy link
Owner

obi1kenobi commented Sep 10, 2023

Marked for merge as soon as the tests finish, well done and thank you!

Are you interested in writing some more lints, or perhaps improving the contributing docs based on which things weren't obvious? No pressure of course, but if you are interested, I'm happy to keep merging :)

@obi1kenobi obi1kenobi merged commit 533cb3a into obi1kenobi:main Sep 10, 2023
34 checks passed
@nmathewson
Copy link
Contributor Author

Are you interested in writing some more lints, or perhaps improving the contributing docs based on which things weren't obvious? No pressure of course, but if you are interested, I'm happy to keep merging :)

FWIW, I do hope to add documentation, cleanups, and maybe a few more lints, in what free time I have... but of course, that free time is not as abundant as I would like. ;)

@obi1kenobi
Copy link
Owner

Of course! Any PRs you're interested in putting together are welcome and appreciated, regardless of timeline. You're in charge of the pace, I just want to make sure you are never blocked on me.

In terms of next lints, #366 has 3 suggestions that already have the necessary schema and just need lints and test cases, so they are the lowest-hanging fruit. If you'd like something more substantial for lints, we could also use help implementing #[doc(hidden)] handling. I'm about to be AFK for a couple of weeks (RustConf, then Strange Loop) but I'd be happy to mentor for that when I'm back if you're interested in it.

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.

False negative: Removing an empty module should be a breaking change
2 participants