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
0
votes
1 answer

linter-csslint:: Error while running CSSLint

I am newbie in web development. I have installed atom and was working on project using HTML and CSS. Atom was working absolutely fine with HTML code however when i tried to integrate external css file with HTML then it gives the following error. Can…
0
votes
2 answers

Flutter custom linter option to ban setState

I would like to write a new custom linter rule. Especially, I want to write a rule that forbids the use of the setState function in flutter. Is there any solution to customize your linter rules out there?
0
votes
1 answer

Automatic indent pythoh dataclasses with commentы as Go structs style

Python dataclasses are really great. They allow to define classes in very beautiful way. from dataclasses import dataclass @dataclass class InventoryItem: """Class for keeping track of an item in inventory.""" name: str unit_price:…
inyutin
  • 406
  • 3
  • 9
0
votes
1 answer

eslint doesnt detect deconstruct variables

I have the following code: for ([uri, { socket, settings }] of map) { // parse websocket urls let url1 = new url.URL(ws.url); let url2 = new url.URL(uri); // override http(s) with ws(s) url2.protocol =…
Marc
  • 2,920
  • 3
  • 14
  • 30
0
votes
1 answer

Prototype Pollution in async linters error

linters error npm audit report async <2.6.4 Severity: high Prototype Pollution in async - https://github.com/advisories/GHSA-fwr7-v2mv-hh25 fix available via `npm audit fix` node_modules/jake/node_modules/async jake >=8.0.1 Depends on…
0
votes
1 answer

Pylint nested pylintrc : Specify a configuration file

Goal I want to use pylint without specifying the file path (just run pylint instead of pylint --rcfile=linter/.pylintrc), as I want to save all linter related files in a subfolder linter/. I thought of adding a .pylintrc file at the root folder only…
Sylvain
  • 679
  • 9
  • 13
0
votes
0 answers

How to use inherited contexts in Go

I am writing an Kubernetes Operator in Go. I am struggling with the clean handling of the given context object. It is a good practice to to pass an inherited context as a parameter to further methods. When doing not so the linter shows the following…
Mortl
  • 121
  • 1
  • 5
0
votes
1 answer

What does "pass various linters like flake8" mean?

Regarding a Python project: "We want to pass various linters like flake8. I don't expect this to be an issue, but I'll have it in my back-pocket if the customer challenges anything." Clarification: I know what a linter is. My confusion is around the…
ScotterMonkey
  • 1,007
  • 12
  • 25
0
votes
1 answer

What is the default CSS property order?

i have been trying to find documentation on this but i havent been able to. I use stylint in a project and we have the css order option activated. I haven't been able to set up VS code to show the errors and i haven't found a page with the…
0
votes
0 answers

How to avoid sqlfluff to add characters to unquoted identifiers while still linting the file?

How can I tell sqlfluff to do not add any character (in this case "_") after a number in an unquoted identifier? For example, I want to lint a sql file with the following code: SELECT CAST(FIELD_2PY AS decimal(28, 6) ) AS FIELD_2PY, …
0
votes
1 answer

TS2769 Incorrect typescript error on computed prop (Vue3, Typescript, dayjs)

I have an issue with a typing in a Vue3 application. The component is a datetime picker using the input with type datetime-local. My application uses Dayjs for handling dates. So the prop modelValue is of type dayjs.Days which contains a function…
Kim Boender
  • 356
  • 4
  • 14
0
votes
1 answer

VSCode vs Goland linter

I wonder if the VSCode golang linter used in this VSCode extension: https://marketplace.visualstudio.com/items?itemName=golang.go and the linter being used in Jetbrains Goland are the same or not. If not what are the differences? I did not find…
master o
  • 59
  • 7
0
votes
0 answers

Am I Incorrectly Writing my Copy Assignment Operators?

I've been working on a personal project where I code a simple Blackjack game, nothing too fancy. However, in an attempt to make copy assignment operators for my Card class, my CLion linter is suggesting that how I am writing them is incorrect and is…
0
votes
1 answer

Atom linter doesn't recognize classes in the same package

I currently have the linter package (here: apm install linter) and the linter-javac package (here: apm install linter-javac). It works great for the most part, but when I try to use packages, it doesn't recognize classes in the same package, like…
grepgrok
  • 130
  • 10
0
votes
1 answer

Why do I get a linter error when I include std::vector?

This is a problem that seem to occur from time to time for me. The linter says that "namespace std has no member 'vector'" although the program compiles and runs fine. The only problem besides the annoyance is that I cannot use the ctrl-click…
Sasse
  • 1
  • 1