The org.melusina.atelier Reference Manual

This is the org.melusina.atelier Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Feb 26 14:58:36 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 org.melusina.atelier

An atelier for Lisp developers

Author

Michaël Le Barbier

Dependencies
  • alexandria (system).
  • cl-ppcre (system).
  • org.melusina.rashell (system).
  • osicat (system).
  • trivia (system).
Source

org.melusina.atelier.asd.

Child Component

src (module).


3 Modules

Modules are listed depth-first from the system components tree.


3.1 org.melusina.atelier/src

Source

org.melusina.atelier.asd.

Parent Component

org.melusina.atelier (system).

Child Components

3.2 org.melusina.atelier/src/inspector

Source

org.melusina.atelier.asd.

Parent Component

src (module).

Child Components

4 Files

Files are sorted by type and then listed depth-first from the systems components trees.


4.1 Lisp


4.1.1 org.melusina.atelier/org.melusina.atelier.asd

Source

org.melusina.atelier.asd.

Parent Component

org.melusina.atelier (system).

ASDF Systems

org.melusina.atelier.


4.1.2 org.melusina.atelier/src/package.lisp

Source

org.melusina.atelier.asd.

Parent Component

src (module).

Packages

org.melusina.atelier.


4.1.3 org.melusina.atelier/src/utilities.lisp

Source

org.melusina.atelier.asd.

Parent Component

src (module).

Internals

4.1.4 org.melusina.atelier/src/configuration.lisp

Source

org.melusina.atelier.asd.

Parent Component

src (module).

Internals

*resourcedir* (special variable).


4.1.5 org.melusina.atelier/src/license.lisp

Source

org.melusina.atelier.asd.

Parent Component

src (module).

Public Interface

list-licenses (function).

Internals

4.1.6 org.melusina.atelier/src/parameter.lisp

Source

org.melusina.atelier.asd.

Parent Component

src (module).

Public Interface
Internals

4.1.7 org.melusina.atelier/src/template.lisp

Source

org.melusina.atelier.asd.

Parent Component

src (module).

Public Interface
Internals

4.1.8 org.melusina.atelier/src/lint.lisp

Source

org.melusina.atelier.asd.

Parent Component

src (module).

Public Interface
Internals

4.1.9 org.melusina.atelier/src/inspector/codestyle-0001.lisp

Source

org.melusina.atelier.asd.

Parent Component

inspector (module).

Internals

hint-at-file-when-character-encoding-is-not-utf8 (function).


4.1.10 org.melusina.atelier/src/inspector/codestyle-0002.lisp

Source

org.melusina.atelier.asd.

Parent Component

inspector (module).

Internals

hint-at-file-line-when-it-is-very-long (function).


4.1.11 org.melusina.atelier/src/inspector/codestyle-0003.lisp

Source

org.melusina.atelier.asd.

Parent Component

inspector (module).

Internals

4.1.12 org.melusina.atelier/src/inspector/codestyle-0004.lisp

Source

org.melusina.atelier.asd.

Parent Component

inspector (module).

Internals

hint-at-file-when-it-lacks-canonical-footer-line (function).


4.1.13 org.melusina.atelier/src/inspector/codestyle-0005.lisp

Source

org.melusina.atelier.asd.

Parent Component

inspector (module).

Internals

hint-at-file-when-it-lacks-canonical-project-identification (function).


4.1.14 org.melusina.atelier/src/inspector/codestyle-0006.lisp

Source

org.melusina.atelier.asd.

Parent Component

inspector (module).

Internals

hint-at-file-when-it-lacks-project-license-information (function).


4.1.15 org.melusina.atelier/src/main.lisp

Source

org.melusina.atelier.asd.

Parent Component

src (module).

Public Interface

initialize (function).


5 Packages

Packages are listed by definition order.


5.1 org.melusina.atelier

Source

package.lisp.

Use List

common-lisp.

Public Interface
Internals

6 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


6.1 Public Interface


6.1.1 Special variables

Special Variable: *linter-interactive-p*

Flag governing the interactive mode of the linter.
When the flag is a generalised boolean, the linter interactions are enabled otherwise they are disabled.

When linter interactions are enabled, the system gives the operator the chance to accept corrections guessed by the automatic correction system, if any. Should the operator not take this chance, the anomaly is recorded into the linter report.

When the flag is NIL, anomalies are always recorded into the linter report and the linter is exiting the program when done.

The default value of the parameter is based on the :SWANK feature.

Package

org.melusina.atelier.

Source

lint.lisp.

Special Variable: *parameter-bindings*

An aliast providing text replacement for various parameters.

Package

org.melusina.atelier.

Source

parameter.lisp.


6.1.2 Macros

Macro: define-inspector (code name lambda-list &body body)

Define inspector NAME emitting hint codes CODE.
The inspector NAME is a function with the given LAMBDA-LIST and BODY. The inspector is called with a PATHNAME when it is a file inspector, with a file CONTENTS when it is a contents inspector, with file LINES when it is a line inspector or with CODE when it is a CODE inspector.

Package

org.melusina.atelier.

Source

lint.lisp.


6.1.3 Ordinary functions

Function: find-template (designator)

Find template by DESIGNATOR in *TEMPLATE-REPOSITORY*.

Package

org.melusina.atelier.

Source

template.lisp.

Function: hint-at-file (description &optional control-string &rest format-arguments)

Make a hint CODE for PATHNAME stating a description.
The description is prepared by formatting CONTROL-STRING and FORMAT-ARGUMENTS.

Package

org.melusina.atelier.

Source

lint.lisp.

Function: hint-at-file-line (description &optional control-string &rest format-arguments)

Make a hint CODE for PATHNAME and LINE stating a description.
The description is prepared by formatting CONTROL-STRING and FORMAT-ARGUMENTS.

Package

org.melusina.atelier.

Source

lint.lisp.

Function: initialize ()
Package

org.melusina.atelier.

Source

main.lisp.

Function: lint (&rest pathnames)

Lint file PATHNAMES with the given linters.

When the first item of PATHNAMES is a list itself, then the linter is called on pathnames on that list.

