Generic code linting support for Atom.
Atom-Lint is currently in beta development.
More linters will be supported in the future.
- RuboCop for Ruby
- flake8 for Python
- HLint for Haskell (Installation of language-haskell package is required)
- JSHint for JavaScript
- CoffeeLint for CoffeeScript
- gc for Go
- CSSLint for CSS
- SCSS-Lint for SCSS
- puppet-lint for Puppet (Installation of language-puppet package is required)
- ShellCheck for shell script
- Clang for C/C++/Objective-C
- rustc for Rust (Installation of language-rust package is required)
- Seamless integration with Atom as if it's a built-in package.
- Code highlighting – you don't need to move your eyes from the code to see the violations.
- Clean UI – it honors the colors of your favorite Atom theme.
$ apm install atom-lint
Your source will be linted on open and on save automatically, and the detected violations will be displayed as arrows in the editor. You can see the detail of the violation by moving the cursor to it.
Ctrl-Alt-L
: Global toggleCtrl-Alt-[
: Move to Previous ViolationCtrl-Alt-]
: Move to Next Violation
Also you can customize keymaps by editing ~/.atom/keymap.cson
(choose Open Your Keymap in Atom menu):
'.workspace':
'ctrl-alt-l': 'lint:toggle'
'.editor':
'ctrl-alt-[': 'lint:move-to-previous-violation'
'ctrl-alt-]': 'lint:move-to-next-violation'
See Customizing Atom for more details.
You can configure Atom-Lint by editing ~/.atom/config.cson
(choose Open Your Config in Atom menu):
# Some other settings...
'atom-lint':
'ignoredNames': [
'tmp/**'
]
'clang':
'path': '/path/to/bin/clang'
'headerSearchPaths': ['/path/to/include','/path2/to/include']
'coffeelint':
'path': '/path/to/bin/coffeelint'
'ignoredNames': [
'coffeelint/specific/excluded/file.coffee'
]
'csslint':
'path': '/path/to/bin/csslint'
'flake8':
'path': '/path/to/bin/flake8'
'gc':
'path': '/path/to/bin/go'
'hlint':
'path': '/path/to/bin/hlint'
'jshint':
'path': '/path/to/bin/jshint'
'puppet-lint':
'path': '/path/to/bin/puppet-lint'
'rubocop':
'path': '/path/to/bin/rubocop'
'rustc':
'path': '/path/to/bin/rustc'
'scss-lint':
'path': '/path/to/bin/scss-lint'
'shellcheck':
'path': '/path/to/bin/shellcheck'
atom-lint.LINTER.path
By default Atom-Lint automatically refers the environment variable PATH
of your login shell
if it's bash
or zsh
, and then invokes the command.
Thus, if you're using a language version manager such as rbenv,
linters need be installed in the default/global environment of the version manager
(i.e. the environment where you opened a new terminal).
If you need to use a non-default executable, use this setting.
atom-lint.ignoredNames
(Global)atom-lint.LINTER.ignoredNames
(Per Linter)
You can specify lists of file patterns to disable linting. The global patterns and the per linter patterns will be merged on evaluation so that you can make these lists DRY.
'atom-lint':
'ignoredNames': [
'tmp/**'
]
'rubocop':
'ignoredNames': [
'vendor/**'
'db/schema.rb'
]
With the above example, all of tmp/**
, vendor/**
and db/schema.db
are ignored when RuboCop is active.
The pattern must be relative to the project root directory.
The pattern format is basically the same as the shell expansion and .gitignore
.
See minimatch
for more details.
Here's a list of all contributors to Atom-Lint.
Atom-Lint's changelog is available here.
Copyright (c) 2014 Yuji Nakayama
See the LICENSE.txt for details.