Skip to content

IDL Problem Code 51 with alias no-kws-to-doc

Want to disable me? Check out the configuration guide to learn more.

Documentation Best Practice

This problem indicates that there's an opportunity to improve the documentation for your code.

This helps make sure the extension can properly detect types, provide a better user experience, and ensures other users can be successful with code that you write.

Want to automate documentation generation? Learn about comment style and AutoDoc here.

This error occurs when you have keywords in your documentation, but there are no keywords for the routine definition.

Here's an example that produces this error:

idl
;+
; :Returns: Number
;
; :Keywords:
;   kw1: bidirectional, optional, any
;     Placeholder docs for argument, keyword, or property
;
;-
function myfunc
  compile_opt idl2
  return, 42
end

To fix it, either remove the comments or add the keyword to the code.

idl
;+
; :Returns: Number
;
; :Keywords:
;   kw1: bidirectional, optional, any
;     Placeholder docs for argument, keyword, or property
;
;-
function myfunc, kw1 = kw1
  compile_opt idl2
  return, 42
end
idl
;+
; :Returns: Number
;-
function myfunc
  compile_opt idl2
  return, 42
end

Licensed under MIT.