Skip to content

Commit 0ec3122

Browse files
Address feedback from reviewer-2 (#2683)
* Address feedback from reviewer-2 * Create CONTRIBUTING.md * Add a note about avoiding 'main' * Update .github/CONTRIBUTING.md Co-authored-by: Michael Chirico <[email protected]> * Update .github/CONTRIBUTING.md Co-authored-by: Michael Chirico <[email protected]> * Remove unnecessary newlines in contributing.md * add cite to wiki page on linting * emphasize why 'Fixes #' in description * Add note about extended Descriptions when needed, and hint at chains. * clarify the audience of NEWS entries * tweak --------- Co-authored-by: Michael Chirico <[email protected]>
1 parent b7cd0f6 commit 0ec3122

File tree

4 files changed

+69
-19
lines changed

4 files changed

+69
-19
lines changed

.github/CONTRIBUTING.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Contributing to `{lintr}`
2+
3+
This outlines how to propose a change to `{lintr}`. For a detailed discussion on contributing to this, r-lib, and other tidyverse packages, please see the [development contributing guide](https://rstd.io/tidy-contrib) and our [code review principles](https://code-review.tidyverse.org/).
4+
5+
## Fixing typos
6+
7+
You can fix typos, spelling mistakes, or grammatical errors in the documentation directly using the GitHub web interface, as long as the changes are made in the _source_ file. This generally means you'll need to edit [roxygen2 comments](https://roxygen2.r-lib.org/articles/roxygen2.html) in an `.R`, not a `.Rd` file. You can find the `.R` file that generates the `.Rd` by reading the comment in the first line.
8+
9+
## Bigger changes
10+
11+
If you want to make a bigger change, it's a good idea to first file an issue and make sure someone from the team agrees that it’s needed. If you’ve found a bug, please file an issue that illustrates the bug with a minimal [reprex](https://www.tidyverse.org/help/#reprex) (this will also help you write a unit test, if needed). See the tidyverse guide on [how to create a great issue](https://code-review.tidyverse.org/issues/) for more advice.
12+
13+
### Adding a new linter
14+
15+
If you wish to contribute a new linter, the [Creating new linters](https://lintr.r-lib.org/articles/creating_linters.html) article serves as a comprehensive guide.
16+
17+
### Pull request process
18+
19+
* Fork the package and clone onto your computer. If you haven't done this before, we recommend using `usethis::create_from_github("r-lib/lintr", fork = TRUE)`.
20+
21+
* Install all development dependencies with `devtools::install_dev_deps()`, and then make sure the package passes R CMD check by running `devtools::check()`. If R CMD check doesn't pass cleanly, it's a good idea to ask for help before continuing.
22+
23+
* Create a Git branch for your pull request (PR). We recommend using `usethis::pr_init("brief-description-of-change")`. At a minimum, please avoid submitting PRs from your fork's `main` branch` as this can make the review process more complicated.
24+
25+
* Make your changes, commit them to Git, and create a PR using `usethis::pr_push()`. Follow the prompts in your browser to complete the process. Use a concise title for your PR that summarizes the change, and include `Fixes #issue-number` in the PR _description_. Doing so will automatically close the linked issue when the PR is merged. For complicated changes, add a textual overview of what your PR does in the description. Consider breaking up large PRs into a chain of more digestible+focused smaller PRs.
26+
27+
* For user-facing changes, add a bullet appropriately in the top section of `NEWS.md` (i.e. below the first header). Follow the style described in <https://style.tidyverse.org/news.html>. Most importantly, your audience for NEWS items is a package user, i.e., _not_ a package developer.
28+
29+
### Code style
30+
31+
* New code should follow the tidyverse [style guide](https://style.tidyverse.org). You can use the [styler](https://CRAN.R-project.org/package=styler) package to apply these styles.
32+
33+
* We use [roxygen2](https://cran.r-project.org/package=roxygen2), with [Markdown syntax](https://cran.r-project.org/web/packages/roxygen2/vignettes/rd-formatting.html), for documentation.
34+
35+
* We use [testthat](https://cran.r-project.org/package=testthat) for unit tests. Contributions with test cases included are easier to accept.
36+
37+
## Code of Conduct
38+
39+
Please note that the lintr project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By contributing to this project you agree to abide by its terms.

paper/paper.Rmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ withr::local_options(list(
6666

6767
# Statement of Need
6868

69-
A linter is a tool that analyzes code to identify potential errors, stylistic issues, or deviations from coding standards. It helps ensure consistency, readability, and best practices by flagging common mistakes, such as syntax errors, unused variables, or improper formatting. Linters are essential for improving code quality, preventing bugs, and maintaining a clean codebase, especially in collaborative development environments [@enwiki:1218663830]. `{lintr}` is an open-source package that provides linters for the R programming language, which is an interpreted, dynamically-typed programming language [@base2023], and is used by a wide range of researchers and data scientists. `{lintr}` can thus act as a valuable tool for R users to help improve the quality and reliability of their code.
69+
In computer programming, "linting" is the process of analyzing the source code to identify possible programming and stylistic problems [@enwiki:1260589258] and a linter is a tool used for linting. A linter analyzes code to identify potential errors, stylistic issues, or deviations from coding standards. It helps ensure consistency, readability, and best practices by flagging common mistakes, such as syntax errors, unused variables, or improper formatting. Linters are essential for improving code quality, preventing bugs, and maintaining a clean codebase, especially in collaborative development environments [@enwiki:1218663830]. `{lintr}` is an open-source package that provides linters for the R programming language, which is an interpreted, dynamically-typed programming language [@base2023], and is used by a wide range of researchers and data scientists. `{lintr}` can thus act as a valuable tool for R users to help improve the quality and reliability of their code.
7070

7171
# Features
7272

@@ -80,7 +80,7 @@ library(lintr)
8080
length(all_linters())
8181
```
8282

83-
Naturally, we can't discuss all of them here. To see details about all available linters, we encourage readers to see <https://lintr.r-lib.org/dev/reference/index.html#individual-linters>.
83+
Naturally, we can't discuss all of them here. To see the most up-to-date details about all the available linters, we encourage readers to visit <https://lintr.r-lib.org/dev/reference/index.html#individual-linters>.
8484

8585
We will showcase one linter for each kind of common problem found in R code.
8686

paper/paper.bib

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,20 @@ @book{mcconnell2004code
3232
publisher={Pearson Education}
3333
}
3434

35-
@misc{ enwiki:1218663830,
35+
@misc{enwiki:1218663830,
3636
author = "{Wikipedia contributors}",
3737
title = "Static program analysis --- {Wikipedia}{,} The Free Encyclopedia",
3838
year = "2024",
3939
url = "https://en.wikipedia.org/w/index.php?title=Static_program_analysis&oldid=1218663830",
40-
note = "[Online; accessed 7-May-2024]"
40+
note = "[Online; accessed 2-December-2024]"
41+
}
42+
43+
@misc{enwiki:1260589258,
44+
author = "{Wikipedia contributors}",
45+
title = "Lint (software) --- {Wikipedia}{,} The Free Encyclopedia",
46+
year = "2024",
47+
url = "https://en.wikipedia.org/w/index.php?title=Lint_(software)&oldid=1260589258",
48+
note = "[Online; accessed 2-December-2024]"
4149
}
4250

4351
@Manual{Tierney2024,

paper/paper.md

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "Static Code Analysis for R"
3-
date: "2024-11-28"
3+
date: "2024-12-02"
44
tags: ["R", "linter", "tidyverse"]
55
authors:
66
- name: Jim Hester
@@ -51,18 +51,21 @@ link-citations: true
5151

5252
# Statement of Need
5353

54-
A linter is a tool that analyzes code to identify potential errors,
55-
stylistic issues, or deviations from coding standards. It helps ensure
56-
consistency, readability, and best practices by flagging common
57-
mistakes, such as syntax errors, unused variables, or improper
58-
formatting. Linters are essential for improving code quality, preventing
59-
bugs, and maintaining a clean codebase, especially in collaborative
60-
development environments [@enwiki:1218663830]. `{lintr}` is an
61-
open-source package that provides linters for the R programming
62-
language, which is an interpreted, dynamically-typed programming
63-
language [@base2023], and is used by a wide range of researchers and
64-
data scientists. `{lintr}` can thus act as a valuable tool for R users
65-
to help improve the quality and reliability of their code.
54+
In computer programming, "linting" is the process of analyzing the
55+
source code to identify possible programming and stylistic problems
56+
[@enwiki:1260589258] and a linter is a tool used for linting. A linter
57+
analyzes code to identify potential errors, stylistic issues, or
58+
deviations from coding standards. It helps ensure consistency,
59+
readability, and best practices by flagging common mistakes, such as
60+
syntax errors, unused variables, or improper formatting. Linters are
61+
essential for improving code quality, preventing bugs, and maintaining a
62+
clean codebase, especially in collaborative development environments
63+
[@enwiki:1218663830]. `{lintr}` is an open-source package that provides
64+
linters for the R programming language, which is an interpreted,
65+
dynamically-typed programming language [@base2023], and is used by a
66+
wide range of researchers and data scientists. `{lintr}` can thus act as
67+
a valuable tool for R users to help improve the quality and reliability
68+
of their code.
6669

6770
# Features
6871

@@ -86,8 +89,8 @@ length(all_linters())
8689
#> [1] 113
8790
```
8891

89-
Naturally, we can't discuss all of them here. To see details about all
90-
available linters, we encourage readers to see
92+
Naturally, we can't discuss all of them here. To see the most up-to-date
93+
details about all the available linters, we encourage readers to visit
9194
<https://lintr.r-lib.org/dev/reference/index.html#individual-linters>.
9295

9396
We will showcase one linter for each kind of common problem found in R

0 commit comments

Comments
 (0)