Patch a module

If you want to make a minor change to a locally installed module but still keep it up date with the remote version, you can create a patch file using nf-core modules patch.

nf-core modules patch fastqc

The generated patches work with nf-core modules update: when you install a new version of the module, the command tries to apply the patch automatically. The patch application fails if the new version of the module modifies the same lines as the patch. In this case, the patch new version is installed but the old patch file is preserved.

When linting a patched module, the linting command will check the validity of the patch. When running other lint tests the patch is applied in reverse, and the original files are linted.