Package

org.melusina.atelier.

Source

lint.lisp.

Function: lint-file (pathname inspectors)

Ensure the file CONTENTS under PATHNAME validates some file contents with INSPECTORS.

Package

org.melusina.atelier.

Source

lint.lisp.

Function: list-inspectors ()

List INSPECTORS.

Package

org.melusina.atelier.

Source

lint.lisp.

Function: list-licenses ()

Returns a list containing the designators of known licenses.

Package

org.melusina.atelier.

Source

license.lisp.

Function: list-template-parameter-names (template-designator)

List the parameters consumed by TEMPLATE-DESIGNATOR.

Package

org.melusina.atelier.

Source

template.lisp.

Function: list-templates ()

Returns a list containing the designators of known templates.

Package

org.melusina.atelier.

Source

template.lisp.

Function: new-lisp-file (name summary)

Create a new file NAME with SUMMARY.

Package

org.melusina.atelier.

Source

template.lisp.

Function: new-lisp-project (pathname &key environment copyright-holder copyright-year project-filename project-name project-description project-long-description homepage license)

Create a new lisp project in PATHNAME.

Package

org.melusina.atelier.

Source

template.lisp.

Function: parameter-keyword (parameter-name)

The keyword associated with PARAMETER-NAME.

Package

org.melusina.atelier.

Source

parameter.lisp.

Function: write-template (template-designator pathname &optional environment)

Write the template identified by DESIGNATOR under PATHNAME.

If environment is provided, it is a plist which is added to the current *PARAMETER-BINDINGS*.

The PATHNAME argument can actually be a pathname, a string instepreted as a UNIX path, a stream or the value T.

Package

org.melusina.atelier.

Source

template.lisp.


6.1.4 Generic functions

Generic Function: content-inspectors (linter)

Inspectors emitting hints applying to the file contents.
These inspectors are called with CONTENTS of the file, a string. They are a good place to validate the presence of fixed texts or the absence of authentication tokens and the like.

Package

org.melusina.atelier.

Source

lint.lisp.

Method Combination

append.

Options

:most-specific-first

Methods
Method: content-inspectors append ((instance canonical-source-linter))
Method: content-inspectors append ((instance extensive-linter))
Method: content-inspectors append ((instance linter))
Generic Function: file-inspectors (linter)

Inspectors emitting hints applying to the file.
These inspectors are called with the PATHNAME of the file. They are a good place to validate the file encoding, or file properties.

Package

org.melusina.atelier.

Source

lint.lisp.

Method Combination

append.

Options

:most-specific-first

Methods
Method: file-inspectors append ((instance canonical-source-linter))
Method: file-inspectors append ((instance extensive-linter))
Method: file-inspectors append ((instance linter))
Generic Function: line-inspectors (linter)

Inspectors emitting hints applying to individual lines of a file.
The inspectors are called on a LINE of the file, a string. They are a good place to strip whitespace, detect long lines, etc.

Package

org.melusina.atelier.

Source

lint.lisp.

Method Combination

append.

Options

:most-specific-first

Methods
Method: line-inspectors append ((instance extensive-linter))
Method: line-inspectors append ((instance linter))

6.1.5 Classes

Class: block-comment-linter
Package

org.melusina.atelier.

Source

lint.lisp.

Direct superclasses

linter.

Direct subclasses

plain-block-comment-linter.

Direct methods

decorate-block-comment.

Direct slots
Slot: comment-prefix
Initform

(error "an block-comment-linter requires a comment-prefix.")

Initargs

:comment-prefix

Slot: comment-prefix-regex
Initform

(error "an block-comment-linter requires a comment-prefix-regex.")

Initargs

:comment-prefix-regex

Slot: comment-continuation
Initform

(error "an block-comment-linter requires a comment-continuation.")

Initargs

:comment-continuation

Slot: comment-suffix
Initform

(error "an block-comment-linter requires a comment-suffix.")

Initargs

:comment-suffix

Class: canonical-source-linter

A SOURCE-LINTER verrifies that a file follows canonical project rules.

Package

org.melusina.atelier.

Source

lint.lisp.

Direct superclasses

linter.

Direct subclasses
Direct methods
Class: extensive-linter

The EXTENSIVE-LINTER class represents an extensive set of INSPECTORS.

Package

org.melusina.atelier.

Source

lint.lisp.

Direct superclasses

linter.

Direct subclasses
Direct methods
Direct slots
Slot: file-inspectors

The extensive list of FILE-INSPECTORS selected by this LINTER.

Initargs

:file-inspectors

Slot: content-inspectors

The extensive list of CONTENT-INSPECTORS selected by this LINTER.

Initargs

:content-inspectors

Slot: line-inspectors

The extensive list of LINE-INSPECTORS selected by this LINTER.

Initargs

:line-inspectors

Class: hint-at-file

The hint class represents hints that are affecting a file.

Package

org.melusina.atelier.

Source

lint.lisp.

Direct superclasses

hint.

Direct slots
Slot: pathname

The relative pathname of the affected file.

Package

common-lisp.

Initargs

:pathname

Class: hint-at-file-line

The hint class represent hints that are affecting a spcific line in a file.

Package

org.melusina.atelier.

Source

lint.lisp.

Direct superclasses

hint.

Direct slots
Slot: pathname

The relative pathname of the affected file.

Package

common-lisp.

Initargs

:pathname

Slot: line

The line number withing the affected file.

Initargs

:line

Class: inline-comment-linter
Package

org.melusina.atelier.

Source

lint.lisp.

Direct superclasses

linter.

Direct subclasses

plain-line-comment-linter.

Direct methods

decorate-line-comment.

Direct slots
Slot: comment-prefix
Initform

(error "an inline-comment-linter requires a comment-prefix.")

Initargs

:comment-prefix

Slot: comment-prefix-regex
Initform

(error "an inline-comment-linter requires a comment-prefix-regex.")

Initargs

:comment-prefix-regex

Class: linter

The linter class represents a set of hints and a filter selecting files subject to these hints.

Package

org.melusina.atelier.

Source

lint.lisp.

