Skip to content

use-vim-comment (ODOO003)

Preview (since 0.16.2.1) · Related issues · View source

Derived from the odoo linter.

Fix is sometimes available.

This rule is unstable and in preview. The --preview flag is required for use.

What it does

Checks for vim modeline comments (e.g. # vim: fileencoding=utf-8).

Why is this bad?

Vim modelines configure the editor on a per-file basis, which is better handled by a local (untracked) .vimrc or .lvimrc, so it doesn't leak one contributor's editor preferences into the shared codebase.

Example

# vim: fileencoding=utf-8