From 9666a9ffd7a657a34c87a3da5e38a720ad41cdf1 Mon Sep 17 00:00:00 2001 From: Brujo Benavides Date: Mon, 17 May 2021 17:04:54 +0200 Subject: [PATCH] Fix #125: Move test files to test/files (#126) * Fix #125: Move test files to test/files * Remove debug * Update rebar3 for CI * Remove CI check with old rebar3 that was causing issues * The local update was doing nothing at all --- .github/workflows/erlang.yml | 4 +++- elvis.config | 2 +- {priv/test_files => test/files}/ignore/no_ignore.erl | 0 {priv/test_files => test/files}/ignore/no_ignore.hrl | 0 {priv/test_files => test/files}/ignore/specific_ignore.erl | 0 {priv/test_files => test/files}/ignore/with_ignore.erl | 0 {priv/test_files => test/files}/ignore/with_ignore.hrl | 0 .../files}/single_use_hrl_attrs/lib/app/include/header1.hrl | 0 .../files}/single_use_hrl_attrs/lib/app/include/header2.hrl | 0 .../files}/single_use_hrl_attrs/lib/app/include/header3.hrl | 0 .../files}/single_use_hrl_attrs/lib/app/include/ignore.hrl | 0 .../files}/single_use_hrl_attrs/lib/app/src/app.app.src | 0 .../files}/single_use_hrl_attrs/lib/app/src/app_include.erl | 0 .../single_use_hrl_attrs/lib/app/src/app_include_lib.erl | 0 .../files}/single_use_hrl_attrs/lib/app/src/app_other.erl | 0 .../files}/single_use_hrl_attrs/lib/app/src/ignore.erl | 0 .../files}/single_use_hrls/include/ignored.hrl | 0 .../files}/single_use_hrls/include/multi.hrl | 0 .../files}/single_use_hrls/include/single.hrl | 0 .../files}/single_use_hrls/include/single_unicode.hrl | 0 .../files}/single_use_hrls/src/include_ignored.erl | 0 .../files}/single_use_hrls/src/include_missing.erl | 0 .../files}/single_use_hrls/src/include_multi.erl | 0 .../files}/single_use_hrls/src/include_single.erl | 0 .../single_use_hrls/src/include_unicode_\303\245\303\266.erl" | 0 {priv/test_files => test/files}/test_app/another_sys.config | 0 {priv/test_files => test/files}/test_app/elvis.config | 0 .../files}/test_app/include/a_folder/a_header.hrl | 0 {priv/test_files => test/files}/test_app/include/a_header.hrl | 0 .../lib/a_project/src/a_folder/a_subfolder/a_module.erl | 0 {priv/test_files => test/files}/test_app/one_tuple.config | 0 {priv/test_files => test/files}/test_app/rebar.config | 0 {priv/test_files => test/files}/test_app/relx.config | 0 .../files}/test_app/src/a_folder/a_module.erl | 0 .../files}/test_app/src/a_folder/a_subfolder/a_module.erl | 0 {priv/test_files => test/files}/test_app/src/a_module.erl | 0 {priv/test_files => test/files}/test_app/src/test_app.app.src | 0 {priv/test_files => test/files}/test_app/sys.config | 0 .../files}/test_app/test/a_folder/a_module.erl | 0 .../files}/test_app/test/a_module_SUITE.erl | 0 {priv/test_files => test/files}/test_app/user.config | 0 .../test_app/without_warnings/include/a_folder/a_header.hrl | 0 .../files}/test_app/without_warnings/include/a_header.hrl | 0 .../lib/a_project/src/a_folder/a_subfolder/a_module.erl | 0 .../lib/a_project/src/a_folder/a_subfolder/another_module.erl | 0 .../test_app/without_warnings/src/a_folder/a_module.erl | 0 .../without_warnings/src/a_folder/a_subfolder/a_module.erl | 0 .../files}/test_app/without_warnings/src/a_module.erl | 0 .../test_app/without_warnings/test/a_folder/a_module.erl | 0 .../files}/test_app/without_warnings/test/a_module_SUITE.erl | 0 .../files}/unnecessary_function_arguments/clean.erl | 0 .../files}/unnecessary_function_arguments/ct_SUITE.erl | 0 .../files}/unnecessary_function_arguments/gen_server_imp.erl | 0 .../files}/unnecessary_function_arguments/ignore.erl | 0 .../files}/unnecessary_function_arguments/ignore_config.erl | 0 .../files}/unnecessary_function_arguments/macros.erl | 0 .../files}/unnecessary_function_arguments/nifs.erl | 0 .../files}/unnecessary_function_arguments/old_ct_SUITE.erl | 0 .../files}/unnecessary_function_arguments/warnings_A.erl | 0 .../files}/unnecessary_function_arguments/warnings_B.erl | 0 .../files}/unnecessary_function_arguments/weird.erl | 0 {priv/test_files => test/files}/unused_callbacks/clean.erl | 0 {priv/test_files => test/files}/unused_callbacks/ignore.erl | 0 .../files}/unused_callbacks/ignore_config.erl | 0 {priv/test_files => test/files}/unused_callbacks/macros.erl | 0 {priv/test_files => test/files}/unused_callbacks/warnings.erl | 0 .../unused_hrls/lib/app0-with-other-name/include/header.hrl | 0 .../unused_hrls/lib/app0-with-other-name/src/app0.app.src | 0 .../files}/unused_hrls/lib/app1/include/header.hrl | 0 .../files}/unused_hrls/lib/app1/src/app1.app.src | 0 .../files}/unused_hrls/lib/app1/src/app1_include.erl | 0 .../files}/unused_hrls/lib/app1/src/app1_include_lib.erl | 0 .../files}/unused_hrls/lib/app1/src/app1_not_using_header.erl | 0 .../files}/unused_hrls/lib/app2/src/app2.app.src | 0 .../files}/unused_hrls/lib/app2/src/app2_include.erl | 0 .../files}/unused_hrls/lib/app2/src/app2_include_lib.erl | 0 .../files}/unused_hrls/lib/app2/src/app2_not_using_header.erl | 0 {priv/test_files => test/files}/unused_macros/double.erl | 0 {priv/test_files => test/files}/unused_macros/header.hrl | 0 {priv/test_files => test/files}/unused_macros/ignore.erl | 0 .../test_files => test/files}/unused_macros/ignore_config.erl | 0 .../files}/unused_macros/unused_macro_sample.erl | 0 .../files}/unused_macros/used_macro_sample.erl | 0 .../test_files => test/files}/unused_record_fields/header.hrl | 0 .../test_files => test/files}/unused_record_fields/ignore.erl | 0 .../files}/unused_record_fields/ignore_config.erl | 0 .../test_files => test/files}/unused_record_fields/macros.erl | 0 .../unused_record_fields/unused_record_field_sample.erl | 0 .../files}/unused_record_fields/used_record_field_sample.erl | 0 test/hank_test_utils.erl | 2 +- test/unused_hrls_SUITE.erl | 2 +- 91 files changed, 6 insertions(+), 4 deletions(-) rename {priv/test_files => test/files}/ignore/no_ignore.erl (100%) rename {priv/test_files => test/files}/ignore/no_ignore.hrl (100%) rename {priv/test_files => test/files}/ignore/specific_ignore.erl (100%) rename {priv/test_files => test/files}/ignore/with_ignore.erl (100%) rename {priv/test_files => test/files}/ignore/with_ignore.hrl (100%) rename {priv/test_files => test/files}/single_use_hrl_attrs/lib/app/include/header1.hrl (100%) rename {priv/test_files => test/files}/single_use_hrl_attrs/lib/app/include/header2.hrl (100%) rename {priv/test_files => test/files}/single_use_hrl_attrs/lib/app/include/header3.hrl (100%) rename {priv/test_files => test/files}/single_use_hrl_attrs/lib/app/include/ignore.hrl (100%) rename {priv/test_files => test/files}/single_use_hrl_attrs/lib/app/src/app.app.src (100%) rename {priv/test_files => test/files}/single_use_hrl_attrs/lib/app/src/app_include.erl (100%) rename {priv/test_files => test/files}/single_use_hrl_attrs/lib/app/src/app_include_lib.erl (100%) rename {priv/test_files => test/files}/single_use_hrl_attrs/lib/app/src/app_other.erl (100%) rename {priv/test_files => test/files}/single_use_hrl_attrs/lib/app/src/ignore.erl (100%) rename {priv/test_files => test/files}/single_use_hrls/include/ignored.hrl (100%) rename {priv/test_files => test/files}/single_use_hrls/include/multi.hrl (100%) rename {priv/test_files => test/files}/single_use_hrls/include/single.hrl (100%) rename {priv/test_files => test/files}/single_use_hrls/include/single_unicode.hrl (100%) rename {priv/test_files => test/files}/single_use_hrls/src/include_ignored.erl (100%) rename {priv/test_files => test/files}/single_use_hrls/src/include_missing.erl (100%) rename {priv/test_files => test/files}/single_use_hrls/src/include_multi.erl (100%) rename {priv/test_files => test/files}/single_use_hrls/src/include_single.erl (100%) rename "priv/test_files/single_use_hrls/src/include_unicode_\303\245\303\266.erl" => "test/files/single_use_hrls/src/include_unicode_\303\245\303\266.erl" (100%) rename {priv/test_files => test/files}/test_app/another_sys.config (100%) rename {priv/test_files => test/files}/test_app/elvis.config (100%) rename {priv/test_files => test/files}/test_app/include/a_folder/a_header.hrl (100%) rename {priv/test_files => test/files}/test_app/include/a_header.hrl (100%) rename {priv/test_files => test/files}/test_app/lib/a_project/src/a_folder/a_subfolder/a_module.erl (100%) rename {priv/test_files => test/files}/test_app/one_tuple.config (100%) rename {priv/test_files => test/files}/test_app/rebar.config (100%) rename {priv/test_files => test/files}/test_app/relx.config (100%) rename {priv/test_files => test/files}/test_app/src/a_folder/a_module.erl (100%) rename {priv/test_files => test/files}/test_app/src/a_folder/a_subfolder/a_module.erl (100%) rename {priv/test_files => test/files}/test_app/src/a_module.erl (100%) rename {priv/test_files => test/files}/test_app/src/test_app.app.src (100%) rename {priv/test_files => test/files}/test_app/sys.config (100%) rename {priv/test_files => test/files}/test_app/test/a_folder/a_module.erl (100%) rename {priv/test_files => test/files}/test_app/test/a_module_SUITE.erl (100%) rename {priv/test_files => test/files}/test_app/user.config (100%) rename {priv/test_files => test/files}/test_app/without_warnings/include/a_folder/a_header.hrl (100%) rename {priv/test_files => test/files}/test_app/without_warnings/include/a_header.hrl (100%) rename {priv/test_files => test/files}/test_app/without_warnings/lib/a_project/src/a_folder/a_subfolder/a_module.erl (100%) rename {priv/test_files => test/files}/test_app/without_warnings/lib/a_project/src/a_folder/a_subfolder/another_module.erl (100%) rename {priv/test_files => test/files}/test_app/without_warnings/src/a_folder/a_module.erl (100%) rename {priv/test_files => test/files}/test_app/without_warnings/src/a_folder/a_subfolder/a_module.erl (100%) rename {priv/test_files => test/files}/test_app/without_warnings/src/a_module.erl (100%) rename {priv/test_files => test/files}/test_app/without_warnings/test/a_folder/a_module.erl (100%) rename {priv/test_files => test/files}/test_app/without_warnings/test/a_module_SUITE.erl (100%) rename {priv/test_files => test/files}/unnecessary_function_arguments/clean.erl (100%) rename {priv/test_files => test/files}/unnecessary_function_arguments/ct_SUITE.erl (100%) rename {priv/test_files => test/files}/unnecessary_function_arguments/gen_server_imp.erl (100%) rename {priv/test_files => test/files}/unnecessary_function_arguments/ignore.erl (100%) rename {priv/test_files => test/files}/unnecessary_function_arguments/ignore_config.erl (100%) rename {priv/test_files => test/files}/unnecessary_function_arguments/macros.erl (100%) rename {priv/test_files => test/files}/unnecessary_function_arguments/nifs.erl (100%) rename {priv/test_files => test/files}/unnecessary_function_arguments/old_ct_SUITE.erl (100%) rename {priv/test_files => test/files}/unnecessary_function_arguments/warnings_A.erl (100%) rename {priv/test_files => test/files}/unnecessary_function_arguments/warnings_B.erl (100%) rename {priv/test_files => test/files}/unnecessary_function_arguments/weird.erl (100%) rename {priv/test_files => test/files}/unused_callbacks/clean.erl (100%) rename {priv/test_files => test/files}/unused_callbacks/ignore.erl (100%) rename {priv/test_files => test/files}/unused_callbacks/ignore_config.erl (100%) rename {priv/test_files => test/files}/unused_callbacks/macros.erl (100%) rename {priv/test_files => test/files}/unused_callbacks/warnings.erl (100%) rename {priv/test_files => test/files}/unused_hrls/lib/app0-with-other-name/include/header.hrl (100%) rename {priv/test_files => test/files}/unused_hrls/lib/app0-with-other-name/src/app0.app.src (100%) rename {priv/test_files => test/files}/unused_hrls/lib/app1/include/header.hrl (100%) rename {priv/test_files => test/files}/unused_hrls/lib/app1/src/app1.app.src (100%) rename {priv/test_files => test/files}/unused_hrls/lib/app1/src/app1_include.erl (100%) rename {priv/test_files => test/files}/unused_hrls/lib/app1/src/app1_include_lib.erl (100%) rename {priv/test_files => test/files}/unused_hrls/lib/app1/src/app1_not_using_header.erl (100%) rename {priv/test_files => test/files}/unused_hrls/lib/app2/src/app2.app.src (100%) rename {priv/test_files => test/files}/unused_hrls/lib/app2/src/app2_include.erl (100%) rename {priv/test_files => test/files}/unused_hrls/lib/app2/src/app2_include_lib.erl (100%) rename {priv/test_files => test/files}/unused_hrls/lib/app2/src/app2_not_using_header.erl (100%) rename {priv/test_files => test/files}/unused_macros/double.erl (100%) rename {priv/test_files => test/files}/unused_macros/header.hrl (100%) rename {priv/test_files => test/files}/unused_macros/ignore.erl (100%) rename {priv/test_files => test/files}/unused_macros/ignore_config.erl (100%) rename {priv/test_files => test/files}/unused_macros/unused_macro_sample.erl (100%) rename {priv/test_files => test/files}/unused_macros/used_macro_sample.erl (100%) rename {priv/test_files => test/files}/unused_record_fields/header.hrl (100%) rename {priv/test_files => test/files}/unused_record_fields/ignore.erl (100%) rename {priv/test_files => test/files}/unused_record_fields/ignore_config.erl (100%) rename {priv/test_files => test/files}/unused_record_fields/macros.erl (100%) rename {priv/test_files => test/files}/unused_record_fields/unused_record_field_sample.erl (100%) rename {priv/test_files => test/files}/unused_record_fields/used_record_field_sample.erl (100%) diff --git a/.github/workflows/erlang.yml b/.github/workflows/erlang.yml index 65a4705..47a0664 100644 --- a/.github/workflows/erlang.yml +++ b/.github/workflows/erlang.yml @@ -10,12 +10,14 @@ jobs: strategy: matrix: - otp: [21.3, 22.0.7, 22.3, 23.0.4, 23.2.7.0, 24.0] + otp: [21.3, 22.3, 23.0.4, 23.2.7.0, 24.0] container: image: erlang:${{ matrix.otp }}-alpine steps: - uses: actions/checkout@v2 + - name: Check rebar3 version + run: rebar3 --version - name: Compile run: rebar3 compile - name: Format check diff --git a/elvis.config b/elvis.config index 96c1e0c..13cc117 100644 --- a/elvis.config +++ b/elvis.config @@ -3,7 +3,7 @@ [#{dirs => ["src", "src/**"], filter => "*.erl", ruleset => erl_files}, - #{dirs => ["test/**"], + #{dirs => ["test"], %% Don't analyze test/files filter => "*.erl", ruleset => erl_files, rules => [{elvis_style, no_debug_call, disable}]}]}]}]. diff --git a/priv/test_files/ignore/no_ignore.erl b/test/files/ignore/no_ignore.erl similarity index 100% rename from priv/test_files/ignore/no_ignore.erl rename to test/files/ignore/no_ignore.erl diff --git a/priv/test_files/ignore/no_ignore.hrl b/test/files/ignore/no_ignore.hrl similarity index 100% rename from priv/test_files/ignore/no_ignore.hrl rename to test/files/ignore/no_ignore.hrl diff --git a/priv/test_files/ignore/specific_ignore.erl b/test/files/ignore/specific_ignore.erl similarity index 100% rename from priv/test_files/ignore/specific_ignore.erl rename to test/files/ignore/specific_ignore.erl diff --git a/priv/test_files/ignore/with_ignore.erl b/test/files/ignore/with_ignore.erl similarity index 100% rename from priv/test_files/ignore/with_ignore.erl rename to test/files/ignore/with_ignore.erl diff --git a/priv/test_files/ignore/with_ignore.hrl b/test/files/ignore/with_ignore.hrl similarity index 100% rename from priv/test_files/ignore/with_ignore.hrl rename to test/files/ignore/with_ignore.hrl diff --git a/priv/test_files/single_use_hrl_attrs/lib/app/include/header1.hrl b/test/files/single_use_hrl_attrs/lib/app/include/header1.hrl similarity index 100% rename from priv/test_files/single_use_hrl_attrs/lib/app/include/header1.hrl rename to test/files/single_use_hrl_attrs/lib/app/include/header1.hrl diff --git a/priv/test_files/single_use_hrl_attrs/lib/app/include/header2.hrl b/test/files/single_use_hrl_attrs/lib/app/include/header2.hrl similarity index 100% rename from priv/test_files/single_use_hrl_attrs/lib/app/include/header2.hrl rename to test/files/single_use_hrl_attrs/lib/app/include/header2.hrl diff --git a/priv/test_files/single_use_hrl_attrs/lib/app/include/header3.hrl b/test/files/single_use_hrl_attrs/lib/app/include/header3.hrl similarity index 100% rename from priv/test_files/single_use_hrl_attrs/lib/app/include/header3.hrl rename to test/files/single_use_hrl_attrs/lib/app/include/header3.hrl diff --git a/priv/test_files/single_use_hrl_attrs/lib/app/include/ignore.hrl b/test/files/single_use_hrl_attrs/lib/app/include/ignore.hrl similarity index 100% rename from priv/test_files/single_use_hrl_attrs/lib/app/include/ignore.hrl rename to test/files/single_use_hrl_attrs/lib/app/include/ignore.hrl diff --git a/priv/test_files/single_use_hrl_attrs/lib/app/src/app.app.src b/test/files/single_use_hrl_attrs/lib/app/src/app.app.src similarity index 100% rename from priv/test_files/single_use_hrl_attrs/lib/app/src/app.app.src rename to test/files/single_use_hrl_attrs/lib/app/src/app.app.src diff --git a/priv/test_files/single_use_hrl_attrs/lib/app/src/app_include.erl b/test/files/single_use_hrl_attrs/lib/app/src/app_include.erl similarity index 100% rename from priv/test_files/single_use_hrl_attrs/lib/app/src/app_include.erl rename to test/files/single_use_hrl_attrs/lib/app/src/app_include.erl diff --git a/priv/test_files/single_use_hrl_attrs/lib/app/src/app_include_lib.erl b/test/files/single_use_hrl_attrs/lib/app/src/app_include_lib.erl similarity index 100% rename from priv/test_files/single_use_hrl_attrs/lib/app/src/app_include_lib.erl rename to test/files/single_use_hrl_attrs/lib/app/src/app_include_lib.erl diff --git a/priv/test_files/single_use_hrl_attrs/lib/app/src/app_other.erl b/test/files/single_use_hrl_attrs/lib/app/src/app_other.erl similarity index 100% rename from priv/test_files/single_use_hrl_attrs/lib/app/src/app_other.erl rename to test/files/single_use_hrl_attrs/lib/app/src/app_other.erl diff --git a/priv/test_files/single_use_hrl_attrs/lib/app/src/ignore.erl b/test/files/single_use_hrl_attrs/lib/app/src/ignore.erl similarity index 100% rename from priv/test_files/single_use_hrl_attrs/lib/app/src/ignore.erl rename to test/files/single_use_hrl_attrs/lib/app/src/ignore.erl diff --git a/priv/test_files/single_use_hrls/include/ignored.hrl b/test/files/single_use_hrls/include/ignored.hrl similarity index 100% rename from priv/test_files/single_use_hrls/include/ignored.hrl rename to test/files/single_use_hrls/include/ignored.hrl diff --git a/priv/test_files/single_use_hrls/include/multi.hrl b/test/files/single_use_hrls/include/multi.hrl similarity index 100% rename from priv/test_files/single_use_hrls/include/multi.hrl rename to test/files/single_use_hrls/include/multi.hrl diff --git a/priv/test_files/single_use_hrls/include/single.hrl b/test/files/single_use_hrls/include/single.hrl similarity index 100% rename from priv/test_files/single_use_hrls/include/single.hrl rename to test/files/single_use_hrls/include/single.hrl diff --git a/priv/test_files/single_use_hrls/include/single_unicode.hrl b/test/files/single_use_hrls/include/single_unicode.hrl similarity index 100% rename from priv/test_files/single_use_hrls/include/single_unicode.hrl rename to test/files/single_use_hrls/include/single_unicode.hrl diff --git a/priv/test_files/single_use_hrls/src/include_ignored.erl b/test/files/single_use_hrls/src/include_ignored.erl similarity index 100% rename from priv/test_files/single_use_hrls/src/include_ignored.erl rename to test/files/single_use_hrls/src/include_ignored.erl diff --git a/priv/test_files/single_use_hrls/src/include_missing.erl b/test/files/single_use_hrls/src/include_missing.erl similarity index 100% rename from priv/test_files/single_use_hrls/src/include_missing.erl rename to test/files/single_use_hrls/src/include_missing.erl diff --git a/priv/test_files/single_use_hrls/src/include_multi.erl b/test/files/single_use_hrls/src/include_multi.erl similarity index 100% rename from priv/test_files/single_use_hrls/src/include_multi.erl rename to test/files/single_use_hrls/src/include_multi.erl diff --git a/priv/test_files/single_use_hrls/src/include_single.erl b/test/files/single_use_hrls/src/include_single.erl similarity index 100% rename from priv/test_files/single_use_hrls/src/include_single.erl rename to test/files/single_use_hrls/src/include_single.erl diff --git "a/priv/test_files/single_use_hrls/src/include_unicode_\303\245\303\266.erl" "b/test/files/single_use_hrls/src/include_unicode_\303\245\303\266.erl" similarity index 100% rename from "priv/test_files/single_use_hrls/src/include_unicode_\303\245\303\266.erl" rename to "test/files/single_use_hrls/src/include_unicode_\303\245\303\266.erl" diff --git a/priv/test_files/test_app/another_sys.config b/test/files/test_app/another_sys.config similarity index 100% rename from priv/test_files/test_app/another_sys.config rename to test/files/test_app/another_sys.config diff --git a/priv/test_files/test_app/elvis.config b/test/files/test_app/elvis.config similarity index 100% rename from priv/test_files/test_app/elvis.config rename to test/files/test_app/elvis.config diff --git a/priv/test_files/test_app/include/a_folder/a_header.hrl b/test/files/test_app/include/a_folder/a_header.hrl similarity index 100% rename from priv/test_files/test_app/include/a_folder/a_header.hrl rename to test/files/test_app/include/a_folder/a_header.hrl diff --git a/priv/test_files/test_app/include/a_header.hrl b/test/files/test_app/include/a_header.hrl similarity index 100% rename from priv/test_files/test_app/include/a_header.hrl rename to test/files/test_app/include/a_header.hrl diff --git a/priv/test_files/test_app/lib/a_project/src/a_folder/a_subfolder/a_module.erl b/test/files/test_app/lib/a_project/src/a_folder/a_subfolder/a_module.erl similarity index 100% rename from priv/test_files/test_app/lib/a_project/src/a_folder/a_subfolder/a_module.erl rename to test/files/test_app/lib/a_project/src/a_folder/a_subfolder/a_module.erl diff --git a/priv/test_files/test_app/one_tuple.config b/test/files/test_app/one_tuple.config similarity index 100% rename from priv/test_files/test_app/one_tuple.config rename to test/files/test_app/one_tuple.config diff --git a/priv/test_files/test_app/rebar.config b/test/files/test_app/rebar.config similarity index 100% rename from priv/test_files/test_app/rebar.config rename to test/files/test_app/rebar.config diff --git a/priv/test_files/test_app/relx.config b/test/files/test_app/relx.config similarity index 100% rename from priv/test_files/test_app/relx.config rename to test/files/test_app/relx.config diff --git a/priv/test_files/test_app/src/a_folder/a_module.erl b/test/files/test_app/src/a_folder/a_module.erl similarity index 100% rename from priv/test_files/test_app/src/a_folder/a_module.erl rename to test/files/test_app/src/a_folder/a_module.erl diff --git a/priv/test_files/test_app/src/a_folder/a_subfolder/a_module.erl b/test/files/test_app/src/a_folder/a_subfolder/a_module.erl similarity index 100% rename from priv/test_files/test_app/src/a_folder/a_subfolder/a_module.erl rename to test/files/test_app/src/a_folder/a_subfolder/a_module.erl diff --git a/priv/test_files/test_app/src/a_module.erl b/test/files/test_app/src/a_module.erl similarity index 100% rename from priv/test_files/test_app/src/a_module.erl rename to test/files/test_app/src/a_module.erl diff --git a/priv/test_files/test_app/src/test_app.app.src b/test/files/test_app/src/test_app.app.src similarity index 100% rename from priv/test_files/test_app/src/test_app.app.src rename to test/files/test_app/src/test_app.app.src diff --git a/priv/test_files/test_app/sys.config b/test/files/test_app/sys.config similarity index 100% rename from priv/test_files/test_app/sys.config rename to test/files/test_app/sys.config diff --git a/priv/test_files/test_app/test/a_folder/a_module.erl b/test/files/test_app/test/a_folder/a_module.erl similarity index 100% rename from priv/test_files/test_app/test/a_folder/a_module.erl rename to test/files/test_app/test/a_folder/a_module.erl diff --git a/priv/test_files/test_app/test/a_module_SUITE.erl b/test/files/test_app/test/a_module_SUITE.erl similarity index 100% rename from priv/test_files/test_app/test/a_module_SUITE.erl rename to test/files/test_app/test/a_module_SUITE.erl diff --git a/priv/test_files/test_app/user.config b/test/files/test_app/user.config similarity index 100% rename from priv/test_files/test_app/user.config rename to test/files/test_app/user.config diff --git a/priv/test_files/test_app/without_warnings/include/a_folder/a_header.hrl b/test/files/test_app/without_warnings/include/a_folder/a_header.hrl similarity index 100% rename from priv/test_files/test_app/without_warnings/include/a_folder/a_header.hrl rename to test/files/test_app/without_warnings/include/a_folder/a_header.hrl diff --git a/priv/test_files/test_app/without_warnings/include/a_header.hrl b/test/files/test_app/without_warnings/include/a_header.hrl similarity index 100% rename from priv/test_files/test_app/without_warnings/include/a_header.hrl rename to test/files/test_app/without_warnings/include/a_header.hrl diff --git a/priv/test_files/test_app/without_warnings/lib/a_project/src/a_folder/a_subfolder/a_module.erl b/test/files/test_app/without_warnings/lib/a_project/src/a_folder/a_subfolder/a_module.erl similarity index 100% rename from priv/test_files/test_app/without_warnings/lib/a_project/src/a_folder/a_subfolder/a_module.erl rename to test/files/test_app/without_warnings/lib/a_project/src/a_folder/a_subfolder/a_module.erl diff --git a/priv/test_files/test_app/without_warnings/lib/a_project/src/a_folder/a_subfolder/another_module.erl b/test/files/test_app/without_warnings/lib/a_project/src/a_folder/a_subfolder/another_module.erl similarity index 100% rename from priv/test_files/test_app/without_warnings/lib/a_project/src/a_folder/a_subfolder/another_module.erl rename to test/files/test_app/without_warnings/lib/a_project/src/a_folder/a_subfolder/another_module.erl diff --git a/priv/test_files/test_app/without_warnings/src/a_folder/a_module.erl b/test/files/test_app/without_warnings/src/a_folder/a_module.erl similarity index 100% rename from priv/test_files/test_app/without_warnings/src/a_folder/a_module.erl rename to test/files/test_app/without_warnings/src/a_folder/a_module.erl diff --git a/priv/test_files/test_app/without_warnings/src/a_folder/a_subfolder/a_module.erl b/test/files/test_app/without_warnings/src/a_folder/a_subfolder/a_module.erl similarity index 100% rename from priv/test_files/test_app/without_warnings/src/a_folder/a_subfolder/a_module.erl rename to test/files/test_app/without_warnings/src/a_folder/a_subfolder/a_module.erl diff --git a/priv/test_files/test_app/without_warnings/src/a_module.erl b/test/files/test_app/without_warnings/src/a_module.erl similarity index 100% rename from priv/test_files/test_app/without_warnings/src/a_module.erl rename to test/files/test_app/without_warnings/src/a_module.erl diff --git a/priv/test_files/test_app/without_warnings/test/a_folder/a_module.erl b/test/files/test_app/without_warnings/test/a_folder/a_module.erl similarity index 100% rename from priv/test_files/test_app/without_warnings/test/a_folder/a_module.erl rename to test/files/test_app/without_warnings/test/a_folder/a_module.erl diff --git a/priv/test_files/test_app/without_warnings/test/a_module_SUITE.erl b/test/files/test_app/without_warnings/test/a_module_SUITE.erl similarity index 100% rename from priv/test_files/test_app/without_warnings/test/a_module_SUITE.erl rename to test/files/test_app/without_warnings/test/a_module_SUITE.erl diff --git a/priv/test_files/unnecessary_function_arguments/clean.erl b/test/files/unnecessary_function_arguments/clean.erl similarity index 100% rename from priv/test_files/unnecessary_function_arguments/clean.erl rename to test/files/unnecessary_function_arguments/clean.erl diff --git a/priv/test_files/unnecessary_function_arguments/ct_SUITE.erl b/test/files/unnecessary_function_arguments/ct_SUITE.erl similarity index 100% rename from priv/test_files/unnecessary_function_arguments/ct_SUITE.erl rename to test/files/unnecessary_function_arguments/ct_SUITE.erl diff --git a/priv/test_files/unnecessary_function_arguments/gen_server_imp.erl b/test/files/unnecessary_function_arguments/gen_server_imp.erl similarity index 100% rename from priv/test_files/unnecessary_function_arguments/gen_server_imp.erl rename to test/files/unnecessary_function_arguments/gen_server_imp.erl diff --git a/priv/test_files/unnecessary_function_arguments/ignore.erl b/test/files/unnecessary_function_arguments/ignore.erl similarity index 100% rename from priv/test_files/unnecessary_function_arguments/ignore.erl rename to test/files/unnecessary_function_arguments/ignore.erl diff --git a/priv/test_files/unnecessary_function_arguments/ignore_config.erl b/test/files/unnecessary_function_arguments/ignore_config.erl similarity index 100% rename from priv/test_files/unnecessary_function_arguments/ignore_config.erl rename to test/files/unnecessary_function_arguments/ignore_config.erl diff --git a/priv/test_files/unnecessary_function_arguments/macros.erl b/test/files/unnecessary_function_arguments/macros.erl similarity index 100% rename from priv/test_files/unnecessary_function_arguments/macros.erl rename to test/files/unnecessary_function_arguments/macros.erl diff --git a/priv/test_files/unnecessary_function_arguments/nifs.erl b/test/files/unnecessary_function_arguments/nifs.erl similarity index 100% rename from priv/test_files/unnecessary_function_arguments/nifs.erl rename to test/files/unnecessary_function_arguments/nifs.erl diff --git a/priv/test_files/unnecessary_function_arguments/old_ct_SUITE.erl b/test/files/unnecessary_function_arguments/old_ct_SUITE.erl similarity index 100% rename from priv/test_files/unnecessary_function_arguments/old_ct_SUITE.erl rename to test/files/unnecessary_function_arguments/old_ct_SUITE.erl diff --git a/priv/test_files/unnecessary_function_arguments/warnings_A.erl b/test/files/unnecessary_function_arguments/warnings_A.erl similarity index 100% rename from priv/test_files/unnecessary_function_arguments/warnings_A.erl rename to test/files/unnecessary_function_arguments/warnings_A.erl diff --git a/priv/test_files/unnecessary_function_arguments/warnings_B.erl b/test/files/unnecessary_function_arguments/warnings_B.erl similarity index 100% rename from priv/test_files/unnecessary_function_arguments/warnings_B.erl rename to test/files/unnecessary_function_arguments/warnings_B.erl diff --git a/priv/test_files/unnecessary_function_arguments/weird.erl b/test/files/unnecessary_function_arguments/weird.erl similarity index 100% rename from priv/test_files/unnecessary_function_arguments/weird.erl rename to test/files/unnecessary_function_arguments/weird.erl diff --git a/priv/test_files/unused_callbacks/clean.erl b/test/files/unused_callbacks/clean.erl similarity index 100% rename from priv/test_files/unused_callbacks/clean.erl rename to test/files/unused_callbacks/clean.erl diff --git a/priv/test_files/unused_callbacks/ignore.erl b/test/files/unused_callbacks/ignore.erl similarity index 100% rename from priv/test_files/unused_callbacks/ignore.erl rename to test/files/unused_callbacks/ignore.erl diff --git a/priv/test_files/unused_callbacks/ignore_config.erl b/test/files/unused_callbacks/ignore_config.erl similarity index 100% rename from priv/test_files/unused_callbacks/ignore_config.erl rename to test/files/unused_callbacks/ignore_config.erl diff --git a/priv/test_files/unused_callbacks/macros.erl b/test/files/unused_callbacks/macros.erl similarity index 100% rename from priv/test_files/unused_callbacks/macros.erl rename to test/files/unused_callbacks/macros.erl diff --git a/priv/test_files/unused_callbacks/warnings.erl b/test/files/unused_callbacks/warnings.erl similarity index 100% rename from priv/test_files/unused_callbacks/warnings.erl rename to test/files/unused_callbacks/warnings.erl diff --git a/priv/test_files/unused_hrls/lib/app0-with-other-name/include/header.hrl b/test/files/unused_hrls/lib/app0-with-other-name/include/header.hrl similarity index 100% rename from priv/test_files/unused_hrls/lib/app0-with-other-name/include/header.hrl rename to test/files/unused_hrls/lib/app0-with-other-name/include/header.hrl diff --git a/priv/test_files/unused_hrls/lib/app0-with-other-name/src/app0.app.src b/test/files/unused_hrls/lib/app0-with-other-name/src/app0.app.src similarity index 100% rename from priv/test_files/unused_hrls/lib/app0-with-other-name/src/app0.app.src rename to test/files/unused_hrls/lib/app0-with-other-name/src/app0.app.src diff --git a/priv/test_files/unused_hrls/lib/app1/include/header.hrl b/test/files/unused_hrls/lib/app1/include/header.hrl similarity index 100% rename from priv/test_files/unused_hrls/lib/app1/include/header.hrl rename to test/files/unused_hrls/lib/app1/include/header.hrl diff --git a/priv/test_files/unused_hrls/lib/app1/src/app1.app.src b/test/files/unused_hrls/lib/app1/src/app1.app.src similarity index 100% rename from priv/test_files/unused_hrls/lib/app1/src/app1.app.src rename to test/files/unused_hrls/lib/app1/src/app1.app.src diff --git a/priv/test_files/unused_hrls/lib/app1/src/app1_include.erl b/test/files/unused_hrls/lib/app1/src/app1_include.erl similarity index 100% rename from priv/test_files/unused_hrls/lib/app1/src/app1_include.erl rename to test/files/unused_hrls/lib/app1/src/app1_include.erl diff --git a/priv/test_files/unused_hrls/lib/app1/src/app1_include_lib.erl b/test/files/unused_hrls/lib/app1/src/app1_include_lib.erl similarity index 100% rename from priv/test_files/unused_hrls/lib/app1/src/app1_include_lib.erl rename to test/files/unused_hrls/lib/app1/src/app1_include_lib.erl diff --git a/priv/test_files/unused_hrls/lib/app1/src/app1_not_using_header.erl b/test/files/unused_hrls/lib/app1/src/app1_not_using_header.erl similarity index 100% rename from priv/test_files/unused_hrls/lib/app1/src/app1_not_using_header.erl rename to test/files/unused_hrls/lib/app1/src/app1_not_using_header.erl diff --git a/priv/test_files/unused_hrls/lib/app2/src/app2.app.src b/test/files/unused_hrls/lib/app2/src/app2.app.src similarity index 100% rename from priv/test_files/unused_hrls/lib/app2/src/app2.app.src rename to test/files/unused_hrls/lib/app2/src/app2.app.src diff --git a/priv/test_files/unused_hrls/lib/app2/src/app2_include.erl b/test/files/unused_hrls/lib/app2/src/app2_include.erl similarity index 100% rename from priv/test_files/unused_hrls/lib/app2/src/app2_include.erl rename to test/files/unused_hrls/lib/app2/src/app2_include.erl diff --git a/priv/test_files/unused_hrls/lib/app2/src/app2_include_lib.erl b/test/files/unused_hrls/lib/app2/src/app2_include_lib.erl similarity index 100% rename from priv/test_files/unused_hrls/lib/app2/src/app2_include_lib.erl rename to test/files/unused_hrls/lib/app2/src/app2_include_lib.erl diff --git a/priv/test_files/unused_hrls/lib/app2/src/app2_not_using_header.erl b/test/files/unused_hrls/lib/app2/src/app2_not_using_header.erl similarity index 100% rename from priv/test_files/unused_hrls/lib/app2/src/app2_not_using_header.erl rename to test/files/unused_hrls/lib/app2/src/app2_not_using_header.erl diff --git a/priv/test_files/unused_macros/double.erl b/test/files/unused_macros/double.erl similarity index 100% rename from priv/test_files/unused_macros/double.erl rename to test/files/unused_macros/double.erl diff --git a/priv/test_files/unused_macros/header.hrl b/test/files/unused_macros/header.hrl similarity index 100% rename from priv/test_files/unused_macros/header.hrl rename to test/files/unused_macros/header.hrl diff --git a/priv/test_files/unused_macros/ignore.erl b/test/files/unused_macros/ignore.erl similarity index 100% rename from priv/test_files/unused_macros/ignore.erl rename to test/files/unused_macros/ignore.erl diff --git a/priv/test_files/unused_macros/ignore_config.erl b/test/files/unused_macros/ignore_config.erl similarity index 100% rename from priv/test_files/unused_macros/ignore_config.erl rename to test/files/unused_macros/ignore_config.erl diff --git a/priv/test_files/unused_macros/unused_macro_sample.erl b/test/files/unused_macros/unused_macro_sample.erl similarity index 100% rename from priv/test_files/unused_macros/unused_macro_sample.erl rename to test/files/unused_macros/unused_macro_sample.erl diff --git a/priv/test_files/unused_macros/used_macro_sample.erl b/test/files/unused_macros/used_macro_sample.erl similarity index 100% rename from priv/test_files/unused_macros/used_macro_sample.erl rename to test/files/unused_macros/used_macro_sample.erl diff --git a/priv/test_files/unused_record_fields/header.hrl b/test/files/unused_record_fields/header.hrl similarity index 100% rename from priv/test_files/unused_record_fields/header.hrl rename to test/files/unused_record_fields/header.hrl diff --git a/priv/test_files/unused_record_fields/ignore.erl b/test/files/unused_record_fields/ignore.erl similarity index 100% rename from priv/test_files/unused_record_fields/ignore.erl rename to test/files/unused_record_fields/ignore.erl diff --git a/priv/test_files/unused_record_fields/ignore_config.erl b/test/files/unused_record_fields/ignore_config.erl similarity index 100% rename from priv/test_files/unused_record_fields/ignore_config.erl rename to test/files/unused_record_fields/ignore_config.erl diff --git a/priv/test_files/unused_record_fields/macros.erl b/test/files/unused_record_fields/macros.erl similarity index 100% rename from priv/test_files/unused_record_fields/macros.erl rename to test/files/unused_record_fields/macros.erl diff --git a/priv/test_files/unused_record_fields/unused_record_field_sample.erl b/test/files/unused_record_fields/unused_record_field_sample.erl similarity index 100% rename from priv/test_files/unused_record_fields/unused_record_field_sample.erl rename to test/files/unused_record_fields/unused_record_field_sample.erl diff --git a/priv/test_files/unused_record_fields/used_record_field_sample.erl b/test/files/unused_record_fields/used_record_field_sample.erl similarity index 100% rename from priv/test_files/unused_record_fields/used_record_field_sample.erl rename to test/files/unused_record_fields/used_record_field_sample.erl diff --git a/test/hank_test_utils.erl b/test/hank_test_utils.erl index 19126d1..5b116c2 100644 --- a/test/hank_test_utils.erl +++ b/test/hank_test_utils.erl @@ -56,4 +56,4 @@ set_cwd(RelativePathOrFilename) -> abs_test_path(FilePath) -> filename:join( - code:priv_dir(rebar3_hank), "test_files/" ++ FilePath). + code:lib_dir(rebar3_hank), "test/files/" ++ FilePath). diff --git a/test/unused_hrls_SUITE.erl b/test/unused_hrls_SUITE.erl index 3cf739f..5044ca2 100644 --- a/test/unused_hrls_SUITE.erl +++ b/test/unused_hrls_SUITE.erl @@ -55,7 +55,7 @@ local_include(_) -> ok = file:set_cwd( filename:join( - code:priv_dir(rebar3_hank), "test_files/unused_hrls/lib/app1")), + code:lib_dir(rebar3_hank), "test/files/unused_hrls/lib/app1")), OnlyApp1 = ["include/header.hrl", "src/app1_not_using_header.erl", "src/app1_include.erl"], [] = analyze(OnlyApp1),