Questions tagged [linter]

NOTE: It is recommend to use the tag static-analysis instead. "Linter" is slang for static analyzer, a tool that analyzes source code to flag programming errors, bugs, stylistic errors, and suspicious constructs at compile-time. The slang "linter" originates from the specific product PC Lint.

"Linter" is slang for static analyzer, a tool that analyzes source code to flag programming errors, bugs, stylistic errors, and suspicious constructs at compile-time. Whereas a dynamic analyzer is a tool that performs similar analysis in run-time.

The slang "linter" originates from the specific product PC Lint, though there are many other such tools for various programming languages and coding standards.

The first linter was written by Stephen C. Johnson in 1978 while working in the Unix operating system at Bell Labs. After that, many other linters have appeared for different purposes and languages, not only C.


Tag usage

Since "linter is slang and not a formal term, it is recommend to use the tag instead. Always use that tag in combination with tags for the specific language, standard and tool used.

Tag usage example: .

Also include versions of the programming language, coding standard and tool where applicable.

326 questions
5
votes
0 answers

What is preventing eslint from installing based on my error code?

I am following a Udemy course and the first app we are building through Atom is called albums. I have installed linter and linter-eslint in Atom, but running this code: npm install --save-dev eslint-config-rallycoding leads to an incomplete…
5
votes
5 answers

Visual Studio Code: Failed to apply ESLint fixes to the document

I am using Visual Studio Code 1.6.1, with latest version of ESLint extension installed and enabled. I have "eslint.options": { "rules": { ... } } in my vs-code user settings. I was able to autofix my js files with the auto command…
Evgeni Atanasov
  • 482
  • 1
  • 5
  • 13
4
votes
3 answers

How to fix Parsing error: invalid-first-character-of-tag-name.eslint (vue/no-parsing-error) in Vue

Code
{{ getPercentage > 0 && getPercentage < 3 ? "Neutral" :…
Abdullah Ch
  • 1,678
  • 1
  • 13
  • 31
4
votes
0 answers

KtLint check doesn't work locally anymore - it works tho in my docker image build

For no reason I am able to understand my gradle ktlintCheck command does not yield any issues anymore and :ktlintFormat is not fixing anything. As soon as I push my changes and my CI pipelines starts to build my Docker Image build process ktlint…
xetra11
  • 7,671
  • 14
  • 84
  • 159
4
votes
1 answer

How to disable linting in vim (no, it's not ALE)

Recently, the vim built into my Mac has started to show me linting feedback visually whenever I save. This is annoying and I'd rather it not happen. (Previous 20 years of using vi/vim did not have this behavior.) My web searching suggests perhaps…
Nathan
  • 1,451
  • 1
  • 15
  • 28
4
votes
1 answer

gitlab CI pipeline to check for code formatting

I am looking to install google-java-formatter across several of my projects. However when committing code I want the CI pipline to check if the formatting has been done first. I know I can accomplish this with a .gitlab-ci.yml file in my root…
Broken Mind
  • 511
  • 3
  • 8
  • 22
4
votes
1 answer

eslint-config-google doesn't detect globally installed eslint

Whenever I try to install eslint-config-google globally via npm install -g eslint-config-google I get npm WARN eslint-config-google@0.9.1 requires a peer of eslint@>=4.1.1 but none is installed. You must install peer dependencies yourself. But…
Aakash Verma
  • 3,705
  • 5
  • 29
  • 66
4
votes
1 answer

ESlint for VSCode without using node or alternative?

We are teaching fundamental JavaScript to beginners and have recently switched from the Atom editor to VSCode. The problem with this is that VSCode requires us to install node and then npm install eslint, whereas in Atom, we can use the atom package…
4
votes
2 answers

Is it possible to forbid import from path in eslint except one permitted includer?

Can i write rule that will raise an error if one or more files are importing from one path, but permit import these files for file.js?
IC_
  • 1,624
  • 1
  • 23
  • 57
4
votes
1 answer

How to use ruby-linter in visual studio code?

I am a really newcomer for both ruby and visual studio code. I have installed ruby and ruby-debug-ide, and I can run or debug the ruby in vscode already. Now I would like to install the ruby-linter extension, but it doesn't work. For example, when I…
Ryan
  • 345
  • 3
  • 11
4
votes
0 answers

Atom gcc-linter for kernel development

I'm working on a kernel module. I chose Atom as my editor of choice. It's nice to have a working linter. I installed the linter-gcc engine, now it complains about missing linux/module.h. This header is provided by the kernel build system, so plain…
marmistrz
  • 5,974
  • 10
  • 42
  • 94
4
votes
3 answers

Syntax checker for C#

We're looking for a syntax checker for C#, something like Checkstyle for Java. Does anyone have any recommendations for any tools that we can use? Ideally it would have a plugin to Visual Studio 2008.
mkinkade
  • 315
  • 2
  • 10
3
votes
1 answer

How to ignore environment directory when using python ruff linter in console

I was trying ruff linter. I have a file structure like below project_folder ├── env # Python enviroment [python -m venv env] │ ├── Include │ ├── Lib │ ├── Scripts │ ├── ... ├── __init__.py └── numbers.py I am trying to use this code I…
3
votes
2 answers

VSCODE shows warnings as errors

My VSCODE shows warnings as if they were errors (specifically linter warnings). I want linter warnings to show with different unerline color. I tried modifying my settings.json adding the following configuration "workbench.colorCustomizations":…
Rosenpin
  • 862
  • 2
  • 11
  • 40
3
votes
2 answers

Can't install golangci-lint locally

I'm using RHEL 8.6 and my Go version is the following: $ go version go version go1.18.3 linux/amd64 I'm trying to install locally golangci-lint and none of the described ways in the documentation are working. What I tried: First: $ curl -sSfL…
Andressa Cabistani
  • 463
  • 1
  • 5
  • 14
1 2
3
21 22