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

Add core:warnings_as_errors conf docs #3484

Merged
merged 7 commits into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from 2 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
1 change: 1 addition & 0 deletions reference/commands/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ Displays all the Conan built-in configurations. There are 2 groups:
core:non_interactive: Disable interactive user input, raises error if input necessary
core:required_conan_version: Raise if current version does not match the defined range.
core:skip_warnings: Do not show warnings in this list
core:warnings_as_errors: Treat warnings as errors
AbrilRBS marked this conversation as resolved.
Show resolved Hide resolved
tools.android:cmake_legacy_toolchain: Define to explicitly pass ANDROID_USE_LEGACY_TOOLCHAIN_FILE in CMake toolchain
tools.android:ndk_path: Argument for the CMAKE_ANDROID_NDK
tools.apple:enable_arc: (boolean) Enable/Disable ARC Apple Clang flags
Expand Down
4 changes: 4 additions & 0 deletions reference/conanfile/running_and_output.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ so running with ``-vwarning` will output calls to ``warning()`` and ``error()``,

Note that these methods return the output object again, so that you can chain output calls if needed.

Using the ``core:warnings_as_errors`` conf, you can make Conan raise an exception when either a warning or error is printed.
AbrilRBS marked this conversation as resolved.
Show resolved Hide resolved
This is useful to make sure that recipes are not printing unexpected warnings or errors.
Additionally, you can skip which warnings trigger an exception :ref:`with the *core:skip_warnings* conf<reference_config_files_global_conf_skip_warnings>`.
AbrilRBS marked this conversation as resolved.
Show resolved Hide resolved


.. _reference_conanfile_run:

Expand Down
4 changes: 4 additions & 0 deletions reference/config_files/global_conf.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ To list all the possible configurations available, run :command:`conan config li
core:non_interactive: Disable interactive user input, raises error if input necessary
core:required_conan_version: Raise if current version does not match the defined range.
core:skip_warnings: Do not show warnings in this list
core:warnings_as_errors: Treat warnings as errors
tools.android:cmake_legacy_toolchain: Define to explicitly pass ANDROID_USE_LEGACY_TOOLCHAIN_FILE in CMake toolchain
tools.android:ndk_path: Argument for the CMAKE_ANDROID_NDK
tools.apple:enable_arc: (boolean) Enable/Disable ARC Apple Clang flags
Expand Down Expand Up @@ -307,6 +308,8 @@ For instance:
UX confs
--------

.. _reference_config_files_global_conf_skip_warnings:

Skip warnings
~~~~~~~~~~~~~

Expand All @@ -316,3 +319,4 @@ by adding the warning tag to its value.
Those warnings are:

- ``deprecated``: Messages for deprecated features such as legacy generators
- ``network``: Messages related to network issues, such as retries