version 1.20, 2019/04/20 17:43:24 |
version 1.21, 2019/04/23 21:20:49 |
Line 897 func (s *Suite) Test_Autofix_Anyway__aut |
|
Line 897 func (s *Suite) Test_Autofix_Anyway__aut |
|
fix.Anyway() |
fix.Anyway() |
fix.Apply() |
fix.Apply() |
|
|
// The replacement text is not found, therefore the note should not be logged. |
// The text to be replaced is not found. Because nothing is fixed here, |
// Because of fix.Anyway, the note should be logged anyway. |
// there's no need to log anything. |
// But because of the --autofix option, the note should not be logged. |
// |
// Even if the --show-autofix option is explicitly given, the note should not be logged. |
// But fix.Anyway is set, therefore the diagnostic should be logged even |
// Therefore, in the end nothing is shown in this case. |
// though it cannot be fixed automatically. This comes handy in situations |
|
// where simple cases can be fixed automatically and more complex cases |
|
// (often involving special characters that need to be escaped properly) |
|
// should nevertheless result in a diagnostics. |
|
// |
|
// The --autofix option is set, which means that the diagnostics don't |
|
// get logged, only the actual fixes do. |
|
// |
|
// But then there's also the --show-autofix option, which logs the |
|
// corresponding diagnostic for each autofix that actually changes |
|
// something. But this autofix doesn't change anything, therefore even |
|
// the --show-autofix doesn't have an effect. |
|
// |
|
// Therefore, in the end nothing is logged in this case. |
t.CheckOutputEmpty() |
t.CheckOutputEmpty() |
} |
} |
|
|