purpleclay / misspell-codeclimate Goto Github PK
View Code? Open in Web Editor NEWTurn that misspell report into a GitLab compatible Code Climate report
License: MIT License
Turn that misspell report into a GitLab compatible Code Climate report
License: MIT License
Format the default report provided by misspell
into a CodeClimate format that is recognisable by GitLab, and can effectively be used to annotate merge requests.
Sample output:
docs/README.md:1:14: "incorectly" is a misspelling of "incorrectly"
Expose the reading of the input file through a -f
flag within the CLI. Upon reading the file, the parsed content will be translated into the expected JSON format and written to Stdout, where it can then be piped into a file within a GitLab job.
The current report format is broken down into the following sub-parts, based on the documented Go template:
{{ .Filename }}:{{ .Line }}:{{ .Column }}:corrected {{ printf "%q" .Original }} to "{{ printf "%q" .Corrected }}"
This should map fairly easily to the following CodeClimate format:
[
{
"description": "\"incorectly\" is a misspelling of \"incorrectly\"",
"fingerprint": "7815696ecbf1c96e6894b779456d330e",
"severity": "minor",
"location": {
"path": "docs/README.md",
"lines": {
"begin": 1
}
}
}
]
https://docs.gitlab.com/ee/ci/testing/code_quality.html#implementing-a-custom-tool
Using strings.Split()
is causing inconsistent results. So switching to using a bufio scanner for file reading should better support edge cases
Switch to using a bufio.NewScanner()
and read the file line by line. Process each line in turn as per normal.
No response
To use misspell-codeclimate
within GitLab currently, both binaries need to be downloaded and installed. This could be a lot simpler by using a pre-built docker image.
Package up the required binaries into a docker container that can be used within a GitLab job.
No response
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.