Skip to content

Commit

Permalink
configuration in .lintr file
Browse files Browse the repository at this point in the history
  • Loading branch information
Kirill Müller committed Apr 8, 2015
1 parent 30b7c9c commit edcd482
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 27 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ man-roxygen
NEWS\.md
^cran-comments\.md$
^revdep$
^\.lintr$
9 changes: 9 additions & 0 deletions .lintr
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
linters: with_defaults(
"single_quotes_linter" = NULL, # 52
"camel_case_linter" = NULL, # 36
"line_length_linter" = NULL, # 26
"infix_spaces_linter" = NULL, # 24
"spaces_left_parentheses_linter" = NULL, # 20
"closed_curly_linter" = NULL, # 10
"open_curly_linter" = NULL # 9
)
13 changes: 1 addition & 12 deletions lint.R
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
library(magrittr)
exclude_linters <- c(
"single_quotes_linter", # 52
"camel_case_linter", # 36
"line_length_linter", # 26
"infix_spaces_linter", # 24
"spaces_left_parentheses_linter", # 20
"closed_curly_linter", # 10
"open_curly_linter" # 9
)

exclude_linter_indexes <- match(exclude_linters, names(lintr::default_linters))

l <- lintr::lint_package(linters=lintr::default_linters[-exclude_linter_indexes])
l <- lintr::lint_package()
l %>%
as.data.frame %>%
mutate(linter = gsub("'[^']*'", "''", message)) %>%
Expand Down
26 changes: 11 additions & 15 deletions lint.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,8 @@

```r
library(magrittr)
exclude_linters <- c(
"single_quotes_linter", # 52
"camel_case_linter", # 36
"line_length_linter", # 26
"infix_spaces_linter", # 24
"spaces_left_parentheses_linter", # 20
"closed_curly_linter", # 10
"open_curly_linter" # 9
)

exclude_linter_indexes <- match(exclude_linters, names(lintr::default_linters))

l <- lintr::lint_package(linters=lintr::default_linters[-exclude_linter_indexes])

l <- lintr::lint_package()
```

```
Expand All @@ -32,10 +21,17 @@ l %>%



|linter | freq|
|:------|----:|
|linter | freq|
|:-------------------------------------|----:|
|Trailing blank lines are superfluous. | 1|

```r
l
```

```
## R/RcppExports.R:36:1: style: Trailing blank lines are superfluous.
##
## ^
```

0 comments on commit edcd482

Please sign in to comment.