Direct subclasses
Direct methods
Direct slots
Slot: file-type

File types which are subject to the hints owned by the structure.

Initargs

:file-type

Slot: file-predicate

The FILE-PREDICATE recognises the file of the given FILE-TYPE.
The FILE-PREDICATE can have one of the following forms:

* T
The predicate that recognises every file.
* NIL
The predicate that recognises no file.
* (:HAS-PREFIX STRING)
The predicate that recognises files whose name starts with STRING. * (:HAS-SUFFIX STRING)
The predicate that recognises files whose name ends with STRING. * (:HAS-NAME STRING)
The predicate that recognises files whose name is STRING.
* (:HAS-SHEBANG STRING)
The predicate that recognises files with a SHEBANG similar to STRING. * (:OR PREDICATE1 …)
The disjunction of predicates.
* (:AND PREDICATE1 …)
The conjunction of predicates.

Initform

t

Initargs

:file-predicate

Class: plain-block-comment-linter

The class of linters for languages whose comments follow the block comment style.

Package

org.melusina.atelier.

Source

lint.lisp.

Direct superclasses
Class: plain-line-comment-linter

The class of linters for languages whose comments follow the line comment style.

Package

org.melusina.atelier.

Source

lint.lisp.

Direct superclasses

6.2 Internals


6.2.1 Special variables

Special Variable: *composite-template-specs*
Package

org.melusina.atelier.

Source

template.lisp.

Special Variable: *hint-code*

The hint code locally bound by the DEFINE-HINT macro.

Package

org.melusina.atelier.

Source

lint.lisp.

Special Variable: *hint-line*

The number of the line being hinted at.

Package

org.melusina.atelier.

Source

lint.lisp.

Special Variable: *hint-pathname*

The relative pathname of the file being linted.

Package

org.melusina.atelier.

Source

lint.lisp.

Special Variable: *hint-srcdir*

The source directory for the project being linted.

Package

org.melusina.atelier.

Source

lint.lisp.

Special Variable: *inspector-table*

The table of inspector corresponding to their codes.

Package

org.melusina.atelier.

Source

lint.lisp.

Special Variable: *license-repository*

A hash-table with all licenses.

Package

org.melusina.atelier.

Source

license.lisp.

Special Variable: *license-repository-pathname*

The pathname to our license repository.

Package

org.melusina.atelier.

Source

license.lisp.

Special Variable: *linter*

The current linter used.

Package

org.melusina.atelier.

Source

lint.lisp.

Special Variable: *linter-table*

The table of linters corresponding to their file types.

Package

org.melusina.atelier.

Source

lint.lisp.

Special Variable: *parameter-block*

The list of parameters that are to be replaced as block variables.

Package

org.melusina.atelier.

Source

parameter.lisp.

Special Variable: *parameter-placeholder-regex*

The regular expression matching parameter placeholders.

Package

org.melusina.atelier.

Source

parameter.lisp.

Special Variable: *resourcedir*

The pathname to the directory holding program resources.

Package

org.melusina.atelier.

Source

configuration.lisp.

Special Variable: *template-repository*

A hash-table with all templates.

Package

org.melusina.atelier.

Source

template.lisp.

Special Variable: *template-repository-pathname*

The pathname to our template repository.

Package

org.melusina.atelier.

Source

template.lisp.


6.2.2 Ordinary functions

Function: add-pathname (pathname list-of-pathnames)

Add PATHNAME to LIST-OF-PATHNAMES unless it is already found there.

Package

org.melusina.atelier.

Source

utilities.lisp.

Function: anomaly (description &optional control-string &rest format-arguments)

Signal an anomaly with the given parameters.

Package

org.melusina.atelier.

Source

lint.lisp.

Function: arrange-hints-by-code (hints)

Arrange HINTS into an alist mapping CODES to their list of HINTS.

Package

org.melusina.atelier.

Source

lint.lisp.

Function: arrange-hints-by-file (hints)

Arrange HINTS into an alist mapping PATHNAMES to their list of HINTS.

Package

org.melusina.atelier.

Source

lint.lisp.

Function: arrange-hints-by-file-then-code (hints)
Package

org.melusina.atelier.

Source

lint.lisp.

Function: arrange-hints-by-key (key hints)

Arrange HINTS into an alist mapping KEYS to their list of HINTS.

Package

org.melusina.atelier.

Source

lint.lisp.

Function: break-down (taste sequence)

Break down a list SEQUENCE into consecutive lists of constant TASTE. The TASTE argument is a function which is applied on sequence elements to taste them. Taste values are

The answer is an alist whose terms have the form

(TASTE1 . SEQUENCE1)

such that:

1. The concatenation of the SEQUENCE1s yields SEQUENCE.
2. Each element of the list SEQUENCE1 has the given TASTE1.
3. Consecutive terms of the answer have distinct TASTE1.

Package

org.melusina.atelier.

Source

utilities.lisp.

Function: comment-prefix-regex (linter)
Package

org.melusina.atelier.

Source

lint.lisp.

Function: count-string-words (string)

Count the number of words in STRING.

Package

org.melusina.atelier.

Source

utilities.lisp.

Function: define-plain-linter (&rest initargs &key file-predicate file-type comment-prefix comment-prefix-regex comment-continuation comment-suffix file-inspectors content-inspectors line-inspectors)

Define a plain linter from either style and add it to the linter table.

Package

org.melusina.atelier.

Source

lint.lisp.

Function: edit-first-line (string first-line)

Edit the first line of STRING to FIRST-LINE as a new string.

Package

org.melusina.atelier.

Source

utilities.lisp.

Function: edit-last-line (string last-line)

Edit the last line of STRING to LAST-LINE as a new string.

Package

org.melusina.atelier.

Source

utilities.lisp.

Function: find-inspector (inspector-designator)

Find the inspector designated by INSPECTOR-DESIGNATOR.

Package

org.melusina.atelier.

Source

lint.lisp.

Function: find-license (designator)

Find license by DESIGNATOR in *LICENSE-REPOSITORY*.

Package

org.melusina.atelier.

Source

license.lisp.

Function: find-plain-linter (designator)

