Skip to contents

folder_report() gives the lines of check_folder(): the line of the rules, one line for each finding and the count line.

Usage

folder_report(
  path = ".",
  config = "checkit.yml",
  rules = general_rules(),
  sets = system.file("rules", package = "checkit"),
  scope = default_scope,
  messages = checkit_messages(),
  set_pattern = "^checkit_([0-9]{4})_([0-9]{2})_([0-9]{2})$",
  reserved_ignore = function(set) character(0),
  reserved_rules = character(0)
)

Arguments

path

The project folder.

config

The name of the config file in path. A rule set MAY hold the key packages, a map from the name of a package to its minimum version. It is not a rule. The runner gives it to each rule function that has the argument packages, such as the function of rule_set_pinned.

rules

The registry: a named list of rule() entries, such as compose_rules() gives. The default is general_rules().

sets

The folder of the rule sets. The default is the folder rules of checkit.

scope

A function scope(path, ignore) that returns the named list files that each rule function gets. ignore holds the folders of the key ignore for a rule that is not locked, and is empty for a locked rule. The default is default_scope().

messages

The texts of the config messages, a named list as checkit_messages() gives.

set_pattern

A regular expression that each name of a rule set matches. Its three groups are the year, the month and the day of the set.

reserved_ignore

A function of the name of the set of the project that returns regular expressions. An entry of ignore that one of them matches is an error.

reserved_rules

A named character vector. Each name is a name that the keys rules and allow MUST NOT hold. The error is "<config>: <key>: <name> <value>", so each value is the rest of the message.

Value

A character vector of the lines. The attribute findings holds the findings of folder_findings(). The attribute counts is a named integer vector with 5 elements: the counts of PASS, WARN, FAIL, SKIP and OFF. The count line holds SKIP, after FAIL, only when the count of SKIP is more than 0.