Linting Errors

This page contains detailed descriptions of the tests done by the nf-core/tools package. Linting errors should show URLs next to any failures that link to the relevant heading below.

Error #1 - File not found

nf-core pipelines should adhere to a common file structure for consistency. The lint test looks for the following required files:

The following files are suggested but not a hard requirement. If they are missing they trigger a warning:

Error #2 - Docker file check failed

Pipelines should have a files called Dockerfile in their root directory. The file is used for automated docker image builds. This test checks that the file exists and contains at least the string FROM (Dockerfile).

Error #3 - Licence check failed

nf-core pipelines must ship with an open source MIT licence.

This test fails if the following conditions are not met:

Error #4 - Nextflow config check failed

nf-core pipelines are required to be configured with a minimal set of variable names. This test fails or throws warnings if required variables are not set.

Note: These config variables must be set in nextflow.config or another config file imported from there. Any variables set in nextflow script files (eg. are not checked and will be assumed to be missing.

The following variables fail the test if missing:

The following variables throw warnings if missing:

The following variables are depreciated and fail the test if they are still present:

Error #5 - Continuous Integration configuration

nf-core pipelines must have CI testing with Travis or Circle CI.

This test fails if the following happens:

Error #6 - Repository tests

The files for a project are very important and must meet some requirements:

Error #7 - Pipeline and container version numbers

This test only runs when --release is set or $TRAVIS_BRANCH is equal to master

These tests look at process.container and $TRAVIS_TAG, only if they are set.

Error #8 - Conda environment tests

These tests only run when your pipeline has a root file called environment.yml

Each dependency is checked using the Anaconda API service. Dependency sublists are ignored with the exception of - pip: these packages are also checked for pinned version numbers and checked using the PyPI JSON API.

Note that conda dependencies with pinned channels (eg. conda-forge::openjdk) are fine and should be handled by the linting properly.

Each dependency can have the following lint failures and warnings:

NB: Conda package versions should be pinned with one equals sign (toolname=1.1), pip with two (toolname==1.2)

Error #9 - Dockerfile for use with Conda environments

This test only runs if there is both environment.yml and Dockerfile present in the workflow.

If a workflow has a conda environment.yml file (see above), the Dockerfile should use this to create the container. Such Dockerfiles can usually be very short, eg:

FROM nfcore/base
LABEL authors="" \
      description="Container image containing all requirements for nf-core/EXAMPLE pipeline"

COPY environment.yml /
RUN conda env update -n root -f /environment.yml && conda clean -a

To enforce this minimal Dockerfile and check for common copy+paste errors, we require that the above template is used. Failures are generated if the FROM, COPY and RUN statements above are not present. These lines must be an exact copy of the above example.

Additional lines and different metadata can be added without causing the test to fail.

Error #10 - Template TODO statement found

The nf-core workflow template contains a number of comment lines with the following format:

// TODO nf-core: Make some kind of change to the workflow here

This lint test runs through all files in the pipeline and searches for these lines.