Find a plain linter by its DESIGNATOR.
The designator is a keyword representing the filetype the linter wants to take care of.

Package

org.melusina.atelier.

Source

lint.lisp.

Function: first-line (string)

The first line of STRING.

Package

org.melusina.atelier.

Source

utilities.lisp.

Function: (setf first-line) (string)

Set the first line of STRING to NEW-VALUE.

Package

org.melusina.atelier.

Source

utilities.lisp.

Function: format-hints-by-file-then-code (destination hints)
Package

org.melusina.atelier.

Source

lint.lisp.

Function: hint-at-file-line-when-it-is-very-long (line &key maximum-length)

Hint at very long LINE.
The parameter MAXIMUM-LENGTH is set to 100, which matches typical Common Lisp style guides. This is usually a good value for programming but pure text should aim at a smaller length. For pure text, a maximum length of 80 or maybe 70 characters seems appropriate.

When a line has only one word, it is not counted as very long. When a line is a lisp definition, it does not need to be short. This latter rule makes grep more useful.

Package

org.melusina.atelier.

Source

codestyle-0002.lisp.

Function: hint-at-file-when-character-encoding-is-not-utf8 (pathname)

Hint at PATHNAME when it is not a valid UTF8 file.

Package

org.melusina.atelier.

Source

codestyle-0001.lisp.

Function: hint-at-file-when-it-lacks-canonical-footer-line (contents)

Hint at file when it lacks the canonical footer line.
The canonical footer line is a comment featuring a sentence about end of file, like

End of file ‘example.lisp’.

Package

org.melusina.atelier.

Source

codestyle-0004.lisp.

Function: hint-at-file-when-it-lacks-canonical-header-line (contents)

Hint at file when it lacks the canonical header line.
The canonical header line is a comment featuring the filename, a dash and a short description.

Package

org.melusina.atelier.

Source

codestyle-0003.lisp.

Function: hint-at-file-when-it-lacks-canonical-project-identification (contents)

Hint at file when it lacks the canonical project identification.
The canonical project identification is a group of comment lines following the first line and summarising the project name, the project page, the copyright holder and the license under which the file is released.

Package

org.melusina.atelier.

Source

codestyle-0005.lisp.

Function: hint-at-file-when-it-lacks-project-license-information (contents)

Hint at file when it lacks the canonical project license information.

Package

org.melusina.atelier.

Source

codestyle-0006.lisp.

Function: indent (target-string &optional margin-left)
Package

org.melusina.atelier.

Source

utilities.lisp.

Function: join-lines (lines &optional separator)
Package

org.melusina.atelier.

Source

utilities.lisp.

Function: last-line (string)

The last line of STRING.

Package

org.melusina.atelier.

Source

utilities.lisp.

Function: (setf last-line) (string)

Set the last line of STRING to NEW-VALUE.

Package

org.melusina.atelier.

Source

utilities.lisp.

Function: last-line-position (string)

The position of the last line of STRING.
The position is represented as multiple values, the START-POS and END-POS.

Package

org.melusina.atelier.

Source

utilities.lisp.

Function: license-repository-list-licenses (&optional license-repository-pathname)

List licenses held in LICENSE-REPOSITORY-PATHNAME.

Package

org.melusina.atelier.

Source

license.lisp.

Function: license-repository-load (&optional license-repository-pathname)

Load all licenses on LICENSE-REPOSITORY-PATHNAME.

Package

org.melusina.atelier.

Source

license.lisp.

Function: license-repository-load-definition (definition-pathname)

Load the license definition found in DEFINITION-PATHNAME.
The file located at pathname must be a directory holding a file for each member value.

Package

org.melusina.atelier.

Source

license.lisp.

Function: lint-contents (contents inspectors)

Ensure the file CONTENTS under PATHNAME validates some file contents with INSPECTORS.

Package

org.melusina.atelier.

Source

lint.lisp.

Function: lint-lines (lines inspectors)

Ensure the file LINES under PATHNAME validate some line INSPECTORS. When CONTENTS is supplied, it is used as the content of the file instead of reading the file contents from PATHNAME. Valid values for CONTENTS are a string or a list of strings.

Package

org.melusina.atelier.

Source

lint.lisp.

Function: linter-for-file (pathname)

Find a linter to apply for PATHNAME.

Package

org.melusina.atelier.

Source

lint.lisp.

Function: linter-match (linter pathname)

Predicate recognising if a LINTER applies to PATHNAME.

Package

org.melusina.atelier.

Source

lint.lisp.

Function: list-parameter-names (template-text)

The list of parameter names occuring in TEMPLATE-TEXT.

Package

org.melusina.atelier.

Source

parameter.lisp.

Function: make-file-template (&rest initargs &key template-id template-name template-text)

Make a file template.

Package

org.melusina.atelier.

Source

template.lisp.

Function: make-plain-block-comment-linter (&rest initargs &key file-predicate file-type comment-prefix comment-prefix-regex comment-continuation comment-suffix file-inspectors content-inspectors line-inspectors)

Make a block comment linter.

Package

org.melusina.atelier.

Source

lint.lisp.

Function: make-plain-line-comment-linter (&rest initargs &key file-predicate file-type comment-prefix comment-prefix-regex file-inspectors content-inspectors line-inspectors)

Make an inline comment linter.

Package

org.melusina.atelier.

Source

lint.lisp.

Function: make-shell-namespace (filename)

Make a shell function namespace out of FILENAME.
The result is a word, without hyphen or dashes, that can be used as a prefix when defining shell functions and variables.

Package

org.melusina.atelier.

Source

template.lisp.

Function: merge-parameter-bindings (bindings1 bindings2)

Make new bindings by adding to BINDINGS1 new parameters found in BINDINGS2. When an entry of BINDINGS2 maps a key to NIL, the entry is ignored. When an entry of BINDINGS2 uses the same key as an entry of BINDINGS1, that entry is ignored.

Package

org.melusina.atelier.

Source

parameter.lisp.

Function: parameter-name-equal (parameter-name1 parameter-name2)

