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

Remove unused imports (thanks elp!) #11305

Merged
merged 2 commits into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
209f23fa2f58e0240116b3e8e5be9cd54d34b569
# Format MQTT code with erlfmt
1de9fcf582def91d1cee6bea457dd24e8a53a431
# Remove unsed imports
cfa3de4b2b1a07e9f4ef90d0aa6b22252238bc47
1 change: 0 additions & 1 deletion deps/amqp10_client/test/msg_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

-module(msg_SUITE).

-include_lib("common_test/include/ct.hrl").
-include_lib("eunit/include/eunit.hrl").

-include_lib("amqp10_common/include/amqp10_framing.hrl").
Expand Down
1 change: 0 additions & 1 deletion deps/amqp10_common/test/binary_parser_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
-export([
]).

-include_lib("common_test/include/ct.hrl").
-include_lib("eunit/include/eunit.hrl").

%%%===================================================================
Expand Down
2 changes: 0 additions & 2 deletions deps/amqp_client/src/amqp_channel_sup_sup.erl
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
%% @private
-module(amqp_channel_sup_sup).

-include("amqp_client.hrl").

-behaviour(supervisor).

-export([start_link/3, start_channel_sup/4]).
Expand Down
2 changes: 0 additions & 2 deletions deps/amqp_client/src/amqp_direct_consumer.erl
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@
%% This module has no public functions.
-module(amqp_direct_consumer).

-include("amqp_gen_consumer_spec.hrl").

-behaviour(amqp_gen_consumer).

-export([init/1, handle_consume_ok/3, handle_consume/3, handle_cancel_ok/3,
Expand Down
2 changes: 0 additions & 2 deletions deps/oauth2_client/src/oauth2_client.erl
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
]).

-include("oauth2_client.hrl").
-include_lib("public_key/include/public_key.hrl").

-spec get_access_token(oauth_provider_id() | oauth_provider(), access_token_request()) ->
{ok, successful_access_token_response()} | {error, unsuccessful_access_token_response() | any()}.
get_access_token(OAuth2ProviderId, Request) when is_binary(OAuth2ProviderId) ->
Expand Down
1 change: 0 additions & 1 deletion deps/oauth2_client/test/oauth_http_mock.erl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
%%

-module(oauth_http_mock).
-include_lib("common_test/include/ct.hrl").
-include_lib("eunit/include/eunit.hrl").

