% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/functionArgument_linting.R
\name{lintFunctionArgs}
\alias{lintFunctionArgs}
\alias{lintFunctionArgs_file}
\alias{lintFunctionArgs_dir}
\title{Lint function calls for required named arguments}
\usage{
lintFunctionArgs_file(filePath = NULL, rules = NULL, fullPath = FALSE)

lintFunctionArgs_dir(dirPath = "./R", rules = NULL, fullPath = FALSE)
}
\arguments{
\item{filePath}{Path to a single R source file.}

\item{rules}{Named list of linting rules. Each list name is a function name
and each value is a character vector of required named arguments.}

\item{fullPath}{Logical specifying whether returned file paths should be
absolute paths. If \code{FALSE}, only base file names are returned.}

\item{dirPath}{Path to a directory containing R source files.}
}
\value{
A tibble describing matching function calls, with columns:

\describe{
\item{file}{Source file path or file name.}
\item{line_number}{Line number where the function call begins.}
\item{column_number}{Column number where the function call begins.}
\item{function_name}{Name of the function being checked.}
\item{named_args}{List column containing named arguments used in the call.}
\item{includes_required}{Logical indicating whether all required named
arguments were supplied.}
}
}
\description{
Parse R source code and identify calls to selected functions that are missing
required named arguments.
}
\details{
Rules are supplied as a named list where each name is a function to check and
each value is a character vector of required argument names. A function call
passes when all required arguments are supplied by name.

This linter only checks whether arguments are named in the call. It does not
evaluate code, inspect argument values, or detect unnamed positional
arguments.
}
\section{Limitations}{

This linter only detects named arguments. For example, \code{foo(x = bar, "baz")}
is treated as specifying the named argument \code{x}, but the value \code{bar} and the
unnamed argument \code{"baz"} are not inspected.
}

\examples{
\dontrun{
rules <- list(
  fn_one = "x",
  fn_two = c("foo", "bar")
)

lintFunctionArgs_file(
  filePath = "local_test/timezone_lint_test_script.R",
  rules = rules
)

lintFunctionArgs_dir(
  dirPath = "./R",
  rules = MazamaCoreUtils::timezoneLintRules
)
}
}
