All 'opinionated' errors in the suite have an associated configuration option to redefine their Severity or to disable them completely.
Errors that would fail to compile in the DM compiler or will always cause a runtime cannot be disabled (eg: bad keyword arguments).
As of writing, all front ends have the functionality to accept a configuration file. They default to using SpacemanDMM.toml
located in the same directory as the .dme
file.
All of these options can be set to the following:
error
,errors
- Severity::Errorwarning
,warnings
- Severity::Warninginfo
,infos
- Severity::Infohint
,hints
- Severity::Hintdisabled
,false
,off
- Disables it completelyunset
, not present in the config file - Uses the default
The [diagnostics]
section has the following options:
Raised by DreamChecker:
disabled_directive
- Raised when attempting to disable aset SpacemanDMM_*
directive that cannot be disabledsets_directive_twice
- Raised when a directive is set twice in the same procinvalid_lint_directive_value
- Raised when attempting to set a directive value to something other than1
,0
,TRUE
,FALSE
invalid_set_value
- Raised on invalid values used with builtin set directivesunknown_linter_setting
- Raised when setting aSpacemanDMM_*
directive that DreamChecker doesn't implementoverride_missing_keyword_arg
- Raised when proc overrides are missing keyword argumentsmust_not_override
-SpacemanDMM_should_not_override
directivemust_call_parent
-SpacemanDMM_should_call_parent
directivefinal_var
-SpacemanDMM_final
var typeprivate_proc
-SpacemanDMM_private_proc
directiveprotected_proc
-SpacemanDMM_protected_proc
directiveprivate_var
-SpacemanDMM_private
var typeprotected_var
-SpacemanDMM_protected
var typemust_be_pure
-SpacemanDMM_should_be_pure
directivemust_not_sleep
-SpacemanDMM_should_not_sleep
directiveredefined_proc
-SpacemanDMM_can_be_redefined
directiveambiguous_in_lhs
- Raised on ambiguous operations on the left hand side of anin
operationambiguous_not_bitwise
- Raised on an ambiguous!
on the left hand side of a bitwise operationno_typehint_implicit_new
- Raised on the use ofnew
where no typehint is avaliablefield_access_static_type
- Raised on using.field_name
on a variable with no typehintproc_call_static_type
- Raised on using.proc_name()
on a variable with no typehintproc_has_no_parent
- Raised on calling..()
in a proc with no parent.no_operator_overload
- Raised on using a unary operator on a non-primative that doesn't define it's own override, egsomemob++
unreachable_code
- Raised on finding code that can never be executedcontrol_condition_static
- Raised on a control condition such asif
/while
having a static condition such as1
or"string"
if_condition_determinate
- Raised on if condition being always true or always falseloop_condition_determinate
- Raised on loop condition such as infor
being always true or always false
Raised by Lexer:
integer_precision_loss
- Raised where an integer is out of integer range and is implicitly formatted as a float
Raised by Parser:
var_in_proc_parameter
- Raised wherevar/
is used in proc argumentsstatic_in_proc_parameter
- Raised wherestatic/
is used in proc argumentssemicolon_in_proc_parameter
- Raised where;
is used in proc argumentsin_precedes_as
- Raised whereinput()
calls are usingas
afterin
which DM silently ignorestmp_no_effect
- Raised where local vars are defined astmp
which has no effectfinal_no_effect
- Raised where local vars are defined asSpacemanDMM_final
which has no effectas_local_var
- Raised where local vars are defined using theas Foo
syntax which has no effect
Raised by PreProcessor:
duplicate_include
- Raised where the same file is included twicemacro_redefined
- Raised where a macro is defined a second timemacro_undefined_no_definition
- Raised where a macro is undefined where no such macro is defined
Raised by Object Tree:
override_precedes_definition
- Raised where a proc is overridden prior to its definition in the include order, see: http://www.byond.com/forum/post/2441385
The [display]
section has the following options:
error_level
- Sets the level at which errors are registered instead of being ignored
The [langserver]
section has the following options:
dreamchecker
- Set totrue
to run dreamchecker within the language server.
These are extremely opinionated lint warnings and as such default to disabled
The [code_standards]
section has the following options:
disallow_relative_proc_definitions
- Raised on relative pathed proc definitionsdisallow_relative_type_definitions
- Raised on relative pathed subtype defintions
The [dmdoc]
section has the following options:
use_typepath_names
- Set totrue
to have dmdoc use the true typepath name instead of the value of thename
var for types
[display]
error_level = "hint"
[langserver]
dreamchecker = true
[diagnostics]
duplicate_include = "error"
macro_redefined = "off"