Skip to main content

W0054 - Do not suppress compiler warnings at module level

Warning

-module(example).

-compile([
nowarn_shadow_vars,
%% ^^^^^^^^^^^^^^^^^^ 💡 warning: Do not suppress compiler warnings at module level.
nowarn_unused_vars
%% ^^^^^^^^^^^^^^^^^^ 💡 warning: Do not suppress compiler warnings at module level.
]).

This diagnostic is triggered when a -compile attribute is used to suppress compiler warnings with nowarn_* options.

Warning suppressions prevent the compiler from reporting issues that could indicate problems in your code. Many of these warnings are indicating serious problems that should be fixed rather than suppressed.

By addressing these issues directly rather than suppressing warnings, you'll have a more maintainable codebase.