Skip to content

Commit

Permalink
Version from 2.0.1.9001 to 3.0.0 (#836)
Browse files Browse the repository at this point in the history
* change deprecated versions from 2.0.1.9001 to 3.0.0

fixes #835

* typo in NEWS (#1367)

* Rename old master branch to main in .dev/compare_branches (#1372)

* Deprecate find col (#1374)

* first pass -- scorched earth

* deprecate instead

* whitespace

* NEWS

Co-authored-by: AshesITR <[email protected]>

* Another round of NEWS polishing (#1370)

* add reasoning to "return" removal

* mention old argument still works

* combine+clarify some brace_linter items, add attributions

* consistent capitalization, clarifications

* finish pass for consistent capitalizatoin

* grammar

* move object_name bullet with others; clarify cyclocomp bullet

* mention CRAN policy re: cache directory

* more consistently reference only the issue (not PR) #s

* consistent capitalization in my GH username

* missing item for any_duplicated_linter

* improve description of system_file_linter

* clarify strings_as_factors_linter, more grammar

* more quantification of package speed-ups; more clarirfication

* more removing redundant issue references; reorg bullet for get_source_expressions

* clarification, remove redundant issue refs

* move another object_name_linter bullet up

* move extraction_operator item to "features" not bugs

* trailing whitespace

* trailing whitespace

* feedback

* lead with Deprecated

* wording for object_usage

* de-lint (#1378)

* de-lint

* tidyverse style, missing space

Co-authored-by: Michael Chirico <[email protected]>

* add tag "executing" to linters that call eval() or loadNamespace() on arbitrary input (#1383)

* benchmarking in .dev/compare_branches (#1375)

* skeleton for new --benchmark parameter

* incredibly hacky (but working on main at least) tracing approach

* Rename old master branch to main in .dev/compare_branches

* tweaks

* run .Last() even interactively

* debugging complete! works on main

* handle --branch=$TAG

* help mentions tag; git_branch_checkout doesnt work

* need to git reset

* robustly get linter call

* cant rely on ~recent internal helper for encoding

* remove remotes from temp repo

* handle odd case of line_length_linter, muffle newline warnings

* warn with tag names, not hashes

* implement _all_ option for linters, skip more noisy warnings

* fix default handling; simplify encoding test; correct branch-specific timings

* combine timings, save output

* save in wide format instead

* comment

* correct message

* add a TODO

* sum timing across expressions in output

* correct data.table imports

* refactor: use more helpers

* consolidate more

* another helper

* more refactoring... pray this works

* tweaks go get working

* correct handling of timing output

* add a TODO

* clarify TODO

* correct data.table imports again

* more nesting!

* one more helper

* remove debugger

* simplify warning message match

Co-authored-by: AshesITR <[email protected]>

* Polish news (#1384)

* consistent formatting

* sort bullets alphabetically

* add `allow_trailing = FALSE` to `missing_argument_linter()` (#1385)

* update deprecations

* usethis::use_version("major")

* update reference checkstyle.xml

Co-authored-by: Michael Chirico <[email protected]>
Co-authored-by: Michael Chirico <[email protected]>
Co-authored-by: Jim Hester <[email protected]>
  • Loading branch information
4 people authored Jun 13, 2022
1 parent df28b66 commit a9a6e34
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: lintr
Title: A 'Linter' for R Code
Version: 2.0.1.9000
Version: 3.0.0
Authors@R: c(
person("Jim", "Hester", email = "[email protected]", role = c("aut", "cre")),
person("Florent", "Angly", role = "aut"),
Expand Down
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# lintr (development version)
# lintr 3.0.0

## Breaking changes

Expand Down
2 changes: 1 addition & 1 deletion R/closed_curly_linter.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#' <https://style.tidyverse.org/syntax.html#indenting>
#' @export
closed_curly_linter <- function(allow_single_line = FALSE) {
lintr_deprecated("closed_curly_linter", new = "brace_linter", version = "2.0.1.9001", type = "Linter")
lintr_deprecated("closed_curly_linter", new = "brace_linter", version = "3.0.0", type = "Linter")
xp_cond_closed <- xp_and(c(
# matching { is on same line
if (isTRUE(allow_single_line)) {
Expand Down
2 changes: 1 addition & 1 deletion R/ids_with_token.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#' @export
ids_with_token <- function(source_expression, value, fun = `==`, source_file) {
if (!missing(source_file)) {
lintr_deprecated(old = "source_file", new = "source_expression", version = "2.0.1.9001", type = "Argument")
lintr_deprecated(old = "source_file", new = "source_expression", version = "3.0.0", type = "Argument")
source_expression <- source_file
}
if (!is_lint_level(source_expression, "expression")) {
Expand Down
6 changes: 3 additions & 3 deletions R/lint.R
Original file line number Diff line number Diff line change
Expand Up @@ -329,13 +329,13 @@ validate_linter_object <- function(linter, name) {
if (is_linter_factory(linter)) {
old <- "Passing linters as variables"
new <- "a call to the linters (see ?linters)"
lintr_deprecated(old = old, new = new, version = "2.0.1.9001",
lintr_deprecated(old = old, new = new, version = "3.0.0",
type = "")
linter <- linter()
} else {
old <- "The use of linters of class 'function'"
new <- "linters classed as 'linter' (see ?Linter)"
lintr_deprecated(old = old, new = new, version = "2.0.1.9001",
lintr_deprecated(old = old, new = new, version = "3.0.0",
type = "")
linter <- Linter(linter, name = name)
}
Expand Down Expand Up @@ -449,7 +449,7 @@ Lint <- function(filename, line_number = 1L, column_number = 1L, # nolint: objec
if (!missing(linter)) {
lintr_deprecated(
old = "Using the `linter` argument of `Lint()`",
version = "2.0.1.9001",
version = "3.0.0",
type = ""
)
}
Expand Down
2 changes: 1 addition & 1 deletion R/open_curly_linter.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#' <https://style.tidyverse.org/syntax.html#indenting>
#' @export
open_curly_linter <- function(allow_single_line = FALSE) {
lintr_deprecated("open_curly_linter", new = "brace_linter", version = "2.0.1.9001", type = "Linter")
lintr_deprecated("open_curly_linter", new = "brace_linter", version = "3.0.0", type = "Linter")

xpath_before <- "//OP-LEFT-BRACE[
not(following-sibling::expr[1][OP-LEFT-BRACE])
Expand Down
2 changes: 1 addition & 1 deletion R/paren_brace_linter.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#' @seealso [linters] for a complete list of linters available in lintr.
#' @export
paren_brace_linter <- function() {
lintr_deprecated("paren_brace_linter", new = "brace_linter", version = "2.0.1.9001", type = "Linter")
lintr_deprecated("paren_brace_linter", new = "brace_linter", version = "3.0.0", type = "Linter")

xpath <- paste(
"//OP-LEFT-BRACE[",
Expand Down
2 changes: 1 addition & 1 deletion R/semicolon_linter.R
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ semicolon_terminator_linter <- function(semicolon = c("compound", "trailing")) {
lintr_deprecated(
old = "semicolon_terminator_linter",
new = "semicolon_linter",
version = "2.0.1.9001",
version = "3.0.0",
type = "Linter"
)
semicolon <- match.arg(semicolon, several.ok = TRUE)
Expand Down
2 changes: 1 addition & 1 deletion R/with.R
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ linters_with_defaults <- function(..., defaults = default_linters) {
#' @rdname linters_with_defaults
#' @export
with_defaults <- function(..., default = default_linters) {
lintr_deprecated("with_defaults", "linters_with_defaults", "2.0.9001")
lintr_deprecated("with_defaults", "linters_with_defaults", "3.0.0")
# to ease the burden of transition -- default = NULL used to behave like defaults = list() now does
if (is.null(default)) default <- list()
linters_with_defaults(..., defaults = default)
Expand Down
2 changes: 1 addition & 1 deletion R/with_id.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#' @export
with_id <- function(source_expression, id, source_file) {
if (!missing(source_file)) {
lintr_deprecated(old = "source_file", new = "source_expression", version = "2.0.1.9001", type = "Argument")
lintr_deprecated(old = "source_file", new = "source_expression", version = "3.0.0", type = "Argument")
source_expression <- source_file
}
if (!is_lint_level(source_expression, "expression")) {
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/checkstyle.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<checkstyle version="lintr-2.0.1.9000">
<checkstyle version="lintr-3.0.0">
<file name="test_file">
<error line="1" column="2" severity="error" message="foo"/>
<error line="2" column="1" severity="info" message="bar"/>
Expand Down

0 comments on commit a9a6e34

Please sign in to comment.