quil-lang / quilc

The optimizing Quil compiler.
Apache License 2.0
452 stars 73 forks source link

Check that exported symbols have documentation #566

Open stylewarning opened 4 years ago

stylewarning commented 4 years ago

(Same with QVM and MAGICL.)

stylewarning commented 4 years ago

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

notmgsk commented 4 years ago

A new system?

Something like a linter would be cool.

stylewarning commented 4 years ago

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

jmbr commented 4 years ago

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

rigettizach commented 4 years ago

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:

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

Undefined external symbols

Function

Undefined external symbols

Constant

Function

Generic-Function

Method

Structure

stylewarning commented 4 years ago

@rigettizach Cool!