Skip to content

add use_lintr() - #1120

Merged
MichaelChirico merged 13 commits into
feature/with_defaults-refactorfrom
feature/generate-dot-lintr
May 11, 2022
Merged

MichaelChirico merged 13 commits into
feature/with_defaults-refactorfrom
feature/generate-dot-lintr

Conversation

@AshesITR

@AshesITR AshesITR commented May 2, 2022

Copy link
Copy Markdown
Collaborator

Fixes #902

Currenty, one of two minimal configuration files can be generated.
LMK what you think.

@AshesITR

AshesITR commented May 2, 2022

Copy link
Copy Markdown
Collaborator Author

Based against #1117 for now, so the documentation links won't need updating.

@AshesITR
AshesITR changed the base branch from master to feature/with_defaults-refactor May 2, 2022 13:21
@MichaelChirico

Copy link
Copy Markdown
Collaborator

should we add this to usethis? or at least offer to

@AshesITR AshesITR mentioned this pull request May 2, 2022
@AshesITR

AshesITR commented May 2, 2022

Copy link
Copy Markdown
Collaborator Author

They don't want it: r-lib/usethis#1580

@MichaelChirico MichaelChirico left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks! mostly minor stuff

Comment thread R/use_lintr.R Resolved
Comment thread R/use_lintr.R Resolved
Comment thread R/use_lintr.R Resolved
Comment thread R/use_lintr.R Resolved
Comment thread R/use_lintr.R Resolved
Comment thread tests/testthat/test-use_lintr.R Resolved
@AshesITR
AshesITR changed the base branch from feature/with_defaults-refactor to master May 8, 2022 06:22
@AshesITR

AshesITR commented May 8, 2022

Copy link
Copy Markdown
Collaborator Author

The failure on test-coverage is something I saw locally as well, but the message "produced warnings" is super unhelpful.
I couldn't find out what warning was being generated. Any idea?

Failure on devel is related to updates to parser error messages. Will create an issue for that.

@AshesITR
AshesITR changed the base branch from master to feature/with_defaults-refactor May 8, 2022 06:36
@AshesITR

AshesITR commented May 8, 2022

Copy link
Copy Markdown
Collaborator Author

Found the test-coverage problem: write.dcf() introduces line breaks at arbitrary places if width is reached.
Thus, it put a line break between # see and vignette("using_lintr"), causing the latter to be evaluated and produce the warning (vignette not found) during read_settings().

@MichaelChirico
MichaelChirico merged commit aeafe01 into feature/with_defaults-refactor May 11, 2022
@MichaelChirico
MichaelChirico deleted the feature/generate-dot-lintr branch May 11, 2022 21:28
@MichaelChirico

Copy link
Copy Markdown
Collaborator

oh, just noticed this merged into a branch? was that intentional @AshesITR 🤔

@AshesITR

Copy link
Copy Markdown
Collaborator Author

Based against #1117 for now, so the documentation links won't need updating.

😃

MichaelChirico added a commit that referenced this pull request May 16, 2022
* deprecate with_defaults -> linters_with_defaults

 - rename the core function to modify_defaults
 - add deprecation test for with_defaults()
 - update documentation to refer to linters_with_defaults() instead of with_defaults() where appropriate.

* add use_lintr() (#1120)

* add use_lintr()

* document `type`

* add tests, fix minor issues

* normalize both paths in test

* add more comments to DCF file

* test type = "full" as well

* reference use_lintr() in vignette and fix broken code

* avoid \"

* incorporate feedback

* document()

* reference vignette

* split expect_silent() tests and prevent unintentional line breaks

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

* implicit->explicit integers

* tidyverse style long lines

* rename `default` to `defaults` in new functions

* document `default` as well

Co-authored-by: Michael Chirico <[email protected]>
Co-authored-by: Michael Chirico <[email protected]>
@eitsupi eitsupi mentioned this pull request May 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feature request] generate a ".lintr" file function

2 participants