import WorkspaceConfiguration .product(name: "WorkspaceConfiguration", package: "Workspace")
Structure

FileHeaderConfiguration

Options related to file headers.

Declaration

struct FileHeaderConfiguration

Overview

$ workspace refresh file‐headers

A file header is a commented section at the top of each file in a project. Typical uses for file headers include:

  • Identifing which project the file belongs to.

  • Indicating copyright.

  • Providing licence reminders.

Precise Definition of a File Header

Because Workspace overwrites existing file headers, it is important to know how Workspace identifies them.

Workspace considers any comment that starts a file to be a file header, with the following constraints:

A file header may be a single block comment:

/* This is a header. This is more of the same header. */ /* This is not part of the header. */

Alternatively, a file header may be a continous sequence of line comments:

// This is a header. // This is more of the same header. // This is not part of the header.

Documentation comments are never headers.

/** This is not a header. */

In shell scripts, the shebang line precedes the header and is not part of it.

#!/bin/bash ← This is not part of the header. # This is a header

Properties

contents

The entire contents of the file header.

copyrightNotice

The copyright notice.

manage

Whether or not to manage the project file headers.

Codable

Linux macOS