forked from sambrightman/shellcheckr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
48 lines (34 loc) · 1.45 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# shellcheckr
<!-- badges: start -->
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#experimental)
[![R build status](https://github.com/sambrightman/shellcheckr/workflows/R-CMD-check/badge.svg)](https://github.com/sambrightman/shellcheckr/actions)
<!-- badges: end -->
`shellcheckr` allows you to run [`shellcheck`](https://www.shellcheck.net/) manually or as an [addin](https://rstudio.github.io/rstudioaddins/) when editing shell scripts in RStudio.
## Installation
You can install the released version of `shellcheckr` from [CRAN](https://CRAN.R-project.org) with:
``` r
install.packages("shellcheckr")
```
**NOTE** you must have `shellcheck` in your `$PATH`.
## Example
Normally you would run `shellcheckr` from the *Addins->ShellCheck* toolbar menu item:
![Addin menu item](man/figures/addin-menu-item.png)
![Markers](man/figures/markers.png)
*Tools->Modify Keyboard Shortcuts* on the main menu can be used to make a keyboard shortcut for it. You can also call it manually:
```{r example, eval = FALSE}
library(shellcheckr)
shellcheckr('~/.bashrc') # raw JSON output
shellcheckrMarkers('~/.bashrc') # markers with wiki links
```