aboutsummaryrefslogtreecommitdiff
path: root/src/build_settings.cpp
diff options
context:
space:
mode:
authorJeroen van Rijn <Kelimion@users.noreply.github.com>2026-02-13 15:15:03 +0100
committerJeroen van Rijn <Kelimion@users.noreply.github.com>2026-02-13 15:15:03 +0100
commit6386b395de7e0e537e092601ff0ac4d353806ebb (patch)
tree80d44c794e9a4d13dedc2479db832e4f7eb1bb0f /src/build_settings.cpp
parentf7f19e5ebe45547732c2af39aa7f71feefd76f72 (diff)
Add `-did-you-mean-limit:N`
``` -did-you-mean-limit:<integer> Sets the maximum number of suggestions the compiler provides. Must be an integer >0. If not set, the default limit is 10. ``` e.g. with a limit of 5 ``` W:/Scratch/main.odin(44:7) Error: Undeclared name 'B1' for type 'E' e = .B1 ^^ Suggestion: Did you mean? A23 A02 A19 A20 A21 ... and 25 more ... ```
Diffstat (limited to 'src/build_settings.cpp')
-rw-r--r--src/build_settings.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/build_settings.cpp b/src/build_settings.cpp
index 40c1c86c4..f46b7d247 100644
--- a/src/build_settings.cpp
+++ b/src/build_settings.cpp
@@ -9,6 +9,7 @@
// #endif
#define DEFAULT_MAX_ERROR_COLLECTOR_COUNT (36)
+#define DEFAULT_DID_YOU_MEAN_LIMIT (10)
enum TargetOsKind : u16 {
TargetOs_Invalid,
@@ -581,6 +582,8 @@ struct BuildContext {
bool show_debug_messages;
+ int did_you_mean_limit;
+
bool copy_file_contents;
bool no_rtti;