% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/setup_preflight.R
\name{setup_preflight}
\alias{setup_preflight}
\title{Interactive Pre-Flight Dispatcher}
\usage{
setup_preflight()
}
\value{
Invisibly returns a named list with components: \code{status} ("done",
"cancelled", or "error"), \code{hook_path}, and \code{checks} (named logical list).
}
\description{
Generates a custom Git pre-commit hook by interactively prompting the user 
to select which safety checks should be enforced before allowing a commit.
}
\details{
The function automates the creation of a `.git/hooks/pre-commit` shell script 
that can enforce the following checks:
\enumerate{
  \item \strong{Code Styling}: Automatically runs `styler::style_pkg()` to 
      standardize formatting and stages the modified files.
  \item \strong{Documentation}: Automatically runs `devtools::document()` 
      to ensure the `NAMESPACE` and help files are up to date.
  \item \strong{Testing}: Executes `testthat::test_local()` and aborts the 
      commit if any tests fail.
}
}
\section{Warning}{

This function modifies files on disk or the global environment. Please ensure you have a backup or are using version control (e.g., Git) before execution.
}

\examples{
if (interactive()) {
  setup_preflight()
}
}
