All Projects → jeromepin → Whale Linter

jeromepin / Whale Linter

Licence: mit
A simple non professional Dockerfile linter

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Whale Linter

Jupyterlab Lsp
Coding assistance for JupyterLab (code navigation + hover suggestions + linters + autocompletion + rename) using Language Server Protocol
Stars: ✭ 796 (+2312.12%)
Mutual labels:  linter
Sublimelinter Eslint
This linter plugin for SublimeLinter provides an interface to ESLint
Stars: ✭ 839 (+2442.42%)
Mutual labels:  linter
Rubocop Packaging
A RuboCop extension focused on enforcing upstream best practices and coding conventions.
Stars: ✭ 29 (-12.12%)
Mutual labels:  linter
Dotenv Linter
⚡️Lightning-fast linter for .env files. Written in Rust 🦀
Stars: ✭ 802 (+2330.3%)
Mutual labels:  linter
Cuke linter
A linting tool for Cucumber
Stars: ✭ 24 (-27.27%)
Mutual labels:  linter
Pyupgrade
A tool (and pre-commit hook) to automatically upgrade syntax for newer versions of the language.
Stars: ✭ 883 (+2575.76%)
Mutual labels:  linter
Super Linter
Combination of multiple linters to install as a GitHub Action
Stars: ✭ 7,445 (+22460.61%)
Mutual labels:  linter
Wartremover
Flexible Scala code linting tool
Stars: ✭ 956 (+2796.97%)
Mutual labels:  linter
Bpmn Js Bpmnlint
A bpmnlint plug-in for bpmn-js.
Stars: ✭ 26 (-21.21%)
Mutual labels:  linter
Eryngii
[WIP] Erlang lint and formatter
Stars: ✭ 28 (-15.15%)
Mutual labels:  linter
Lintr
Static Code Analysis for R
Stars: ✭ 817 (+2375.76%)
Mutual labels:  linter
Dll
Go linter for finding defer statements inside for loops
Stars: ✭ 23 (-30.3%)
Mutual labels:  linter
Eslint Closure
ESLint Plugin and Config for the Google JavaScript Style Guide
Stars: ✭ 21 (-36.36%)
Mutual labels:  linter
Sublime Phpcs
🔍 PHP CodeSniffer, PHP Coding Standard Fixer, Linter and Mess Detector Support for Sublime Text
Stars: ✭ 805 (+2339.39%)
Mutual labels:  linter
Aurora
📦 A set of configs and rules for Typescript projects.
Stars: ✭ 30 (-9.09%)
Mutual labels:  linter
Awesome Go Linters
A curated list of awesome Go linters. More than 60 linters and tools!
Stars: ✭ 801 (+2327.27%)
Mutual labels:  linter
Go Critic
The most opinionated Go source code linter for code audit.
Stars: ✭ 875 (+2551.52%)
Mutual labels:  linter
Prettylint
Run Prettier as a linter
Stars: ✭ 33 (+0%)
Mutual labels:  linter
Ale Sensible
Pretty, responsive and smooth defaults for a sane ALE, gets you started in 30 seconds
Stars: ✭ 30 (-9.09%)
Mutual labels:  linter
Iblinter
A linter tool for Interface Builder
Stars: ✭ 915 (+2672.73%)
Mutual labels:  linter

whale-linter

PyPI PyPI PyPI Docker Stars Docker Pulls

whale-linter is a cross-platform Dockerfile linter.

alt text

Installation

Tested on

  • Python 3.2, 3.4, 3.5
  • Debian wheezy, jessie, stretch

Docker : The cool way :)

Note : You should use a specific tag (like jeromepin/whale-linter:0.0.7) instead of (implicit) latest

docker run -it --rm -v /path/to/Dockerfile:/Dockerfile jeromepin/whale-linter

PyPI : The easy way

pip install whale-linter

and to upgrade :

pip install --upgrade whale-linter

Usage

usage: whale-linter [-h] [-i RULE] [-v] DOCKERFILE

A simple non professional Dockerfile linter

positional arguments:
  DOCKERFILE            The Dockerfile to lint

optional arguments:
  -h, --help            Show this help message and exit
  -i, --ignore RULE     Rule to ignore
  -v, --version         Print version

Rules

Here is the list of all rules checked by whale-linter.

Do not hesitate to create a new issue if you have an idea for a new/incomplete rule.

Rules are ordered as follows :

  • WL1xxx : Critical errors

  • WL2xxx : Bad practices

  • WL3xxx : Enhancements

Rule Corresponding message (as template given in config.json)
WL1000 '{token}' is mandatory
WL1001 '{token}' must be present only once
WL2000 A tag should be specified for the '{image}' image
WL2001 Using the 'latest' tag isn't wise, as it won't always be a reference to the same version
WL2002 Use 'WORKDIR' to change directory
WL2003 Some shell commands like '{command}' are pointless in containers
WL2004 'WORKDIR' path should be absolute
WL2005 'EXPOSE' port ({port}) must be in 1-65535 range
WL2006 Prefer 'COPY' over 'ADD' for adding files and directories to a container. 'ADD' sounds to much magic
WL2007 Be careful changing to root user
WL2008 Avoid running 'apt-get upgrade' in container. Move to a newer image instead
WL2009 Missing '--no-install-recommends' in your '{command}' command
WL2010 Missing '-y' in your '{command}' command
WL2011 Avoid running 'apt-get dist-upgrade' in container. Move to a newer image instead
WL2012 There is two consecutive 'RUN'. Consider chaining them with '' and '&&'
WL3000 Consider removing APT cache : 'rm -rf /var/lib/apt/lists/*'
WL3001 Using '{token}' is recommended
WL3002 Consider sorting APT packages for better reading
WL3003 A version should be specified for the package '{package}' in order to improve immutability

Author

Jerome Pin (@jerome_pin) <[email protected]>

Licence

MIT. See LICENCE file.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].