pycqa / flake8-json Goto Github PK
View Code? Open in Web Editor NEWJSON formatter for Flake8 output
License: MIT License
JSON formatter for Flake8 output
License: MIT License
The codeclimate formatter breaks if the show source option is activated. This option would previously insert the source line, where the error occured as raw text into the json. This leads to parsing errors, when reading the generated json output. With the proposed changes, the source line will never be inserted.
In GitLab by @asottile on Aug 11, 2019, 21:27
Merges invalid_filenames -> master
Before:
$ flake8 ../x/foo\"bar\".py --format=json | jq .
parse error: Invalid numeric literal at line 1, column 15
After:
$ flake8 ../x/foo\"bar\".py --format=json | jq .
{
"../x/foo\"bar\".py": [
{
"code": "F401",
"filename": "../x/foo\"bar\".py",
"line_number": 1,
"column_number": 1,
"text": "'os' imported but unused",
"physical_line": "import os\n"
}
]
}
In GitLab by @pawamoy on Apr 6, 2021, 08:22
Hello @asottile, thanks for all the work you've done on flake8 and plugins :slight_smile:
I was wondering: does flake8 provide the necessary information for flake8-json to report a violation as disabled with a noqa comment, when using flake8's --disable-noqa
option? Knowing if a violation is disabled would help generating reports without having to run flake8 twice (once normally, once by disabling noqas) to compute the difference, or without having to parse the noqa comments ourselves.
If flake8 itself does not provide that information, then I'll see if I can open a ticket on flake8's bugtracker instead :slight_smile:
Maybe you'd also like to share your opinion on the subject? Does what I'm trying to achieve make sense?
By default, the output is not pretty-printed. We would love to add that as a separate formatter option, though.
Hello, are you still interested in adding support for pretty-printing the output?
If so, I'd be happy to contribute this option :)
In GitLab by @sigmavirus24 on Dec 1, 2020, 17:55
Merges code-climate -> master
The CodeClimate specification lists out the fields:
https://github.com/codeclimate/platform/blob/master/spec/analyzers/SPEC.md#data-types
the biggest concern I have is the fingerprint
generation function
here.
Namely, I'm worried that using the line_number
means this
functionality for CodeClimate won't work as expected.
In GitLab by @iainvm on Jul 26, 2021, 16:53
If the severity field was added to the codeclimate
format, the output would meet the requirements to be used for GitLab's Code Coverage
https://docs.gitlab.com/ee/user/project/merge_requests/code_quality.html#implementing-a-custom-tool
In GitLab by @NaughtMeta on Jan 18, 2021, 16:15
Merges metabytez-master-patch-71623 -> master
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.