Package {jsslintr}


Type: Package
Title: JSS 'LaTeX'/'BibTeX' Style Checker
Version: 1.1.0-2
Description: Lints 'LaTeX'/'BibTeX' manuscripts against the Journal of Statistical Software (JSS) style guide. Wraps the same 'Rust' rule engine used by the standalone 'jsslint' binary, the browser/'WASM' build, and the 'Python' binding, exposed to R via 'extendr'.
License: MIT + file LICENSE
Copyright: See the file inst/AUTHORS for the authors and copyright holders of the vendored 'Rust' dependency crates.
Encoding: UTF-8
URL: https://github.com/kollerma/jss-style-checker, https://kollerma.github.io/jss-style-checker/
BugReports: https://github.com/kollerma/jss-style-checker/issues
SystemRequirements: Cargo (Rust's package manager), rustc >= 1.85
Depends: R (≥ 4.2)
Suggests: knitr, rmarkdown, testthat (≥ 3.0.0)
VignetteBuilder: knitr
Config/testthat/edition: 3
Config/rextendr/version: 0.3.1
Config/roxygen2/version: 8.0.0
NeedsCompilation: yes
Packaged: 2026-07-29 15:18:27 UTC; kollerma
Author: Manuel Koller ORCID iD [aut, cre], The authors of the vendored 'Rust' crates [cph] (see inst/AUTHORS for details)
Maintainer: Manuel Koller <kollerma@proton.me>
Repository: CRAN
Date/Publication: 2026-07-29 22:00:02 UTC

Find manuscript files for a JSS style check

Description

Lists the .tex, .ltx, and .bib files in a directory – the file set jsslint() checks when called without arguments.

Usage

jss_files(path = ".")

Arguments

path

Directory to search (default: the working directory).

Value

A character vector of file paths.


Apply automatic fixes for JSS style issues

Description

Lints the given files and applies the automatic fixes in place (atomic write; a fix that reintroduces its own violation is rolled back). Use dry_run = TRUE to preview the changes as a unified diff without touching the files.

Usage

jssfix(
  files,
  rules = NULL,
  dry_run = FALSE,
  journal = NULL,
  mode = NULL,
  ignore_rules = NULL,
  min_confidence = NULL,
  verbose = NULL
)

Arguments

files

Character vector of file paths, or a "jsslint" object as returned by jsslint() (its files and lint options are reused).

rules

Character vector of rule ids; when given, only fixes for these rules are applied.

dry_run

If TRUE, show the diff of what would change and write nothing.

journal

Journal identifier (default: "jss").

mode

"author" or "reviewer" (default: "author").

ignore_rules

Character vector of rule ids to suppress.

min_confidence

"low", "medium", or "high".

verbose

Enable diagnostic output on stderr.

Value

Invisibly, an object of class "jsslint_fixes" with data frames applied, skipped, and rejected, plus the unified diff (dry runs only). Printing it summarises what happened.

Examples

## Not run: 
jssfix(c("paper.tex", "refs.bib"), dry_run = TRUE)
jssfix(c("paper.tex", "refs.bib"))

## End(Not run)

Check a paper against the JSS style guide

Description

Reads the given manuscript files and lints them against the Journal of Statistical Software style guide. This is the main entry point for interactive use; render() is the lower-level in-memory binding it wraps.

Usage

jsslint(
  files = jss_files(),
  journal = NULL,
  mode = NULL,
  ignore_rules = NULL,
  min_confidence = NULL,
  verbose = NULL
)

Arguments

files

Character vector of paths to .tex/.ltx and .bib files, e.g. c("paper.tex", "refs.bib"). Defaults to every such file in the working directory.

journal

Journal identifier (default: "jss").

mode

"author" or "reviewer" (default: "author").

ignore_rules

Character vector of rule ids to suppress.

min_confidence

"low", "medium", or "high".

verbose

Enable diagnostic output on stderr.

Value

An object of class "jsslint". Print it for a quick overview, use summary() for a by-rule and by-category breakdown, and as.data.frame() for one row per issue. Pass it to jssfix() to apply the automatic fixes.

Examples

## Not run: 
res <- jsslint(c("paper.tex", "refs.bib"))
res
summary(res)
as.data.frame(res)
jssfix(res)

## End(Not run)

Lint files against the JSS style guide

Description

Mirrors jsslint::render (the PyO3 binding) / the WASM binding's render().

Usage

render(
  files,
  journal = NULL,
  mode = NULL,
  output = NULL,
  ignore_rules = NULL,
  min_confidence = NULL,
  fail_on = NULL,
  source_root = NULL,
  verbose = NULL
)

Arguments

files

A named character vector: names are file paths (.tex/.ltx/.bib), values are the file contents.

journal

Journal identifier (default: "jss").

mode

"author" or "reviewer" (default: "author").

output

"terminal", "json", "sarif", or "html" (default: "terminal").

ignore_rules

Comma-separated rule ids to suppress.

min_confidence

"low", "medium", or "high".

fail_on

"error", "warning", or "info".

source_root

Base directory for SARIF artifact URIs.

verbose

Enable diagnostic output on stderr.

Value

The rendered report, as a single string.