You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

142 lines
4.2 KiB

  1. %% -*- mode: erlang;erlang-indent-level: 4;indent-tabs-mode: nil -*-
  2. %% ex: ts=4 sw=4 ft=erlang et
  3. %% This is a sample rebar.conf file that shows examples of some of rebar's
  4. %% options.
  5. %% == Erlang Compiler ==
  6. %% Erlang files to compile before the rest. Rebar automatically compiles
  7. %% parse_transforms and custom behaviours before anything other than the files
  8. %% in this list.
  9. {erl_first_files, ["src/mymib1.erl", "src/mymib2.erl"]}.
  10. %% Erlang compiler options
  11. {erl_opts, [no_debug_info,
  12. {i, "myinclude"},
  13. {src_dirs, ["src", "src2", "src3"]},
  14. {platform_define,
  15. "(linux|solaris|freebsd|darwin)", 'HAVE_SENDFILE'},
  16. {platform_define, "(linux|freebsd)", 'BACKLOG', 128},
  17. {platform_define, "R13", 'old_inets'}]}.
  18. %% MIB Options?
  19. {mib_opts, []}.
  20. %% SNMP mibs to compile first?
  21. {mib_first_files, []}.
  22. %% leex options
  23. {xrl_opts, []}.
  24. %% leex files to compile first
  25. {xrl_first_files, []}.
  26. %% yecc options
  27. {yrl_opts, []}.
  28. %% yecc files to compile first
  29. {yrl_first_files, []}.
  30. %% == EDoc ==
  31. %% EDoc options
  32. {edoc_opts, []}.
  33. %% == escriptize ==
  34. {escript_name, "application"}.
  35. {escript_incl_apps, []}.
  36. {escript_shebang, "#!/usr/bin/env escript\n"}.
  37. {escript_comment, "%%\n"}.
  38. {escript_emu_args, "%%! -pa application/application/ebin\n"}.
  39. %% == ErlyDTL Compiler ==
  40. %% Options for the ErlyDTL compiler
  41. {erlydtl_opts, []}.
  42. %% == EUnit ==
  43. %% Options for eunit:test()
  44. {eunit_opts, []}.
  45. %% Additional compile options for eunit. erl_opts is also used
  46. {eunit_compile_opts, []}.
  47. %% Files to compile first when compiling eunit test suites
  48. {eunit_first_files, []}.
  49. %% == Common Test ==
  50. %% Options to pass to ct:run_test/1
  51. {ct_opts, [{logdir, "logs"}, {dir, "test"}]}.
  52. %% Additional compile options for ct. erl_opts is also used
  53. {ct_compile_opts, []}.
  54. %% Files to compile first when compiling ct test suites
  55. {ct_first_files, []}.
  56. %% == Cover ==
  57. %% Whether to enable coverage reporting. Default is `false'
  58. {cover_enabled, false}.
  59. %% Whether to print coverage report to console. Default is `false'
  60. {cover_print_enabled, false}.
  61. %% Directory to store collected cover data
  62. {cover_data_dir, "cover"}.
  63. %% What dependencies we have, dependencies can be of 3 forms, an application
  64. %% name as an atom, eg. mochiweb, a name and a version (from the .app file), or
  65. %% an application name, a version and the SCM details on how to fetch it (SCM
  66. %% type, location and revision).
  67. %% Rebar3 currently supports git and hg
  68. {deps, [app_name,
  69. {rebar, "1.0.*"},
  70. {rebar, ".*",
  71. {git, "git://github.com/rebar/rebar.git"}},
  72. {rebar, ".*",
  73. {git, "git://github.com/rebar/rebar.git", "Rev"}},
  74. {rebar, "1.0.*",
  75. {git, "git://github.com/rebar/rebar.git", {branch, "master"}}},
  76. {rebar, "1.0.0",
  77. {git, "git://github.com/rebar/rebar.git", {tag, "1.0.0"}}},
  78. {rebar, ".*",
  79. {git, "git://github.com/rebar/rebar.git", {ref, "7f73b8d3650b41ffd53a199f3eda20985eda84e3"}}},
  80. {app_name, ".*", {hg, "https://www.example.org/url"}}]}.
  81. %% == Pre/Post Command Hooks ==
  82. {pre_hooks, [{clean, "./prepare_package_files.sh"},
  83. {"linux", compile, "c_src/build_linux.sh"},
  84. {compile, "escript generate_headers"},
  85. {compile, "escript check_headers"}]}.
  86. {post_hooks, [{clean, "touch file1.out"},
  87. {"freebsd", compile, "c_src/freebsd_tweaks.sh"},
  88. {eunit, "touch file2.out"},
  89. {compile, "touch postcompile.out"}]}.
  90. %% == xref ==
  91. {xref_warnings, false}.
  92. %% optional extra paths to include in xref:set_library_path/2.
  93. %% specified relative location of rebar.config.
  94. %% e.g. {xref_extra_paths,["../gtknode/src"]}
  95. {xref_extra_paths,[]}.
  96. %% xref checks to run
  97. {xref_checks, [undefined_function_calls, undefined_functions,
  98. locals_not_used, exports_not_used,
  99. deprecated_function_calls, deprecated_functions]}.
  100. %% Optional custom xref queries (xref manual has details) specified as
  101. %% {xref_queries, [{query_string(), expected_query_result()},...]}
  102. %% The following for example removes all references to mod:*foo/4
  103. %% functions from undefined external function calls as those are in a
  104. %% generated module
  105. {xref_queries,
  106. [{"(XC - UC) || (XU - X - B"
  107. " - (\"mod\":\".*foo\"/\"4\"))",[]}]}.