-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Control color via an environment variable #126
Conversation
Thanks! I think we can simplify this, and get rid of the env var. rcmdcheck would just use the regular crayon color detection, plus it would turn it on for GHA (for itself only). Then it would turn color off for the checked package explicitly, in a similar way that testthat creates a reproducible context. This will improve rcmdcheck in general, and we also don't need an env var. |
Well, it is not just GitHub Actions that has this problem, GitLab has the same problem, which is why I used an environment variable so other places could control it. I don't think rcmdcheck should really mess with the color in the actual |
We can detect that as well. But we can also have an env var, I don't actually mind.
I think the reproducible context in testthat is really nice, and even base R is doing some of this when it is avoiding fancy quotes. I think it is the right thing to do to make |
I just worry about introducing something into rcmdcheck that makes its behavior differ from |
Yeah, you are right, I realized this as well. It would be nice to have some system that would standardize the context for the examples, that works for |
I guess one option would be to have crayon detect For examples maybe it could check if the CheckExEnv (https://github.com/wch/r-source/blob/1349e5a0fd8a70ccef3a234527aca7495c4d9ff0/share/R/examples-header.R#L3) is on the search path? |
42feb8c
to
867494c
Compare
* create style functions at load time
OK, this is in good shape. Let me fix the CI for the main branch first. Then I'll some docs for this, and we can merge it. |
To make it work on platforms without x11/Cairo.
Works better with cli.
Codecov Report
@@ Coverage Diff @@
## master #126 +/- ##
==========================================
- Coverage 76.07% 75.51% -0.57%
==========================================
Files 18 18
Lines 861 878 +17
==========================================
+ Hits 655 663 +8
- Misses 206 215 +9
Continue to review full report at Codecov.
|
Thanks much! |
No description provided.