Predicate recognising equal parameter names.
Two parameter names are equal if they are equal regardless of case or difference between shell-case or lisp-case.

Package

org.melusina.atelier.

Source

parameter.lisp.

Function: parameter-replace (template-text bindings)

Substitute parameters from TEMPLATE-TEXT according to BINDINGS.

Package

org.melusina.atelier.

Source

parameter.lisp.

Function: parameter-replacement-text (item &optional alist default)
Package

org.melusina.atelier.

Source

parameter.lisp.

Function: read-file-into-list (pathname)

Read PATHNAME into a list of lines.

When PATHNAME is a list of strings, it is returned as is, which is useful for testing.

Package

org.melusina.atelier.

Source

utilities.lisp.

Function: sort-parameter-bindings (bindings)

Sort BINDINGS in a replacement order.
The replacement order is a topological sort and processing paramters in this order to handle a template text ensures all possible parameter names have been replaced.

It is an error to sort BINDINGS featuring a cyclic dependency.

Package

org.melusina.atelier.

Source

parameter.lisp.

Function: string-lines (string)

Prepare the list of lines in STRING.

Package

org.melusina.atelier.

Source

utilities.lisp.

Function: string-list-p (object)

Predicate recognising lists of strings.

Package

org.melusina.atelier.

Source

utilities.lisp.

Function: string-match (pattern text)

Predicate recognising TEXT matching a globbing PATTERN.

Package

org.melusina.atelier.

Source

utilities.lisp.

Function: string-prefix-p (pattern text)

Predicate recognising TEXT starting with PATTERN.

Package

org.melusina.atelier.

Source

utilities.lisp.

Function: string-shebang-end-position (string)

The end position of a possible shebang line in STRING.

Package

org.melusina.atelier.

Source

codestyle-0003.lisp.

Function: string-suffix-p (pattern text)

Predicate recognising TEXT ending with PATTERN.

Package

org.melusina.atelier.

Source

utilities.lisp.

Function: string-words (string)

Prepare the list of words in STRING.

Package

org.melusina.atelier.

Source

utilities.lisp.

Function: template-environment (environment)

Prepare template environment based on ENVIRONMENT.
The prepared template environment features license information and *PARAMETER-BINDINGS*.

Package

org.melusina.atelier.

Source

template.lisp.

Function: template-repository-empty-p ()
Package

org.melusina.atelier.

Source

template.lisp.

Function: template-repository-list-templates (&optional template-repository-pathname)

List templates held in TEMPLATE-REPOSITORY-PATHNAME.

Package

org.melusina.atelier.

Source

template.lisp.

Function: template-repository-load (&optional template-repository-pathname)

Load all templates on TEMPLATE-REPOSITORY-PATHNAME.

Package

org.melusina.atelier.

Source

template.lisp.

Function: template-repository-load-definition-file (definition-pathname)

Load the file template from DEFINITION-PATHNAME.

Package

org.melusina.atelier.

Source

template.lisp.


6.2.3 Generic functions

Generic Function: decorate-block-comment (linter block-comment)

Decorate a BLOCK-COMMENT for LINTER.
This decorates BLOCK-COMMENT according to FILE-TYPE so that BLOCK-COMMENT can
be inserted as a standalone comment block in a source code file of the corresponding FILE-TYPE.

A BLOCK-COMMENT can either be a string or a list of strings.

Package

org.melusina.atelier.

Source

lint.lisp.

Methods
Method: decorate-block-comment ((instance block-comment-linter) (block-comment list))
Method: decorate-block-comment (instance (block-comment string))
Method: decorate-block-comment (instance (block-comment list))
Generic Function: decorate-line-comment (linter line-comment)
Package

org.melusina.atelier.

Methods
Method: decorate-line-comment ((instance inline-comment-linter) line)
Source

lint.lisp.

Method: decorate-line-comment :before (linter (line-comment string))

Reject lines which contain a newline character.

Source

lint.lisp.

Generic Function: decorate-line-commment (linter line-comment)

Decorate a LINE-COMMENT for LINTER.
This decorates LINE-COMMENT according to FILE-TYPE so that LINE-COMMENT can
be inserted as a standalone comment line in a source code file of the corresponding FILE-TYPE.

Package

org.melusina.atelier.

Source

lint.lisp.

Generic Function: really-list-template-parameter-names (template)

List parameters used by TEMPLATE.

Package

org.melusina.atelier.

Source

template.lisp.

Methods
Method: really-list-template-parameter-names ((template composite-template))
Method: really-list-template-parameter-names ((template file-template))
Generic Function: really-write-template (template pathname template-environment)

Write TEMPLATE into PATHNAME.

Package

org.melusina.atelier.

Source

template.lisp.

Methods
Method: really-write-template ((template composite-template) pathname template-environment)
Method: really-write-template ((template file-template) pathname template-environment)

6.2.4 Conditions

Condition: anomaly

The class of anomalies spotted by inspectors.

Package

org.melusina.atelier.

Source

lint.lisp.

Direct superclasses

condition.

Direct slots
Slot: code

The code code of an anomaly.

Initform

(quote org.melusina.atelier::*hint-code*)

Initargs

:code

Slot: description

A short, generic explanation of an anomaly.

Initform

(quote (error "an anomaly requires a description."))

Initargs

:description

Slot: explanation

A longer, context-specific explanation of an anomaly.

Initform

(quote nil)

Initargs

:explanation


6.2.5 Classes

Class: composite-template

This class represents a composite of other template.

Package

org.melusina.atelier.

Source

template.lisp.

Direct superclasses

template.

Direct methods
Direct slots
Slot: template-list

List of templates that form the composite.
Each entry of the list is a list of the form

(TEMPLATE-DESIGNATOR RELATIVE-PATHNAME ADDITIONAL-BINDINGS)

Initargs

:template-list

Class: file-template

This class represents a file template which creates a file when written.

Package

org.melusina.atelier.

Source

template.lisp.

Direct superclasses

template.

Direct methods
Direct slots
Slot: template-text

The template text for the file template.

Initform

(error "a file template requires a template text.")

Initargs

:template-text

Class: hint

The hint class represent hints.