-export([init/2]).
Expand Down
20 changes: 8 additions & 12 deletions deps/rabbit/app.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -884,7 +884,7 @@ def test_suite_beam_files(name = "test_suite_beam_files"):
outs = ["test/clustering_management_SUITE.beam"],
app_name = "rabbit",
erlc_opts = "//:test_erlc_opts",
deps = ["//deps/amqp_client:erlang_app", "//deps/rabbitmq_ct_helpers:erlang_app"],
deps = ["//deps/amqp_client:erlang_app"],
)
erlang_bytecode(
name = "test_clustering_utils_beam",
Expand Down Expand Up @@ -954,7 +954,7 @@ def test_suite_beam_files(name = "test_suite_beam_files"):
outs = ["test/definition_import_SUITE.beam"],
app_name = "rabbit",
erlc_opts = "//:test_erlc_opts",
deps = ["//deps/rabbit_common:erlang_app", "//deps/rabbitmq_ct_helpers:erlang_app"],
deps = ["//deps/rabbitmq_ct_helpers:erlang_app"],
)
erlang_bytecode(
name = "deprecated_features_SUITE_beam_files",
Expand Down Expand Up @@ -1033,7 +1033,6 @@ def test_suite_beam_files(name = "test_suite_beam_files"):
outs = ["test/feature_flags_v2_SUITE.beam"],
app_name = "rabbit",
erlc_opts = "//:test_erlc_opts",
deps = ["//deps/rabbit_common:erlang_app"],
)
erlang_bytecode(
name = "feature_flags_with_unpriveleged_user_SUITE_beam_files",
Expand Down Expand Up @@ -1140,7 +1139,7 @@ def test_suite_beam_files(name = "test_suite_beam_files"):
outs = ["test/peer_discovery_classic_config_SUITE.beam"],
app_name = "rabbit",
erlc_opts = "//:test_erlc_opts",
deps = ["//deps/amqp_client:erlang_app", "//deps/rabbitmq_ct_helpers:erlang_app"],
deps = ["//deps/rabbitmq_ct_helpers:erlang_app"],
)
erlang_bytecode(
name = "peer_discovery_dns_SUITE_beam_files",
Expand Down Expand Up @@ -1371,7 +1370,7 @@ def test_suite_beam_files(name = "test_suite_beam_files"):
testonly = True,
srcs = ["test/rabbit_fifo_dlx_SUITE.erl"],
outs = ["test/rabbit_fifo_dlx_SUITE.beam"],
hdrs = ["src/rabbit_fifo.hrl", "src/rabbit_fifo_dlx.hrl"],
hdrs = ["src/rabbit_fifo.hrl"],
app_name = "rabbit",
erlc_opts = "//:test_erlc_opts",
deps = ["//deps/rabbit_common:erlang_app"],
Expand Down Expand Up @@ -1477,7 +1476,6 @@ def test_suite_beam_files(name = "test_suite_beam_files"):
outs = ["test/rabbitmqctl_shutdown_SUITE.beam"],
app_name = "rabbit",
erlc_opts = "//:test_erlc_opts",
deps = ["//deps/amqp_client:erlang_app"],
)
erlang_bytecode(
name = "signal_handling_SUITE_beam_files",
Expand Down Expand Up @@ -1521,7 +1519,7 @@ def test_suite_beam_files(name = "test_suite_beam_files"):
outs = ["test/term_to_binary_compat_prop_SUITE.beam"],
app_name = "rabbit",
erlc_opts = "//:test_erlc_opts",
deps = ["//deps/rabbit_common:erlang_app", "@proper//:erlang_app"],
deps = ["@proper//:erlang_app"],
)
erlang_bytecode(
name = "test_channel_operation_timeout_test_queue_beam",
Expand Down Expand Up @@ -1823,7 +1821,6 @@ def test_suite_beam_files(name = "test_suite_beam_files"):
testonly = True,
srcs = ["test/unit_gm_SUITE.erl"],
outs = ["test/unit_gm_SUITE.beam"],
hdrs = ["include/gm_specs.hrl"],
app_name = "rabbit",
beam = ["ebin/gm.beam"],
erlc_opts = "//:test_erlc_opts",
Expand Down Expand Up @@ -2007,7 +2004,6 @@ def test_suite_beam_files(name = "test_suite_beam_files"):
outs = ["test/rabbit_db_msup_SUITE.beam"],
app_name = "rabbit",
erlc_opts = "//:test_erlc_opts",
deps = ["//deps/rabbit_common:erlang_app"],
)
erlang_bytecode(
name = "rabbit_db_policy_SUITE_beam_files",
Expand Down Expand Up @@ -2088,7 +2084,7 @@ def test_suite_beam_files(name = "test_suite_beam_files"):
outs = ["test/quorum_queue_member_reconciliation_SUITE.beam"],
app_name = "rabbit",
erlc_opts = "//:test_erlc_opts",
deps = ["//deps/amqp_client:erlang_app", "//deps/rabbitmq_ct_helpers:erlang_app"],
deps = ["//deps/amqp_client:erlang_app"],
)

