From bf6a65d048263e74c47ec7d2fc1f8e4bc5c0a4c0 Mon Sep 17 00:00:00 2001 From: Indrajeet Patil Date: Tue, 6 Dec 2022 10:27:33 +0100 Subject: [PATCH 1/7] Add document on how to get help --- .github/SUPPORT.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/SUPPORT.md diff --git a/.github/SUPPORT.md b/.github/SUPPORT.md new file mode 100644 index 000000000..b562b216a --- /dev/null +++ b/.github/SUPPORT.md @@ -0,0 +1,35 @@ +# Getting help with lintr + +Thanks for using lintr. Before filing an issue, there are a few places +to explore and pieces to put together to make the process as smooth as possible. + +Start by making a minimal **repr**oducible **ex**ample using the +[reprex](http://reprex.tidyverse.org/) package. If you haven't heard of or used +reprex before, you're in for a treat! Seriously, reprex will make all of your +R-question-asking endeavors easier (which is a pretty insane ROI for the five to +ten minutes it'll take you to learn what it's all about). For additional reprex +pointers, check out the [Get help!](https://www.tidyverse.org/help/) section of +the tidyverse site. + +Armed with your reprex, the next step is to figure out [where to ask](https://www.tidyverse.org/help/#where-to-ask). + + * If it's a question: start with [community.rstudio.com](https://community.rstudio.com/), + and/or StackOverflow. There are more people there to answer questions. + * If it's a bug: you're in the right place, file an issue. + * If you're not sure: let the community help you figure it out! If your + problem _is_ a bug or a feature request, you can easily return here and + report it. + +Before opening a new issue, be sure to [search issues and pull requests](https://github.com/tidyverse/lintr/issues) to make sure the +bug hasn't been reported and/or already fixed in the development version. By +default, the search will be pre-populated with `is:issue is:open`. You can +[edit the qualifiers](https://help.github.com/articles/searching-issues-and-pull-requests/) +(e.g. `is:pr`, `is:closed`) as needed. For example, you'd simply +remove `is:open` to search _all_ issues in the repo, open or closed. + + +If you _are_ in the right place, and need to file an issue, please review the +["File issues"](https://www.tidyverse.org/contribute/#issues) paragraph from +the tidyverse contributing guidelines. + +Thanks for your help! From 2bcc1528bb60e639c382c473e94f2f4a269c6c45 Mon Sep 17 00:00:00 2001 From: Indrajeet Patil Date: Fri, 9 Dec 2022 14:18:05 +0100 Subject: [PATCH 2/7] add review comments --- .github/SUPPORT.md | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/.github/SUPPORT.md b/.github/SUPPORT.md index b562b216a..a76741385 100644 --- a/.github/SUPPORT.md +++ b/.github/SUPPORT.md @@ -11,14 +11,31 @@ ten minutes it'll take you to learn what it's all about). For additional reprex pointers, check out the [Get help!](https://www.tidyverse.org/help/) section of the tidyverse site. +The most useful function to create reprexes for `{lintr}` issues is `lint()`. +You can include code that doesn't lint as expected with the linter in question. +For example, + +```r +lint( + text = "x = 1", + linters = assignment_linter() +) +``` + +If code in question contains characters that need to be escaped, consider using +raw strings instead. + Armed with your reprex, the next step is to figure out [where to ask](https://www.tidyverse.org/help/#where-to-ask). - * If it's a question: start with [community.rstudio.com](https://community.rstudio.com/), - and/or StackOverflow. There are more people there to answer questions. - * If it's a bug: you're in the right place, file an issue. - * If you're not sure: let the community help you figure it out! If your - problem _is_ a bug or a feature request, you can easily return here and - report it. +If it's a clarification question (e.g. you don't know how to exclude certain +files from lint workflow), start with [community.rstudio.com](https://community.rstudio.com/), +and/or StackOverflow. There are more people there to answer questions. + +If it's a bug, you can create an issue with a reprex. + +If it's a false positive or false negative lint, you can either create an issue +with a reprex in `{lintr}` repository, or discuss the underlying style guide +itself in the respective [repository](https://github.com/tidyverse/style/issues/). Before opening a new issue, be sure to [search issues and pull requests](https://github.com/tidyverse/lintr/issues) to make sure the bug hasn't been reported and/or already fixed in the development version. By From 9b7e8e5b0bc3c0b000978507ad38f53aef9ec87a Mon Sep 17 00:00:00 2001 From: Indrajeet Patil Date: Fri, 9 Dec 2022 19:53:32 +0100 Subject: [PATCH 3/7] address review comments --- .github/SUPPORT.md | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/.github/SUPPORT.md b/.github/SUPPORT.md index a76741385..420bfdf9f 100644 --- a/.github/SUPPORT.md +++ b/.github/SUPPORT.md @@ -16,7 +16,7 @@ You can include code that doesn't lint as expected with the linter in question. For example, ```r -lint( +lintr::lint( text = "x = 1", linters = assignment_linter() ) @@ -34,19 +34,16 @@ and/or StackOverflow. There are more people there to answer questions. If it's a bug, you can create an issue with a reprex. If it's a false positive or false negative lint, you can either create an issue -with a reprex in `{lintr}` repository, or discuss the underlying style guide -itself in the respective [repository](https://github.com/tidyverse/style/issues/). +with a reprex in `{lintr}` repository, or discuss the underlying +[style guide](https://style.tidyverse.org/) itself in the respective +[repository](https://github.com/tidyverse/style/issues/). -Before opening a new issue, be sure to [search issues and pull requests](https://github.com/tidyverse/lintr/issues) to make sure the -bug hasn't been reported and/or already fixed in the development version. By +Before opening a new issue, be sure to +[search issues and pull requests](https://github.com/r-lib/lintr/issues/) to make +sure the bug hasn't been reported and/or already fixed in the development version. By default, the search will be pre-populated with `is:issue is:open`. You can [edit the qualifiers](https://help.github.com/articles/searching-issues-and-pull-requests/) (e.g. `is:pr`, `is:closed`) as needed. For example, you'd simply remove `is:open` to search _all_ issues in the repo, open or closed. - -If you _are_ in the right place, and need to file an issue, please review the -["File issues"](https://www.tidyverse.org/contribute/#issues) paragraph from -the tidyverse contributing guidelines. - Thanks for your help! From 2e5a551c64c5975418de1d7e6225017636506c62 Mon Sep 17 00:00:00 2001 From: Indrajeet Patil Date: Sat, 10 Dec 2022 11:59:02 +0100 Subject: [PATCH 4/7] load the library instead --- .github/SUPPORT.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/SUPPORT.md b/.github/SUPPORT.md index 420bfdf9f..bcd176fb9 100644 --- a/.github/SUPPORT.md +++ b/.github/SUPPORT.md @@ -16,7 +16,9 @@ You can include code that doesn't lint as expected with the linter in question. For example, ```r -lintr::lint( +library(lintr) + +lint( text = "x = 1", linters = assignment_linter() ) From a7dca01609e5366924f6944fc627436414603b39 Mon Sep 17 00:00:00 2001 From: Michael Chirico Date: Tue, 20 Dec 2022 10:24:35 -0800 Subject: [PATCH 5/7] Update SUPPORT.md --- .github/SUPPORT.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/SUPPORT.md b/.github/SUPPORT.md index bcd176fb9..ab259eb7e 100644 --- a/.github/SUPPORT.md +++ b/.github/SUPPORT.md @@ -25,7 +25,7 @@ lint( ``` If code in question contains characters that need to be escaped, consider using -raw strings instead. +raw strings instead to save yourself some headache figuring out the multiple levels of escapes. Armed with your reprex, the next step is to figure out [where to ask](https://www.tidyverse.org/help/#where-to-ask). From 5a23ba830943bece5fdc85bb62ae81885f138d24 Mon Sep 17 00:00:00 2001 From: Indrajeet Patil Date: Fri, 23 Dec 2022 17:49:17 +0100 Subject: [PATCH 6/7] Add section headers; trim down reprex section --- .github/SUPPORT.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/SUPPORT.md b/.github/SUPPORT.md index ab259eb7e..7422c1c75 100644 --- a/.github/SUPPORT.md +++ b/.github/SUPPORT.md @@ -3,12 +3,11 @@ Thanks for using lintr. Before filing an issue, there are a few places to explore and pieces to put together to make the process as smooth as possible. +## Reproducible example + Start by making a minimal **repr**oducible **ex**ample using the -[reprex](http://reprex.tidyverse.org/) package. If you haven't heard of or used -reprex before, you're in for a treat! Seriously, reprex will make all of your -R-question-asking endeavors easier (which is a pretty insane ROI for the five to -ten minutes it'll take you to learn what it's all about). For additional reprex -pointers, check out the [Get help!](https://www.tidyverse.org/help/) section of +[reprex](http://reprex.tidyverse.org/) package. For how to use reprex effectivly, +check out the [Get help!](https://www.tidyverse.org/help/) section of the tidyverse site. The most useful function to create reprexes for `{lintr}` issues is `lint()`. @@ -27,12 +26,16 @@ lint( If code in question contains characters that need to be escaped, consider using raw strings instead to save yourself some headache figuring out the multiple levels of escapes. +## Asking for help + Armed with your reprex, the next step is to figure out [where to ask](https://www.tidyverse.org/help/#where-to-ask). If it's a clarification question (e.g. you don't know how to exclude certain files from lint workflow), start with [community.rstudio.com](https://community.rstudio.com/), and/or StackOverflow. There are more people there to answer questions. +## Filing an issue + If it's a bug, you can create an issue with a reprex. If it's a false positive or false negative lint, you can either create an issue From 95f6d073304208bd2790013882db983807cfd9ca Mon Sep 17 00:00:00 2001 From: Indrajeet Patil Date: Fri, 23 Dec 2022 19:33:40 +0100 Subject: [PATCH 7/7] change section header to be consistent --- .github/SUPPORT.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/SUPPORT.md b/.github/SUPPORT.md index 7422c1c75..0e68e4a60 100644 --- a/.github/SUPPORT.md +++ b/.github/SUPPORT.md @@ -3,7 +3,7 @@ Thanks for using lintr. Before filing an issue, there are a few places to explore and pieces to put together to make the process as smooth as possible. -## Reproducible example +## Making a reproducible example Start by making a minimal **repr**oducible **ex**ample using the [reprex](http://reprex.tidyverse.org/) package. For how to use reprex effectivly,