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
0 answers

What is the meaning of flake8 (python linter) markings of different colors? Can I change those marking for specific warnings?

In my .py files I have wavy-underlines of three colors: red, yellow and blue. And I have $ flake8 --version: > 4.0.1 (flake8-bugbear: 21.11.29, mccabe: 0.6.1, pycodestyle: 2.8.0, pyflakes: 2.4.0) CPython 3.8.10 on Linux Looking at Pylance's…
Rustam A.
  • 809
  • 8
  • 15
0
votes
1 answer

VSCode python type hint complaning when None

On some functions with type hint, when many type can be return, and if None is available (method) get_instance: (config_dict: Unknown) -> Self@DBConnector | None if it use it db_obj = DBConnector.get_instance(configUtil.config) connection =…
jmnguye
  • 347
  • 2
  • 9
0
votes
0 answers

Is there a python linter/formatter that allows and enforces leading commas?

Is there any python linter/formatter option that allows or even enforces leading commas on lists and multi-line function arguments? I love everything that black does, but anything to do with a comma deals with trailing commas or not. Even if the…
GoneAsync
  • 349
  • 5
  • 18
0
votes
2 answers

No-param-reassign, linter rules, React, typescript

My linter is bullying me. I made a function to set tasks completed to !completed with ids as parameters The data looks like this: const lists = [ { id: 'todo-3', name: 'Example 3', tasks: [{ name: 'task', completed: true, id:…
Zamoule
  • 19
  • 3
0
votes
2 answers

How to setup python-linter for Atom

How do I setup a linter for python? I am using Atom, I have the base linter, but it does not show any error lines (those red lines underneath errors). ANY help would be appreciated. The settings for the extiension and the other one cause i couldnt…
0
votes
1 answer

sqlfluff with named parameters

I'm investigating linting SQL files in a project. sqlfluff seems good and I'm keen to get it integrated into the pre-commit checks for the project I'm working on. However, the linter is currently producing false positives for any parameter use in…
moo
  • 1,597
  • 1
  • 14
  • 29
0
votes
0 answers

How to fix arguments linter error in binder?

I need a function that has same functionality as Function.prototype.bind(). I have: export function customBind(func, context, ...args) { const bindArgs = [].slice.call(arguments, 2); return function() { const funcArgs =…
ivan239
  • 21
  • 2
0
votes
2 answers

How do I get the VSCode extension SQL Formatter working?

I installed the VS Code extension SQL Formatter and have the setting to Convert keywords to uppercase turned on. I have this setting on for both the User and Workspace. I've restarted VS Code and still can't get the formatter to work. I have format…
nm12
  • 81
  • 7
0
votes
1 answer

Installing Packages on ATOM for python (linter and autopep8)

I am trying to set up my environment for ATOM for python. I did this on my previous PC and didn't run into much trouble but this time I believe something is messed up and I don't know how to fix it. Linter-flake8 installation: I installed it by…
crytpodoc
  • 31
  • 1
  • 9
0
votes
0 answers

How do I get the report from lintcmd.Run()

I want to do some check by using linter. My base require module is "honnef.co/go/tools/analysis/lint" "honnef.co/go/tools/lintcmd" "honnef.co/go/tools/simple" "honnef.co/go/tools/staticcheck" "honnef.co/go/tools/stylecheck" …
Frank AK
  • 1,705
  • 15
  • 28
0
votes
1 answer

How can I set a standard linter,formatter and settings for a project and save those to the git repo?

I want others who clone the repo to have these settings, right now I have a settings/.vscode file with these settings { "files.exclude": { "*/__pycache__": true, "*/*/__pycache__": true, ".mypy_cache": true, ... …
Sam
  • 1,765
  • 11
  • 82
  • 176
0
votes
1 answer

Jenkins/Python: Jenkinsfile linter/validator

I've been looking and so far been unable to find a way of validating/linting my Jenkinsfile. At least not by using tox, pycharm or another way outside of visual code for example (I did saw some examples of that, more or less). Does anyone know of a…
Erik van de Ven
  • 4,747
  • 6
  • 38
  • 80
0
votes
1 answer

How to fix "Error running JSHint Package" in Atom Editor

Every time I edit a JS file in Atom, I get this error: Which looks like this in the console: e[0716/144445.466: ERROR:registration_protocol_win.cc(103)] :14 CreateFile: The system cannot find the file specified. (x2) [0716/144447.414:…
McKay Whiting
  • 152
  • 11
0
votes
1 answer

Remove venv folder from bandit scan

When I run poetry run bandit -r . inside my root project's folder root, it consider the .venv path. My folder structure is: root ├── ... ├── my_package ├── .venv └── ... How could I avoid this? I've tried the -x…
Henrique Branco
  • 1,778
  • 1
  • 13
  • 40
0
votes
1 answer

How to make ALE to work with mixed Windows/Cygwin and tricore-gcc?

EDITED: I am running on Windows 10, working with gvim but the overall project is built in Cygwin. The compiler that I am using is tricore-gcc. With lot of pain I managed to build a compile_commands.json file that apparently is working fine (if I use…
Barzi2001
  • 989
  • 8
  • 24