@@ -198,14 +198,14 @@ fn main() -> std::io::Result<()> {
198198 diagnostics_writer. write (
199199 diagnostics_writer
200200 . message (
201- "character-encoding -error" ,
202- "Character encoding error" ,
201+ "character-decoding -error" ,
202+ "Character decoding error" ,
203203 )
204+ . file ( & path. to_string_lossy ( ) )
204205 . text ( & format ! (
205- "{}: character decoding failure: {} ({}) " ,
206- & path . to_string_lossy ( ) ,
206+ "could not decode the file contents as '{}': {} " ,
207+ & encoding_name ,
207208 msg,
208- & encoding_name
209209 ) )
210210 . status_page ( )
211211 . severity ( diagnostics:: Severity :: Warning ) ,
@@ -216,13 +216,14 @@ fn main() -> std::io::Result<()> {
216216 } else {
217217 diagnostics_writer. write (
218218 diagnostics_writer
219- . message ( "character-encoding-error" , "Character encoding error" )
219+ . message ( "unknown-character-encoding" , "Unknown character encoding" )
220+ . file ( & path. to_string_lossy ( ) )
220221 . text ( & format ! (
221- "{}: unknown character encoding: '{}'" ,
222- & path. to_string_lossy( ) ,
222+ "unknown character encoding '{}' in '#encoding:' directive." ,
223223 & encoding_name
224224 ) )
225225 . status_page ( )
226+ . help_link ( "https://docs.ruby-lang.org/en/3.2/syntax/comments_rdoc.html#label-encoding+Directive" )
226227 . severity ( diagnostics:: Severity :: Warning ) ,
227228 ) ;
228229 }
0 commit comments