All Projects → pantajoe → vscode-elixir-credo

pantajoe / vscode-elixir-credo

Licence: MIT license
VSCode support for Elixir Linter 'Credo'.

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language
elixir
2628 projects

Projects that are alternatives of or similar to vscode-elixir-credo

Credo
A static code analysis tool for the Elixir language with a focus on code consistency and teaching.
Stars: ✭ 4,144 (+20620%)
Mutual labels:  linter, credo
constyble
CSS complexity linter
Stars: ✭ 92 (+360%)
Mutual labels:  linter
eslintcc
Complexity of Code - JavaScript/TypeScript
Stars: ✭ 15 (-25%)
Mutual labels:  linter
tagref
Tagref helps you maintain cross-references in your code.
Stars: ✭ 92 (+360%)
Mutual labels:  linter
eslint-config
🚀 Jetrockets Standarts | ESLint
Stars: ✭ 20 (+0%)
Mutual labels:  linter
makefiles
No description or website provided.
Stars: ✭ 23 (+15%)
Mutual labels:  linter
credo naming
🏷 A suite of Credo checks to enforce naming best practices in an Elixir project
Stars: ✭ 68 (+240%)
Mutual labels:  credo
eaf-linter
🤪 A linter, prettier, and test suite that does everything as-simple-as-possible.
Stars: ✭ 17 (-15%)
Mutual labels:  linter
golangci-lint
Fast linters Runner for Go
Stars: ✭ 11,019 (+54995%)
Mutual labels:  linter
check-geojson
a checker for the geojson format. goes beyond a schema, checking semantics and producing character-level warnings.
Stars: ✭ 36 (+80%)
Mutual labels:  linter
vscode-write-good
Write Good Linter for Visual Studio Code
Stars: ✭ 58 (+190%)
Mutual labels:  linter
linter-alex
📝Sensitive, considerate writing before you merge your Pull Requests
Stars: ✭ 67 (+235%)
Mutual labels:  linter
stein
A linter for config files with a customizable rule set
Stars: ✭ 92 (+360%)
Mutual labels:  linter
li18nt
🌎 Lint your i18n translation files. Detect conflicting properties, duplicates and make it more readable and easier to maintain by formatting it!
Stars: ✭ 29 (+45%)
Mutual labels:  linter
elm-review
Analyzes Elm projects, to help find mistakes before your users find them.
Stars: ✭ 195 (+875%)
Mutual labels:  linter
riskybird
Regular expression authors best friend
Stars: ✭ 48 (+140%)
Mutual labels:  linter
command line lint
This script generates a report against your command-line history and suggests workflow improvements.
Stars: ✭ 42 (+110%)
Mutual labels:  linter
predeclared
Find definitions and declarations in Go source code that shadow predeclared identifiers
Stars: ✭ 26 (+30%)
Mutual labels:  linter
rubocop-linter-action
Rubocop Linter Action: A GitHub Action to run Rubocop against your code!
Stars: ✭ 86 (+330%)
Mutual labels:  linter
unindent
Report code that is unnecessarily indented
Stars: ✭ 18 (-10%)
Mutual labels:  linter

VS Code Credo (Elixir Linter)

GitHub Workflow Status Visual Studio Marketplace Downloads Open VSX Downloads The MIT License

This VS Code extension provides display of the output of the static code analysis tool Credo for the programming language Elixir.

Features

  • Lint all opened documents and display diagnostics
  • Re-lint a document after saving it
  • Either lint all elixir files or only those specified by the linting configuration
  • Specify a custom configuration file for Credo
  • Specify a custom configuration for Credo
  • Specify a custom execute path for the mix binary
  • Specify wheterh you want to use Credo's diff mode

Demo

Requirements

Add the Elixir linter Credo to your dependencies in your project's mix.exs file and install it by running mix deps.get.

Extension Settings

This extension contributes the following settings:

  • elixir.credo.configurationFile: location of the configuration file Credo should use. Can be an absolute path, a relative path or simply a file.
  • elixir.credo.credoConfiguration: name of the configuration Credo should use. Uses the default configuration per default (default).
  • elixir.credo.strictMode: whether to utilize Credo's strict mode when linting.
  • elixir.credo.executePath: execute path of the mix executable
  • elixir.credo.checksWithTag: specify tags of those checks which should be used in VS Code (all other checks will be ignored)
  • elixir.credo.checksWithoutTag: specify tags of checks which should be ignored in VS Code
  • elixir.credo.ignoreWarningMessages: ignore warning messages (concerning finding the configuration file)
  • elixir.credo.lintEverything: lint any elixir file (even if excluded in the Credo configuration file)
  • elixir.credo.enableDebug: toggle extensive logging to extension's output channel
  • elixir.credo.diffMode.enabled: enable Credo's diff mode
  • elixir.credo.diffMode.mergeBase: specify the merge base for the diff mode

Known Issues

"The mix binary is not executable."

If this warning pops up, the vscode extension's credo child process does not have the path of the mix binary in its PATH. Thus, try to set the correct path of the mix binary in the configuration's settings under "elixir.credo.executePath" (Elixir > Credo > Execute Path).

"Command /bin/mix credo returns empty output!"

This message indicates that the extension cannot get an output from Credo. The problem could be caused by:

  • Credo or one of its dependencies is missing.
  • Credo has a problem reading your project's configuration.

First make sure Credo is installed and that Credo has the dependencies installed locally it requires to function. Install them to local archive by running the following commands.

mix archive.install hex credo
mix archive.install hex bunt
mix archive.install hex jason

Then try to generate .credo.exs for your project by running mix credo gen.config in your project's root folder. If this step fails the output could tell you the exact reason for the failure. The problem can be something as simple as a minor syntax error in your config/dev.exs.

Hint:

Sometimes, any problem you might have is caused by VS Code not having the same PATH environment variable as your shell. To make sure VS Code has the same environment as your shell, simply close all VS Code processes and open VS Code from you command line by executing the binary code in your shell of choice.

Changelog

See Changelog

Contribution

When contributing, please refer to the Contribution Guide

License

This software is released under the MIT License.

© 2020-2022 Joe Pantazidis

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].