Enable Flycheck globally by adding the following to your init.el, and restart Emacs:
(add-hook 'after-init-hook #'global-flycheck-mode)
Install some syntax checker tools¶
Install some syntax checking tools for the programming or markup language you are using. Take a look at the list of supported languages to check what languages and tools are supported.
$ pip install --user pylint
Or for Ruby:
$ gem install rubocop ruby-lint
Or for Haskell:
$ brew install haskell-platform $ cabal install hlint
Check syntax in a buffer¶
Run M-x flycheck-verify-setup in a buffer to check whether Flycheck is correctly setup to check the buffer.
If everything is fine Flycheck will now check syntax using these tools, when you visit a buffer in any of these languages. Syntax checking happens automatically when you save the buffer or make any changes. Flycheck highlights errors and warnings in the buffer, indicates them in the fringe, and reports their numbers in the mode line.
You can also manually check a buffer with C-c ! c (flycheck-buffer).