Skip to contents

A class which contains all checklist results.

See also

Other class: spelling

Super class

spelling -> checklist

Public fields

package

A logical indicating whether the source code refers to a package.

Active bindings

get_checked

A vector with checked topics.

get_gha_install

A vector with bash commands for GitHub Actions.

get_path

The path to the package.

get_pak

Packages to install with pak::pkg_install().

get_required

A vector with the names of the required checks.

get_spelling

Return the issues found by check_spelling()

fail

A logical indicating if any required check fails.

template

A list for a check list template.

Methods

Inherited methods


checklist$add_error()

Add errors

Usage

checklist$add_error(errors, item, keep = TRUE)

Arguments

errors

A vector with errors.

item

The item on which to store the errors.

keep

Keep old results


checklist$add_linter()

Add results from lintr::lint_package()

Usage

checklist$add_linter(linter, error = FALSE)

Arguments

linter

A vector with linter errors.

error

A logical indicating if the linter should be considered an error.


checklist$add_motivation()

Add motivation for allowed issues.

Usage

checklist$add_motivation(which = c("warnings", "notes"))

Arguments

which

Which kind of issue to add.


checklist$add_notes()

Add notes

Usage

checklist$add_notes(notes, item)

Arguments

notes

A vector with notes.

item

The item on which to store the notes.


checklist$add_rcmdcheck()

Add results from rcmdcheck::rcmdcheck

Usage

checklist$add_rcmdcheck(errors, warnings, notes)

Arguments

errors

A vector with errors.

warnings

A vector with warning messages.

notes

A vector with notes.


checklist$add_spelling()

Add results from check_spelling()

Usage

checklist$add_spelling(issues)

Arguments

issues

A data.frame with spell checking issues.


checklist$add_warnings()

Add warnings

Usage

checklist$add_warnings(warnings, item)

Arguments

warnings

A vector with warnings.

item

The item on which to store the warnings.


checklist$allowed()

Add allowed warnings and notes

Usage

checklist$allowed(
  warnings = vector(mode = "list", length = 0),
  notes = vector(mode = "list", length = 0)
)

Arguments

warnings

A vector with allowed warning messages. Defaults to an empty list.

notes

A vector with allowed notes. Defaults to an empty list.

package

Does the check list refers to a package. Defaults to TRUE.


checklist$confirm_motivation()

Confirm the current motivation for allowed issues.

Usage

checklist$confirm_motivation(which = c("warnings", "notes"))

Arguments

which

Which kind of issue to confirm.


checklist$new()

Initialize a new checklist object.

Usage

checklist$new(x = ".", language, package = TRUE)

Arguments

x

The path to the root of the project.

language

The default language for spell checking.

package

Is this a package or a project?


checklist$print()

Print the checklist object. Add quiet = TRUE to suppress printing.

Usage

checklist$print(...)

Arguments

...

See description.


checklist$set_pak()

Set packages to install with pak::pkg_install().

Usage

checklist$set_pak(pkg = character(0))

Arguments

pkg

A vector of packages to install with pak::pkg_install().


checklist$set_gha_install()

Set optional install commands for GitHub Actions

Usage

checklist$set_gha_install(commands)

Arguments

commands

A vector with commands.


checklist$set_required()

set required checks

Usage

checklist$set_required(checks = character(0))

Arguments

checks

a vector of required checks


checklist$clone()

The objects of this class are cloneable with this method.

Usage

checklist$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.