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 lint: Pub module level static missing #496

Merged
merged 11 commits into from
Jul 15, 2023
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
SemverQuery(
id: "pub_module_level_static_missing",
id: "pub_static_missing",
human_readable_name: "pub module-level static is missing",
obi1kenobi marked this conversation as resolved.
Show resolved Hide resolved
description: "A pub static is missing, renamed, or made private",
required_update: Major,
Expand Down
2 changes: 1 addition & 1 deletion src/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -512,5 +512,5 @@ add_lints!(
enum_tuple_variant_field_added,
trait_removed_supertrait,
pub_module_level_const_missing,
pub_module_level_static_missing,
pub_static_missing,
);
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
publish = false
name = "pub_module_level_static_missing"
name = "pub_static_missing"
version = "0.1.0"
edition = "2021"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
publish = false
name = "pub_module_level_static_missing"
name = "pub_static_missing"
version = "0.1.0"
edition = "2021"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"./test_crates/pub_module_level_static_missing/": [
"./test_crates/pub_static_missing/": [
{
"name": String("PUB_STATIC_IN_GLOBAL_WILL_REMOVE"),
"path": List([
String("pub_module_level_static_missing"),
String("pub_static_missing"),
String("PUB_STATIC_IN_GLOBAL_WILL_REMOVE"),
]),
"span_begin_line": Uint64(2),
Expand All @@ -13,7 +13,7 @@
{
"name": String("PUB_STATIC_IN_GLOBAL_WILL_RENAME"),
"path": List([
String("pub_module_level_static_missing"),
String("pub_static_missing"),
String("PUB_STATIC_IN_GLOBAL_WILL_RENAME"),
]),
"span_begin_line": Uint64(3),
Expand All @@ -23,7 +23,7 @@
{
"name": String("PUB_STATIC_IN_GLOBAL_WILL_BE_PRIVATE_CONST"),
"path": List([
String("pub_module_level_static_missing"),
String("pub_static_missing"),
String("PUB_STATIC_IN_GLOBAL_WILL_BE_PRIVATE_CONST"),
]),
"span_begin_line": Uint64(5),
Expand All @@ -33,7 +33,7 @@
{
"name": String("PUB_STATIC_IN_GLOBAL_WILL_BE_PRIVATE_STATIC"),
"path": List([
String("pub_module_level_static_missing"),
String("pub_static_missing"),
String("PUB_STATIC_IN_GLOBAL_WILL_BE_PRIVATE_STATIC"),
]),
"span_begin_line": Uint64(6),
Expand All @@ -43,7 +43,7 @@
{
"name": String("PUB_STATIC_IN_MODULE_WILL_REMOVE"),
"path": List([
String("pub_module_level_static_missing"),
String("pub_static_missing"),
String("my_module"),
String("PUB_STATIC_IN_MODULE_WILL_REMOVE"),
]),
Expand All @@ -54,7 +54,7 @@
{
"name": String("PUB_STATIC_IN_MODULE_WILL_RENAME"),
"path": List([
String("pub_module_level_static_missing"),
String("pub_static_missing"),
String("my_module"),
String("PUB_STATIC_IN_MODULE_WILL_RENAME"),
]),
Expand All @@ -65,7 +65,7 @@
{
"name": String("PUB_STATIC_IN_MODULE_WILL_BE_PRIVATE_CONST"),
"path": List([
String("pub_module_level_static_missing"),
String("pub_static_missing"),
String("my_module"),
String("PUB_STATIC_IN_MODULE_WILL_BE_PRIVATE_CONST"),
]),
Expand All @@ -76,7 +76,7 @@
{
"name": String("PUB_STATIC_IN_MODULE_WILL_BE_PRIVATE_STATIC"),
"path": List([
String("pub_module_level_static_missing"),
String("pub_static_missing"),
String("my_module"),
String("PUB_STATIC_IN_MODULE_WILL_BE_PRIVATE_STATIC"),
]),
Expand All @@ -87,7 +87,7 @@
{
"name": String("PUB_STATIC_IN_NESTED_MODULE_WILL_REMOVE"),
"path": List([
String("pub_module_level_static_missing"),
String("pub_static_missing"),
String("my_module"),
String("my_module_nested"),
String("PUB_STATIC_IN_NESTED_MODULE_WILL_REMOVE"),
Expand All @@ -99,7 +99,7 @@
{
"name": String("PUB_STATIC_IN_NESTED_MODULE_WILL_RENAME"),
"path": List([
String("pub_module_level_static_missing"),
String("pub_static_missing"),
String("my_module"),
String("my_module_nested"),
String("PUB_STATIC_IN_NESTED_MODULE_WILL_RENAME"),
Expand All @@ -111,7 +111,7 @@
{
"name": String("PUB_STATIC_IN_NESTED_MODULE_WILL_BE_PRIVATE_CONST"),
"path": List([
String("pub_module_level_static_missing"),
String("pub_static_missing"),
String("my_module"),
String("my_module_nested"),
String("PUB_STATIC_IN_NESTED_MODULE_WILL_BE_PRIVATE_CONST"),
Expand All @@ -123,7 +123,7 @@
{
"name": String("PUB_STATIC_IN_NESTED_MODULE_WILL_BE_PRIVATE_STATIC"),
"path": List([
String("pub_module_level_static_missing"),
String("pub_static_missing"),
String("my_module"),
String("my_module_nested"),
String("PUB_STATIC_IN_NESTED_MODULE_WILL_BE_PRIVATE_STATIC"),
Expand Down