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

Fix config test #830

Merged
merged 3 commits into from Nov 9, 2022
Merged

Fix config test #830

merged 3 commits into from Nov 9, 2022

Conversation

ryuichi1208
Copy link
Member

@ryuichi1208 ryuichi1208 commented Nov 5, 2022

refs: #829

# befor
[WARNING] plugin.metrics.aaa.action.max_check_attempts is unexpected key. did you mean plugin.metrics.aaa.action.max_check_attempts ?

# after
[WARNING] plugin.metrics.aaa.action.max_check_attempts is unexpected key.

@Arthur1 Arthur1 self-requested a review November 7, 2022 06:32
Copy link
Member

@Arthur1 Arthur1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ryuichi1208

Thank you for your pull request! We merge this and release it, as this simple diff would resolve the issue #829 .

By the way, we are aware of the problem that the entire logic of key suggestion is complex. Please note that we may change the code around this in the near future.

@@ -55,7 +56,9 @@ func nameSuggestion(given string, candidates []string) string {
for _, candidate := range candidates {
dist := levenshtein.Distance(given, candidate, nil)
if dist < 3 {
return candidate
if candidate != given {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nit] The comparison candidate != given could be described succinctly using the Levenshtein distance.

@Arthur1 Arthur1 merged commit c13184b into mackerelio:master Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants