devenv
is a repository offering a collection of common settings for linters and formatters, managed by Taskfiles.
Additionally, it builds and pushes a Docker image loaded with all the required tools to Docker Hub.
To use devenv
in your project, include it as a submodule.
git submodule add https://github.com/idelchi/devenv .devenv
To track the dev branch instead of the default main
branch, the following commands can be used:
git submodule set-branch -b dev .devenv
git submodule update --init --recursive --remote
If using VS Code, copy the .vscode folder into the main project, and adjust the paths in settings.json to correspond with the configuration folders used.
Taskfile.yml contains the list of commands that can be run to format and lint the code, and can be used as a starting point for your own project.
A Taskfile is used to manage and summarize the different build system commands. To display the available commands along with their descriptions, run:
task --list
- Go
- Python
- JSON/YAML
- shell/bash
- Dockerfile
- Markdown
- Spelling
- Copy-Paste
- Groovy
Tools that are not linters or formatters, but are useful for development:
You can use the accompanying Docker image to run native tasks with full support for all commands listed in the Taskfile. To launch the container and mount the workspace, run:
docker compose run devenv
For more detailed instructions on how to use these tools, please refer to their respective documentation.
devenv
can be used in one of the following ways:
- As a submodule, i.e., referenced in your project.
- As a globally available environment, running with
task -g
. This can be achieved by either utilizing the published Docker image, which contains the latest version in your home directory, or by installing this repository directly in your home directory.
Both the root Taskfile
and the docker-compose
file require DEVENV
to be set to function correctly.
For this, the .env
file should be appropriately configured and sourced.
.github
contains a GitHub Actions workflow that can be used to run the linters, tests and build.
.devcontainer
contains configurations to use the Docker image as a development container.
.vscode
contains configurations for usage in VS Code.