The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.
When initializing pre-commit in your repo with
precommit::use_precommit()
, you can specify the Continuous
integration provider with ci = "native"
if you want to use
pre-commit.ci or
ci = "gha"
if you want to use GitHub Actions. For existing
repos, use precommit::use_ci()
.
Pre-commit will run the hooks on all files, so instead of pushing, waiting and fixing issues locally, we recommend that you fix all problems before pushing by invoking pre-commit (roughly) the same way as it happens in the CI, which is described in the next section.
In the CI run, a command roughly equivalent to the following will be ran from the command line:
If you get an error and pre-commit
is not on your
$PATH
(e.g. because you installed with
precommit::install_precommit()
), you can locate the
executable from R with
And run the command in your bash terminal like this:
Then fix the problems, stage the files and re-try until the command succeeds without more errors.
Next, we quickly introduce the two options. We recommend pre-commit.ci, but you might have to skip the roxygenize hook in the ci run under certain circumstances as explained below.
Pros:
.pre-commit-config.yaml
are
supported.Cons:
You need to authenticate the pre-commit.ci App in GitHub.
Limitations for the roxygenize hook:
.pre-commit-config.yaml
under id: roxygenize
.
You can generate the required code with
precommit::snippet_generate('additional-deps-roxygenize')
.
This is also required to run the hook locally.To overcome the above limitations, you can:
.pre-commit-config.yaml
).precommit::use_ci("gha")
.Customization:
Please see the documentation of pre-commit.ci on whether or not to auto-fix problems as well as other configuration options.
Pros:
Cons:
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.