Package

org.melusina.atelier.

Source

lint.lisp.

Direct subclasses
Direct slots
Slot: code

The hint code uniquely defines a hint.

Initform

(error "a hint must have a unique hint code used as a reference.")

Initargs

:code

Slot: description

A short description of the hint.

Initform

(error "a hint must have a hint description.")

Initargs

:description

Slot: explanation

A longer explanation describing the hint.

Initargs

:explanation

Class: license

This class presents the various characteristics of a software license.

Package

org.melusina.atelier.

Source

license.lisp.

Direct slots
Slot: license-name

The full name of the license.

Initargs

:license-name

Slot: license-text

The full text of the license.

Initargs

:license-text

Slot: license-header

The header of the license.

Initargs

:license-header

Slot: license-id

The ID of the license in the SPDX database.

Initargs

:license-id

Class: template

This class presents the various characteristics of a template.

Package

org.melusina.atelier.

Source

template.lisp.

Direct subclasses
Direct slots
Slot: template-name

The full name of the template.

Initargs

:template-name

Slot: template-id

The ID of the template.

Initargs

:template-id

Slot: template-description

The long description of the template.

Initargs

:template-description


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   (  
A   B   C   D   E   F   G   H   I   J   L   M   N   P   R   S   T   W  
Index Entry  Section

(
(setf first-line): Private ordinary functions
(setf last-line): Private ordinary functions

A
add-pathname: Private ordinary functions
anomaly: Private ordinary functions
arrange-hints-by-code: Private ordinary functions
arrange-hints-by-file: Private ordinary functions
arrange-hints-by-file-then-code: Private ordinary functions
arrange-hints-by-key: Private ordinary functions

B
break-down: Private ordinary functions

C
comment-prefix-regex: Private ordinary functions
content-inspectors: Public generic functions
content-inspectors: Public generic functions
content-inspectors: Public generic functions
content-inspectors: Public generic functions
count-string-words: Private ordinary functions

D
decorate-block-comment: Private generic functions
decorate-block-comment: Private generic functions
decorate-block-comment: Private generic functions
decorate-block-comment: Private generic functions
decorate-line-comment: Private generic functions
decorate-line-comment: Private generic functions
decorate-line-comment: Private generic functions
decorate-line-commment: Private generic functions
define-inspector: Public macros
define-plain-linter: Private ordinary functions

E
edit-first-line: Private ordinary functions
edit-last-line: Private ordinary functions

F
file-inspectors: Public generic functions
file-inspectors: Public generic functions
file-inspectors: Public generic functions
file-inspectors: Public generic functions
find-inspector: Private ordinary functions
find-license: Private ordinary functions
find-plain-linter: Private ordinary functions
find-template: Public ordinary functions
first-line: Private ordinary functions
format-hints-by-file-then-code: Private ordinary functions
Function, (setf first-line): Private ordinary functions
Function, (setf last-line): Private ordinary functions
Function, add-pathname: Private ordinary functions
Function, anomaly: Private ordinary functions
Function, arrange-hints-by-code: Private ordinary functions
Function, arrange-hints-by-file: Private ordinary functions
Function, arrange-hints-by-file-then-code: Private ordinary functions
Function, arrange-hints-by-key: Private ordinary functions
Function, break-down: Private ordinary functions
Function, comment-prefix-regex: Private ordinary functions
Function, count-string-words: Private ordinary functions
Function, define-plain-linter: Private ordinary functions
Function, edit-first-line: Private ordinary functions
Function, edit-last-line: Private ordinary functions
Function, find-inspector: Private ordinary functions
Function, find-license: Private ordinary functions
Function, find-plain-linter: Private ordinary functions
Function, find-template: Public ordinary functions
Function, first-line: Private ordinary functions
Function, format-hints-by-file-then-code: Private ordinary functions
Function, hint-at-file: Public ordinary functions
Function, hint-at-file-line: Public ordinary functions
Function, hint-at-file-line-when-it-is-very-long: Private ordinary functions
Function, hint-at-file-when-character-encoding-is-not-utf8: Private ordinary functions
Function, hint-at-file-when-it-lacks-canonical-footer-line: Private ordinary functions
Function, hint-at-file-when-it-lacks-canonical-header-line: Private ordinary functions
Function, hint-at-file-when-it-lacks-canonical-project-identification: Private ordinary functions
Function, hint-at-file-when-it-lacks-project-license-information: Private ordinary functions
Function, indent: Private ordinary functions
Function, initialize: Public ordinary functions
Function, join-lines: Private ordinary functions
Function, last-line: Private ordinary functions
Function, last-line-position: Private ordinary functions
Function, license-repository-list-licenses: Private ordinary functions
Function, license-repository-load: Private ordinary functions
Function, license-repository-load-definition: Private ordinary functions
Function, lint: Public ordinary functions
Function, lint-contents: Private ordinary functions
Function, lint-file: Public ordinary functions
Function, lint-lines: Private ordinary functions
Function, linter-for-file: Private ordinary functions
Function, linter-match: Private ordinary functions
Function, list-inspectors: Public ordinary functions
Function, list-licenses: Public ordinary functions
Function, list-parameter-names: Private ordinary functions
Function, list-template-parameter-names: Public ordinary functions
Function, list-templates: Public ordinary functions
Function, make-file-template: Private ordinary functions
Function, make-plain-block-comment-linter: Private ordinary functions
Function, make-plain-line-comment-linter: Private ordinary functions
Function, make-shell-namespace: Private ordinary functions
Function, merge-parameter-bindings: Private ordinary functions
Function, new-lisp-file: Public ordinary functions
Function, new-lisp-project: Public ordinary functions
Function, parameter-keyword: Public ordinary functions
Function, parameter-name-equal: Private ordinary functions
Function, parameter-replace: Private ordinary functions
Function, parameter-replacement-text: Private ordinary functions
Function, read-file-into-list: Private ordinary functions
Function, sort-parameter-bindings: Private ordinary functions
Function, string-lines: Private ordinary functions
Function, string-list-p: Private ordinary functions
Function, string-match: Private ordinary functions
Function, string-prefix-p: Private ordinary functions
Function, string-shebang-end-position: Private ordinary functions
Function, string-suffix-p: Private ordinary functions
Function, string-words: Private ordinary functions
Function, template-environment: Private ordinary functions
Function, template-repository-empty-p: Private ordinary functions
Function, template-repository-list-templates: Private ordinary functions
Function, template-repository-load: Private ordinary functions
Function, template-repository-load-definition-file: Private ordinary functions
Function, write-template: Public ordinary functions

G
Generic Function, content-inspectors: Public generic functions
Generic Function, decorate-block-comment: Private generic functions
Generic Function, decorate-line-comment: Private generic functions
Generic Function, decorate-line-commment: Private generic functions
Generic Function, file-inspectors: Public generic functions
Generic Function, line-inspectors: Public generic functions
Generic Function, really-list-template-parameter-names: Private generic functions
Generic Function, really-write-template: Private generic functions

H
hint-at-file: Public ordinary functions
hint-at-file-line: Public ordinary functions
hint-at-file-line-when-it-is-very-long: Private ordinary functions
hint-at-file-when-character-encoding-is-not-utf8: Private ordinary functions
hint-at-file-when-it-lacks-canonical-footer-line: Private ordinary functions
hint-at-file-when-it-lacks-canonical-header-line: Private ordinary functions
hint-at-file-when-it-lacks-canonical-project-identification: Private ordinary functions
hint-at-file-when-it-lacks-project-license-information: Private ordinary functions

I
indent: Private ordinary functions
initialize: Public ordinary functions

J
join-lines: Private ordinary functions

L
last-line: Private ordinary functions
last-line-position: Private ordinary functions
license-repository-list-licenses: Private ordinary functions
license-repository-load: Private ordinary functions
license-repository-load-definition: Private ordinary functions
line-inspectors: Public generic functions
line-inspectors: Public generic functions
line-inspectors: Public generic functions
lint: Public ordinary functions
lint-contents: Private ordinary functions
lint-file: Public ordinary functions
lint-lines: Private ordinary functions
linter-for-file: Private ordinary functions
linter-match: Private ordinary functions
list-inspectors: Public ordinary functions
list-licenses: Public ordinary functions
list-parameter-names: Private ordinary functions
list-template-parameter-names: Public ordinary functions
list-templates: Public ordinary functions

M
Macro, define-inspector: Public macros
make-file-template: Private ordinary functions
make-plain-block-comment-linter: Private ordinary functions
make-plain-line-comment-linter: Private ordinary functions
make-shell-namespace: Private ordinary functions
merge-parameter-bindings: Private ordinary functions
Method, content-inspectors: Public generic functions
Method, content-inspectors: Public generic functions
Method, content-inspectors: Public generic functions
Method, decorate-block-comment: Private generic functions
Method, decorate-block-comment: Private generic functions
Method, decorate-block-comment: Private generic functions
Method, decorate-line-comment: Private generic functions
Method, decorate-line-comment: Private generic functions
Method, file-inspectors: Public generic functions
Method, file-inspectors: Public generic functions
Method, file-inspectors: Public generic functions
Method, line-inspectors: Public generic functions
Method, line-inspectors: Public generic functions
Method, really-list-template-parameter-names: Private generic functions
Method, really-list-template-parameter-names: Private generic functions
Method, really-write-template: Private generic functions
Method, really-write-template: Private generic functions

N
new-lisp-file: Public ordinary functions
new-lisp-project: Public ordinary functions

P
parameter-keyword: Public ordinary functions
parameter-name-equal: Private ordinary functions
parameter-replace: Private ordinary functions
parameter-replacement-text: Private ordinary functions

R
read-file-into-list: Private ordinary functions
really-list-template-parameter-names: Private generic functions
really-list-template-parameter-names: Private generic functions
really-list-template-parameter-names: Private generic functions
really-write-template: Private generic functions
really-write-template: Private generic functions
really-write-template: Private generic functions

S
sort-parameter-bindings: Private ordinary functions
string-lines: Private ordinary functions
string-list-p: Private ordinary functions
string-match: Private ordinary functions
string-prefix-p: Private ordinary functions
string-shebang-end-position: Private ordinary functions
string-suffix-p: Private ordinary functions
string-words: Private ordinary functions

T
template-environment: Private ordinary functions
template-repository-empty-p: Private ordinary functions
template-repository-list-templates: Private ordinary functions
template-repository-load: Private ordinary functions
template-repository-load-definition-file: Private ordinary functions

W
write-template: Public ordinary functions


A.3 Variables

Jump to:   *  
C   D   E   F   L   P   S   T  
Index Entry  Section

*
*composite-template-specs*: Private special variables
*hint-code*: Private special variables
*hint-line*: Private special variables
*hint-pathname*: Private special variables
*hint-srcdir*: Private special variables
*inspector-table*: Private special variables
*license-repository*: Private special variables
*license-repository-pathname*: Private special variables
*linter*: Private special variables
*linter-interactive-p*: Public special variables
*linter-table*: Private special variables
*parameter-bindings*: Public special variables
*parameter-block*: Private special variables
*parameter-placeholder-regex*: Private special variables
*resourcedir*: Private special variables
*template-repository*: Private special variables
*template-repository-pathname*: Private special variables

C
code: Private conditions
code: Private classes
comment-continuation: Public classes
comment-prefix: Public classes
comment-prefix: Public classes
comment-prefix-regex: Public classes
comment-prefix-regex: Public classes
comment-suffix: Public classes
content-inspectors: Public classes

D
description: Private conditions
description: Private classes

E
explanation: Private conditions
explanation: Private classes

F
file-inspectors: Public classes
file-predicate: Public classes
file-type: Public classes

L
license-header: Private classes
license-id: Private classes
license-name: Private classes
license-text: Private classes
line: Public classes
line-inspectors: Public classes

P
pathname: Public classes
pathname: Public classes

S
Slot, code: Private conditions
Slot, code: Private classes
Slot, comment-continuation: Public classes
Slot, comment-prefix: Public classes
Slot, comment-prefix: Public classes
Slot, comment-prefix-regex: Public classes
Slot, comment-prefix-regex: Public classes
Slot, comment-suffix: Public classes
Slot, content-inspectors: Public classes
Slot, description: Private conditions
Slot, description: Private classes
Slot, explanation: Private conditions
Slot, explanation: Private classes
Slot, file-inspectors: Public classes
Slot, file-predicate: Public classes
Slot, file-type: Public classes
Slot, license-header: Private classes
Slot, license-id: Private classes
Slot, license-name: Private classes
Slot, license-text: Private classes
Slot, line: Public classes
Slot, line-inspectors: Public classes
Slot, pathname: Public classes
Slot, pathname: Public classes
Slot, template-description: Private classes
Slot, template-id: Private classes
Slot, template-list: Private classes
Slot, template-name: Private classes
Slot, template-text: Private classes
Special Variable, *composite-template-specs*: Private special variables
Special Variable, *hint-code*: Private special variables
Special Variable, *hint-line*: Private special variables
Special Variable, *hint-pathname*: Private special variables
Special Variable, *hint-srcdir*: Private special variables
Special Variable, *inspector-table*: Private special variables
Special Variable, *license-repository*: Private special variables
Special Variable, *license-repository-pathname*: Private special variables
Special Variable, *linter*: Private special variables
Special Variable, *linter-interactive-p*: Public special variables
Special Variable, *linter-table*: Private special variables
Special Variable, *parameter-bindings*: Public special variables
Special Variable, *parameter-block*: Private special variables
Special Variable, *parameter-placeholder-regex*: Private special variables
Special Variable, *resourcedir*: Private special variables
Special Variable, *template-repository*: Private special variables
Special Variable, *template-repository-pathname*: Private special variables

T
template-description: Private classes
template-id: Private classes
template-list: Private classes
template-name: Private classes
template-text: Private classes


A.4 Data types

Jump to:   A   B   C   E   F   H   I   L   M   O   P   S   T   U  
Index Entry  Section

A
anomaly: Private conditions

B
block-comment-linter: Public classes

C
canonical-source-linter: Public classes
Class, block-comment-linter: Public classes
Class, canonical-source-linter: Public classes
Class, composite-template: Private classes
Class, extensive-linter: Public classes
Class, file-template: Private classes
Class, hint: Private classes
Class, hint-at-file: Public classes
Class, hint-at-file-line: Public classes
Class, inline-comment-linter: Public classes
Class, license: Private classes
Class, linter: Public classes
Class, plain-block-comment-linter: Public classes
Class, plain-line-comment-linter: Public classes
Class, template: Private classes
codestyle-0001.lisp: The org․melusina․atelier/src/inspector/codestyle-0001․lisp file
codestyle-0002.lisp: The org․melusina․atelier/src/inspector/codestyle-0002․lisp file
codestyle-0003.lisp: The org․melusina․atelier/src/inspector/codestyle-0003․lisp file
codestyle-0004.lisp: The org․melusina․atelier/src/inspector/codestyle-0004․lisp file
codestyle-0005.lisp: The org․melusina․atelier/src/inspector/codestyle-0005․lisp file
codestyle-0006.lisp: The org․melusina․atelier/src/inspector/codestyle-0006․lisp file
composite-template: Private classes
Condition, anomaly: Private conditions
configuration.lisp: The org․melusina․atelier/src/configuration․lisp file

E
extensive-linter: Public classes

F
File, codestyle-0001.lisp: The org․melusina․atelier/src/inspector/codestyle-0001․lisp file
File, codestyle-0002.lisp: The org․melusina․atelier/src/inspector/codestyle-0002․lisp file
File, codestyle-0003.lisp: The org․melusina․atelier/src/inspector/codestyle-0003․lisp file
File, codestyle-0004.lisp: The org․melusina․atelier/src/inspector/codestyle-0004․lisp file
File, codestyle-0005.lisp: The org․melusina․atelier/src/inspector/codestyle-0005․lisp file
File, codestyle-0006.lisp: The org․melusina․atelier/src/inspector/codestyle-0006․lisp file
File, configuration.lisp: The org․melusina․atelier/src/configuration․lisp file
File, license.lisp: The org․melusina․atelier/src/license․lisp file
File, lint.lisp: The org․melusina․atelier/src/lint․lisp file
File, main.lisp: The org․melusina․atelier/src/main․lisp file
File, org.melusina.atelier.asd: The org․melusina․atelier/org․melusina․atelier․asd file
File, package.lisp: The org․melusina․atelier/src/package․lisp file
File, parameter.lisp: The org․melusina․atelier/src/parameter․lisp file
File, template.lisp: The org․melusina․atelier/src/template․lisp file
File, utilities.lisp: The org․melusina․atelier/src/utilities․lisp file
file-template: Private classes

H
hint: Private classes
hint-at-file: Public classes
hint-at-file-line: Public classes

I
inline-comment-linter: Public classes
inspector: The org․melusina․atelier/src/inspector module

L
license: Private classes
license.lisp: The org․melusina․atelier/src/license․lisp file
lint.lisp: The org․melusina․atelier/src/lint․lisp file
linter: Public classes

M
main.lisp: The org․melusina․atelier/src/main․lisp file
Module, inspector: The org․melusina․atelier/src/inspector module
Module, src: The org․melusina․atelier/src module

O
org.melusina.atelier: The org․melusina․atelier system
org.melusina.atelier: The org․melusina․atelier package
org.melusina.atelier.asd: The org․melusina․atelier/org․melusina․atelier․asd file

P
Package, org.melusina.atelier: The org․melusina․atelier package
package.lisp: The org․melusina․atelier/src/package․lisp file
parameter.lisp: The org․melusina․atelier/src/parameter․lisp file
plain-block-comment-linter: Public classes
plain-line-comment-linter: Public classes

S
src: The org․melusina․atelier/src module
System, org.melusina.atelier: The org․melusina․atelier system

T
template: Private classes
template.lisp: The org․melusina․atelier/src/template․lisp file

U
utilities.lisp: The org․melusina․atelier/src/utilities․lisp file