Code Monkey home page Code Monkey logo

misspell-codeclimate's Introduction

Hi there ๐Ÿ‘‹

Building tools to make developers' lives easier is my passion

misspell-codeclimate's People

Contributors

purpleclay avatar

Stargazers

 avatar

Watchers

 avatar  avatar

misspell-codeclimate's Issues

[Feature]: format the default output of misspell into a codeclimate report

Describe your feature

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"

Your potential solution

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
      }
    }
  }
]

Any additional information?

https://docs.gitlab.com/ee/ci/testing/code_quality.html#implementing-a-custom-tool

Code of Conduct

  • I agree to follow this project's Code of Conduct

[Feature]: switch to using a bufio scanner for more consistent file reading

Describe your feature

Using strings.Split() is causing inconsistent results. So switching to using a bufio scanner for file reading should better support edge cases

Your potential solution

Switch to using a bufio.NewScanner() and read the file line by line. Process each line in turn as per normal.

Any additional information?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

[Feature]: publish a container that can be used directly within GitLab

Describe your feature

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.

Your potential solution

Package up the required binaries into a docker container that can be used within a GitLab job.

Any additional information?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.