Skip to content

IDL Problem Code 61 with alias docs-return-invalid

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 problem indicates that the :Return: tag in documentation specifies too much information about what gets returned.

For IDL for VSCode, we expect that :Returns: only captured the data type that should be returned.

Here's an example that produces this error:

idl
;+
; :Returns: Number
;   My favorite number
;
;-
function myfunc
  compile_opt idl2
  return, 42
end

To fix it, remove the extra information or re-organize your docs:

idl
;+
; :Returns: Number
;-
function myfunc
  compile_opt idl2
  return, 42
end
idl
;+
; :Description:
;   Returns my favorite number
;
; :Returns: Number
;
;-
function myfunc
  compile_opt idl2
  return, 42
end

Licensed under MIT.