Questions tagged [lint]

Lint is a C program checking developped in 1978 at the Bell labs and was used as a UNIX utility in 1979. There has now been several Lint-like programs (also code linters) that analyze source code written in possibly different languages, most notably:

  • Pylint: Python linter
  • JSHint: JavaScript linter with out-of-the-box support for renowned libraries
  • ESLint: JavaScript linter with support for ES6 and JSX
  • Findbugs: Java linter

Some linters support IDE integration which can allows to have real-time detection of possible bugs, and possibly automatic fixes.

10 questions
4
votes
2 answers

Formatting of braces for C++ in Visual Studio Code

I've C/C++ extension of Microsoft as my default formatter. When I save/run my code the opening curly braces automatically move to newline instead of staying in sameline. How can I prevent this? (It doesn't happen after I disable the extension.) In…
Shub
  • 240
  • 3
  • 11
4
votes
2 answers

VSCode JSDoc type checking

In VSCode, if I write this JS file: /** @type {number} */ let x = 10; /** @type {string} */ let y = x; nothing is underlined in red, and the tooltip over y simply gives let y: string. That is not what I want! I want VSCode to throw me an error, as…
4
votes
2 answers

How to suppress some Python errors/warnings in VS Code

I have upgraded my VS Code to the latest version, 1.30.0. Then it starts to complain about unresolved import. This is because my work uses docker, so docker image contains all the dependencies while my local machine doesn't. I don't want to install…
Jerry
  • 300
  • 1
  • 3
  • 10
3
votes
1 answer

How to exclude files from outside my workspace from ESLint in VSCode?

When I'm in a workspace and open an external file (from outside of workspace) in VSCode, how can I exclude this file from lint? More specifically from pug-lint but the same applies to ESLint?
MrT77
  • 141
2
votes
2 answers

How do I configure markdownlint for Visual Studo Code differently for CHANGELOG files

I like the markdownlint extension for Visual Studio Code, but the default settings do not work well for changelog files. How can I configure markdownlint differently for the CHANGELOG.md file, but use the normal settings for all other markdown…
1
vote
1 answer

How to prevent VS Code from treating the tab-key input as textual-input/tab-stop-insertion, but instead solely as auto-completion-/navigation-trigger?

Preamble: I would like to use VS Code whenever i can, if i could (mainly for the reason that it is cross-platform and the only completely customizable/hackable GUI editor on all major platforms). One issue although breaks my workflow repeatedly;…
1
vote
0 answers

Atom on Ubuntu not linting code using phpcs; same process works on macOS

My goal here is to install a development environment on Ubuntu, I have most of the necessary parts but I am stuck on the last piece. I am using Atom as the code editor and I want Atom to lint my code using phpcs as I type. I have achieved this on…
1
vote
0 answers

lintr is not working with sublime

I have installed a SublimeLinter via package control, lintr is not available in package control, I have installed it via git. R is connected to sublime, package lintr was installed by install.packages("lintr"). But I get this error: No lint…
IrFe
  • 11
0
votes
1 answer

Using two python environments in vscode

Is it possible to have two python environments simultaneously "activated" within vscode? One environment would be the project's env (say, in a local folder venv), and the other environment being the global environment that has the linters and…
0
votes
1 answer

Matching the first line after a bracket in Lint

I'm making a custom rule for programming language Lint to : match 1 or more empty lines after {, and another rule to match empty line before }. As an example in this code, I want these rules to match line 2 and line 5 : class Test { …