Skip to content

Commit 92f5174

Browse files
committed
Add lintr
1 parent 877ac93 commit 92f5174

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

.lintr

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
linters: with_defaults(
2+
cyclocomp_linter = NULL,
3+
object_length_linter = NULL,
4+
object_name_linter = NULL,
5+
object_usage_linter = NULL)

R/utils_project.R

+2-5
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ project_set <- function(name) {
99
project_get <- function() {
1010
if (file.exists(project_path("_project"))) {
1111
readLines(project_path("_project"))
12-
} else {
13-
character(0)
1412
}
1513
}
1614

@@ -20,10 +18,9 @@ project_list <- function() {
2018

2119
project_create <- function(name) {
2220
name <- trimws(name)
23-
if (!project_valid(name)) {
24-
return()
21+
if (project_valid(name)) {
22+
dir_create(project_path(name))
2523
}
26-
dir_create(project_path(name))
2724
}
2825

2926
project_valid <- function(name) {

0 commit comments

Comments
 (0)