1
1
---
2
2
title : " Static Code Analysis for R"
3
- date : " 2024-06-21 "
3
+ date : " 2024-09-05 "
4
4
tags : ["R", "linter", "tidyverse"]
5
5
authors :
6
6
- name : Jim Hester
7
7
affiliation : 1
8
8
orcid : 0000-0002-2739-7082
9
9
- name : Florent Angly
10
- affiliation : ~
11
- orcid : ~
10
+ affiliation : 6
11
+ orcid : 0000-0002-8999-0738
12
12
- name : Michael Chirico
13
13
affiliation : 2
14
14
orcid : 0000-0003-0787-087X
15
15
- name : Russ Hyde
16
16
affiliation : 5
17
17
orcid : ~
18
18
- name : Ren Kun
19
- affiliation : ~
19
+ affiliation : 7
20
20
orcid : ~
21
21
- name : Indrajeet Patil
22
22
orcid : 0000-0003-1995-6531
@@ -35,6 +35,10 @@ affiliations:
35
35
name : Preisenergie GmbH, Munich, Germany
36
36
- index : 5
37
37
name : Jumping Rivers
38
+ - index : 6
39
+ name : The University of Queensland
40
+ - index : 7
41
+ name : Unknown
38
42
output :
39
43
md_document :
40
44
variant : " markdown"
@@ -106,6 +110,7 @@ lint(
106
110
text = " x >= 2.5" ,
107
111
linters = redundant_ifelse_linter()
108
112
)
113
+ # > ℹ No lints found.
109
114
```
110
115
111
116
- ** Efficiency**
@@ -138,6 +143,7 @@ lint(
138
143
text = " anyNA(x)" ,
139
144
linters = any_is_na_linter()
140
145
)
146
+ # > ℹ No lints found.
141
147
```
142
148
143
149
- ** Readability**
@@ -170,6 +176,7 @@ lint(
170
176
text = " x != 2" ,
171
177
linters = comparison_negation_linter()
172
178
)
179
+ # > ℹ No lints found.
173
180
```
174
181
175
182
- ** Tidyverse style**
@@ -197,6 +204,7 @@ lint(
197
204
text = " my_var <- 1L" ,
198
205
linters = object_name_linter()
199
206
)
207
+ # > ℹ No lints found.
200
208
```
201
209
202
210
- ** Common mistakes**
@@ -247,9 +255,6 @@ l <- list(x = TRUE, x = FALSE)
247
255
l [" x" ]
248
256
# > $x
249
257
# > [1] TRUE
250
- ```
251
-
252
- ``` r
253
258
l [names(l ) == " x" ]
254
259
# > $x
255
260
# > [1] TRUE
@@ -273,6 +278,7 @@ lint(
273
278
text = " my.var <- 1L" ,
274
279
linters = object_name_linter(styles = " dotted.case" )
275
280
)
281
+ # > ℹ No lints found.
276
282
```
277
283
278
284
- Create new linters (by leveraging functions like
0 commit comments