quilc icon indicating copy to clipboard operation
quilc copied to clipboard

Check that exported symbols have documentation

Open stylewarning opened this issue 5 years ago • 6 comments
trafficstars

(Same with QVM and MAGICL.)

stylewarning avatar Jan 25 '20 00:01 stylewarning

(I think we should make a new system for this.)

stylewarning avatar Jan 25 '20 00:01 stylewarning

A new system?

Something like a linter would be cool.

notmgsk avatar Jan 25 '20 22:01 notmgsk

See also: https://github.com/rigetti/quilc/issues/40

stylewarning avatar Jan 30 '20 23:01 stylewarning

I'm still advocating for a Rigetti-specific version of the lisp-critic.

jmbr avatar Jan 31 '20 00:01 jmbr

I wrote a new program to dig up this kind of info. Here's a report it can produce, with additional remarks added manually in italics.

Many of these are easy fixes. Two exceptions stand out:

  • adt:defdata generates new constants and structures, and needs an update to attach documentation to those
  • the protocol-less <class>-<slot> accessors need documented protocols, with defgenerics

A final issue to consider: sometimes external symbols are just syntax, and do not have a natural place to hang documentation. Consider it in anaphoric libraries, or otherwise in CL. It would take some extra thought to exclude them from a report on problematic symbols.

The report:

cl-quil

Class

Compiler-Macro

Constant

These are self-evident, to me, but a missing docstring is a missing docstring.

These arise from adt:defdata.

Function

Macro

Method

These generally arise from class-slot style of working with classes, rather than protocol-oriented style.

Structure

These are all due to adt:defdata.

Type

cl-quil.resource

Undefined external symbols

Function

cl-quil.clifford

Undefined external symbols

Constant

Function

Generic-Function

Method

Structure

rigettizach avatar Feb 12 '20 20:02 rigettizach

@rigettizach Cool!

stylewarning avatar Feb 18 '20 21:02 stylewarning