Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
lintr (#5)
* lintr: trailing_blank_lines_linter and no_tab_lintr * lintr. trailing white space * lintr. commas_linter * infix_spaces_linter * line_length_linter(100) * single_quotes_linter * fix merge lints * assignment_linter * closed_curly_linter and open_curly_linter * errant u * start paren lints * cleaned up .lintr file * add lintr to post success travis * documented * fix broken checks
- Loading branch information
Showing
84 changed files
with
1,208 additions
and
1,151 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,8 @@ | ||
linters: with_defaults( | ||
camel_case_linter = NULL, # 873 | ||
single_quotes_linter = NULL, # 541 | ||
infix_spaces_linter = NULL, # 377 | ||
assignment_linter = NULL, # 266 | ||
line_length_linter = NULL, # 168 | ||
commas_linter = NULL, # 164 | ||
spaces_left_parentheses_linter = NULL, # 41 | ||
trailing_whitespace_linter = NULL, # 40 | ||
commented_code_linter = NULL, # 30 | ||
closed_curly_linter = NULL, # 25 | ||
object_usage_linter = NULL, # 18 | ||
open_curly_linter = NULL, # 15 | ||
trailing_blank_lines_linter = NULL, # 5 | ||
no_tab_linter = NULL, # 4 | ||
camel_case_linter = NULL, | ||
line_length_linter = NULL, # line_length_linter(100), | ||
commented_code_linter = NULL, | ||
object_usage_linter = NULL, | ||
NULL | ||
) | ||
exclusions: list() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,33 @@ | ||
#' @param html the content of the control. May be provided as string or as HTML | ||
#' generated with Shiny/htmltools tags | ||
#' @param position position of control: 'topleft', 'topright', 'bottomleft', or | ||
#' 'bottomright' | ||
#' @param position position of control: "topleft", "topright", "bottomleft", or | ||
#' "bottomright" | ||
#' @param className extra CSS classes to append to the control, space separated | ||
#' | ||
#' @describeIn map-layers Add arbitrary HTML controls to the map | ||
#' @export | ||
addControl <- function( | ||
map, html, position = c('topleft', 'topright', 'bottomleft', 'bottomright'), | ||
map, html, position = c("topleft", "topright", "bottomleft", "bottomright"), | ||
layerId = NULL, className = "info legend", data = getMapData(map) | ||
) { | ||
|
||
position = match.arg(position) | ||
position <- match.arg(position) | ||
|
||
deps = htmltools::resolveDependencies(htmltools::findDependencies(html)) | ||
html = as.character(html) | ||
deps <- htmltools::resolveDependencies(htmltools::findDependencies(html)) | ||
html <- as.character(html) | ||
|
||
map$dependencies = c(map$dependencies, deps) | ||
invokeMethod(map, data, 'addControl', html, position, layerId, className) | ||
map$dependencies <- c(map$dependencies, deps) | ||
invokeMethod(map, data, "addControl", html, position, layerId, className) | ||
} | ||
|
||
#' @export | ||
#' @rdname remove | ||
removeControl <- function(map, layerId) { | ||
invokeMethod(map, NULL, 'removeControl', layerId) | ||
invokeMethod(map, NULL, "removeControl", layerId) | ||
} | ||
|
||
#' @export | ||
#' @rdname remove | ||
clearControls <- function(map) { | ||
invokeMethod(map, NULL, 'clearControls') | ||
invokeMethod(map, NULL, "clearControls") | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.