erlang_bytecode(
Expand All @@ -2098,7 +2094,7 @@ def test_suite_beam_files(name = "test_suite_beam_files"):
outs = ["test/cluster_limit_SUITE.beam"],
app_name = "rabbit",
erlc_opts = "//:test_erlc_opts",
deps = ["//deps/amqp_client:erlang_app", "//deps/rabbitmq_ct_helpers:erlang_app"],
deps = ["//deps/amqp_client:erlang_app"],
)
erlang_bytecode(
name = "metadata_store_clustering_SUITE_beam_files",
Expand All @@ -2107,7 +2103,7 @@ def test_suite_beam_files(name = "test_suite_beam_files"):
outs = ["test/metadata_store_clustering_SUITE.beam"],
app_name = "rabbit",
erlc_opts = "//:test_erlc_opts",
deps = ["//deps/amqp_client:erlang_app", "//deps/rabbitmq_ct_helpers:erlang_app"],
deps = ["//deps/amqp_client:erlang_app"],
)
erlang_bytecode(
name = "metadata_store_migration_SUITE_beam_files",
Expand Down
2 changes: 0 additions & 2 deletions deps/rabbit/src/internal_user.erl
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

-module(internal_user).

-include_lib("rabbit_common/include/rabbit.hrl").

-export([
new/0,
new/1,
Expand Down
1 change: 0 additions & 1 deletion deps/rabbit/src/rabbit.erl
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,6 @@

%%---------------------------------------------------------------------------

-include_lib("rabbit_common/include/rabbit_framing.hrl").
-include_lib("rabbit_common/include/rabbit.hrl").

-define(APPS, [os_mon, mnesia, rabbit_common, rabbitmq_prelaunch, ra, sysmon_handler, rabbit, osiris]).
Expand Down
1 change: 0 additions & 1 deletion deps/rabbit/src/rabbit_amqqueue_process.erl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

-module(rabbit_amqqueue_process).
-include_lib("rabbit_common/include/rabbit.hrl").
-include_lib("rabbit_common/include/rabbit_framing.hrl").
-include("amqqueue.hrl").

-behaviour(gen_server2).
Expand Down
2 changes: 0 additions & 2 deletions deps/rabbit/src/rabbit_auth_mechanism_amqplain.erl
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
%%

-module(rabbit_auth_mechanism_amqplain).
-include_lib("rabbit_common/include/rabbit.hrl").

-behaviour(rabbit_auth_mechanism).

-export([description/0, should_offer/1, init/1, handle_response/2]).
Expand Down
2 changes: 0 additions & 2 deletions deps/rabbit/src/rabbit_auth_mechanism_cr_demo.erl
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
%%

-module(rabbit_auth_mechanism_cr_demo).
-include_lib("rabbit_common/include/rabbit.hrl").

-behaviour(rabbit_auth_mechanism).

-export([description/0, should_offer/1, init/1, handle_response/2]).
Expand Down
2 changes: 0 additions & 2 deletions deps/rabbit/src/rabbit_auth_mechanism_plain.erl
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
%%

-module(rabbit_auth_mechanism_plain).
-include_lib("rabbit_common/include/rabbit.hrl").

-behaviour(rabbit_auth_mechanism).

-export([description/0, should_offer/1, init/1, handle_response/2]).
Expand Down
1 change: 0 additions & 1 deletion deps/rabbit/src/rabbit_channel_interceptor.erl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

-module(rabbit_channel_interceptor).

-include_lib("rabbit_common/include/rabbit_framing.hrl").
-include_lib("rabbit_common/include/rabbit.hrl").

-export([init/1, intercept_in/3]).
Expand Down
2 changes: 0 additions & 2 deletions deps/rabbit/src/rabbit_classic_queue_index_v2.erl
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@
-define(STORE_FD_RESERVATIONS, 2).

-include_lib("rabbit_common/include/rabbit.hrl").
-include_lib("kernel/include/file.hrl").

%% Set to true to get an awful lot of debug logs.
-if(false).
-define(DEBUG(X,Y), logger:debug("~0p: " ++ X, [?FUNCTION_NAME|Y])).
Expand Down
2 changes: 0 additions & 2 deletions deps/rabbit/src/rabbit_credential_validation.erl
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

-module(rabbit_credential_validation).

-include_lib("rabbit_common/include/rabbit.hrl").

%% used for backwards compatibility
-define(DEFAULT_BACKEND, rabbit_credential_validator_accept_everything).

Expand Down
2 changes: 0 additions & 2 deletions deps/rabbit/src/rabbit_credential_validator.erl
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

-module(rabbit_credential_validator).

-include_lib("rabbit_common/include/rabbit.hrl").

%% Validates a password. Used by `rabbit_auth_backend_internal`.
%%
%% Possible return values:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

-module(rabbit_credential_validator_accept_everything).

-include_lib("rabbit_common/include/rabbit.hrl").

-behaviour(rabbit_credential_validator).

%%
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

-module(rabbit_credential_validator_min_password_length).

-include_lib("rabbit_common/include/rabbit.hrl").

-behaviour(rabbit_credential_validator).

%% accommodates default (localhost-only) user credentials,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
%% password against a pre-configured regular expression.
-module(rabbit_credential_validator_password_regexp).

-include_lib("rabbit_common/include/rabbit.hrl").

-behaviour(rabbit_credential_validator).

%%
Expand Down
2 changes: 0 additions & 2 deletions deps/rabbit/src/rabbit_db.erl
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

-module(rabbit_db).

-include_lib("khepri/include/khepri.hrl").

-include_lib("kernel/include/logger.hrl").
-include_lib("stdlib/include/assert.hrl").

Expand Down
1 change: 0 additions & 1 deletion deps/rabbit/src/rabbit_db_binding_m2k_converter.erl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
-behaviour(mnesia_to_khepri_converter).

-include_lib("kernel/include/logger.hrl").
-include_lib("khepri/include/khepri.hrl").
-include_lib("khepri_mnesia_migration/src/kmm_logging.hrl").
-include_lib("rabbit_common/include/rabbit.hrl").

Expand Down
1 change: 0 additions & 1 deletion deps/rabbit/src/rabbit_db_m2k_converter.erl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

-behaviour(mnesia_to_khepri_converter).

-include_lib("kernel/include/logger.hrl").
-include_lib("khepri/include/khepri.hrl").
-include_lib("khepri_mnesia_migration/src/kmm_logging.hrl").
-include_lib("rabbit_common/include/rabbit.hrl").
Expand Down
1 change: 0 additions & 1 deletion deps/rabbit/src/rabbit_db_maintenance_m2k_converter.erl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
-behaviour(mnesia_to_khepri_converter).

-include_lib("kernel/include/logger.hrl").
-include_lib("khepri/include/khepri.hrl").
-include_lib("khepri_mnesia_migration/src/kmm_logging.hrl").
-include_lib("rabbit_common/include/rabbit.hrl").

Expand Down
1 change: 0 additions & 1 deletion deps/rabbit/src/rabbit_db_msup_m2k_converter.erl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
-behaviour(mnesia_to_khepri_converter).

-include_lib("kernel/include/logger.hrl").
-include_lib("khepri/include/khepri.hrl").
-include_lib("khepri_mnesia_migration/src/kmm_logging.hrl").
-include_lib("rabbit_common/include/rabbit.hrl").
-include("mirrored_supervisor.hrl").
Expand Down
1 change: 0 additions & 1 deletion deps/rabbit/src/rabbit_db_queue.erl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

-module(rabbit_db_queue).

-include_lib("kernel/include/logger.hrl").
-include_lib("stdlib/include/qlc.hrl").

-include_lib("khepri/include/khepri.hrl").
Expand Down
1 change: 0 additions & 1 deletion deps/rabbit/src/rabbit_db_queue_m2k_converter.erl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
-behaviour(mnesia_to_khepri_converter).

-include_lib("kernel/include/logger.hrl").
-include_lib("khepri/include/khepri.hrl").
-include_lib("khepri_mnesia_migration/src/kmm_logging.hrl").
-include_lib("rabbit_common/include/rabbit.hrl").
-include("amqqueue.hrl").
Expand Down
1 change: 0 additions & 1 deletion deps/rabbit/src/rabbit_db_rtparams_m2k_converter.erl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
-behaviour(mnesia_to_khepri_converter).

-include_lib("kernel/include/logger.hrl").
-include_lib("khepri/include/khepri.hrl").
-include_lib("khepri_mnesia_migration/src/kmm_logging.hrl").
-include_lib("rabbit_common/include/rabbit.hrl").

Expand Down
1 change: 0 additions & 1 deletion deps/rabbit/src/rabbit_db_vhost.erl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

-module(rabbit_db_vhost).

-include_lib("kernel/include/logger.hrl").
-include_lib("stdlib/include/assert.hrl").
-include_lib("rabbit_common/include/logging.hrl").
-include_lib("khepri/include/khepri.hrl").
Expand Down
1 change: 0 additions & 1 deletion deps/rabbit/src/rabbit_db_vhost_m2k_converter.erl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
-behaviour(mnesia_to_khepri_converter).

-include_lib("kernel/include/logger.hrl").
-include_lib("khepri/include/khepri.hrl").
-include_lib("khepri_mnesia_migration/src/kmm_logging.hrl").
-include_lib("rabbit_common/include/rabbit.hrl").
-include("vhost.hrl").
Expand Down
2 changes: 0 additions & 2 deletions deps/rabbit/src/rabbit_definitions_import_https.erl
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
%% * rabbit_definitions_import_local_filesystem
%% * rabbit_definitions_hashing
-module(rabbit_definitions_import_https).
-include_lib("rabbit_common/include/rabbit.hrl").

-export([
is_enabled/0,
load/1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
%% * rabbit_definitions_import_http
%% * rabbit_definitions_hashing
-module(rabbit_definitions_import_local_filesystem).
-include_lib("rabbit_common/include/rabbit.hrl").

-export([
is_enabled/0,
%% definition source options
Expand Down
2 changes: 0 additions & 2 deletions deps/rabbit/src/rabbit_logger_exchange_h.erl
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
-include_lib("rabbit_common/include/rabbit.hrl").
-include_lib("rabbit_common/include/rabbit_framing.hrl").
-include_lib("rabbit_common/include/logging.hrl").
-include_lib("rabbit/include/mc.hrl").

%% logger callbacks
-export([log/2, adding_handler/1, removing_handler/1, changing_config/3,
filter_config/1]).
Expand Down
2 changes: 0 additions & 2 deletions deps/rabbit/src/rabbit_mirror_queue_mode_all.erl
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

-module(rabbit_mirror_queue_mode_all).

-include_lib("rabbit_common/include/rabbit.hrl").

-behaviour(rabbit_mirror_queue_mode).

-export([description/0, suggested_queue_nodes/5, validate_policy/1]).
Expand Down
Loading
Loading