From 9b3f01e369d84bf8fe0cd131321f111367ed1dc4 Mon Sep 17 00:00:00 2001 From: Federico Marotta Date: Mon, 14 Oct 2019 17:33:50 +0200 Subject: [PATCH] X-mkprj: add editorconfig template --- bioinfoconda/prj/X-mkprj.sh | 7 +++++++ bioinfoconda/templates/editorconfig | 21 +++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 bioinfoconda/templates/editorconfig diff --git a/bioinfoconda/prj/X-mkprj.sh b/bioinfoconda/prj/X-mkprj.sh index c70f637..91091e9 100755 --- a/bioinfoconda/prj/X-mkprj.sh +++ b/bioinfoconda/prj/X-mkprj.sh @@ -154,16 +154,23 @@ function create_templates() prjpath=$1 prjname=$(basename $prjpath) + # Snakemake templates cp $templatespath/Snakefile $prjpath/local/snakefiles/main.smk cp $templatespath/latex.smk $prjpath/local/snakefiles/ sed_template $templatespath/snakemake_config.yml > $prjpath/local/config/snakemake_config.yml + # Docker templates sed_template $templatespath/Dockerfile > $prjpath/local/dockerfiles/Dockerfile sed_template $templatespath/docker-entrypoint.sh > $prjpath/local/dockerfiles/docker-entrypoint.sh cp $templatespath/dockerignore $prjpath/local/dockerfiles/dockerignore + # Rmarkdown templates sed_template $templatespath/notebook.Rmd > $prjpath/local/doc/report/notebook.Rmd + # Editorconfig + cp $templatespath/editorconfig $prjpath/.editorconfig + + # Symbolic links ln -s ../local/snakefiles/main.smk $prjpath/dataset/Snakefile ln -s local/dockerfiles/dockerignore $prjpath/.dockerignore diff --git a/bioinfoconda/templates/editorconfig b/bioinfoconda/templates/editorconfig new file mode 100644 index 0000000..cdba3a7 --- /dev/null +++ b/bioinfoconda/templates/editorconfig @@ -0,0 +1,21 @@ +# top-most EditorConfig file +root = true + +# Unix-style newlines with a newline ending every file +[*] +end_of_line = lf +insert_final_newline = true + +# Trim trailing whitespace when saving +[*] +trim_trailing_whitespace = true + +# 4 space indentation +[*] +indent_style = space +indent_size = 4 + +# # Indentation override for all files under lib directory +# [lib/**] +# indent_style = unset +# indent_size = unset