Giter Site home page Giter Site logo

codeclimate-fixme's Introduction

Code Climate FIXME Engine

codeclimate-fixme is a Code Climate engine that performs a case-sensitive search for the following strings in your project:

  • TODO
  • FIXME
  • HACK
  • BUG
  • XXX

These strings are things you should fix now, not later.

codeclimate-fixme is also very simple, and is intended to provide a Hello World like template for Code Climate Platform engine authors. It is implemented in JavaScript as an NPM package.

Installation & Usage

  1. If you haven't already, install the Code Climate CLI.
  2. Run codeclimate engines:enable fixme. This command both installs the engine and enables it in your .codeclimate.yml file.
  3. You're ready to analyze! Browse into your project's folder and run codeclimate analyze.

Configuration

You can specify what strings to match by adding a strings key in your .codeclimate.yml:

engines:
  fixme:
    enabled: true
    config:
      strings:
      - FIXME
      - CUSTOM

NOTE: values specified here override the defaults, they are not additional strings to match.

Need help?

For help with codeclimate-fixme, please open an issue on this repository.

If you're running into a Code Climate issue, first look over this project's GitHub Issues, as your question may have already been covered. If not, go ahead and open a support ticket with us.

codeclimate-fixme's People

Contributors

brynary avatar connerman avatar dantevvp avatar gdiggs avatar jpignata avatar maxjacobson avatar mrb avatar pbrisbin avatar ryankennedy avatar vovimayhem avatar wfleming avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

codeclimate-fixme's Issues

Case Question - Please add more info in the DOCs

I inherited a project with the following:

  fixme:
    enabled: true
    config:
      strings:
      - FIXME
      - TODO
      - ToDo
      - Todo
      - todo
      - TO-DO
      - To-Do
      - HACK
      - Hack
      - hack
      - HERE BE DRAGONS
      - Here Be Dragons

My question is how does fixme handle case? Do I need all of the above or can I reduce it to the following:

  fixme:
    enabled: true
    config:
      strings:
      - FIXME
      - TODO
      - TO-DO
      - HACK
      - HERE BE DRAGONS

Also can you allow some level of regex so I can do the following:

  fixme:
    enabled: true
    config:
      strings:
      - FIX[-\s]*ME
      - TO[-\s]*DO
      - HACK
      - HERE[-\s]*BE[-\s]*DRAGONS

Thanks!!

Only search comments

Fixme has yelled at us for having 'xxx' show up in strings and for having 'bug' show up in comments describing a bug that a particular test solves for.

It seems to me that fixme should only trigger off of strings that are allcaps, followed by a colon, and in comments.

FWIW.

Better descriptions

Rather than always emitting "Code comment found that needs your attention.", what about e.g.:

FIXME found
TODO found
etc.

Allow configuring of strings

It would be nice if I could specify what strings this should use. For example, I might not care about TODOs or I may have some other string I'd like to alert on.

exclude_paths is not working as expected

I'm experiencing the same issue as #19 which is closed. I'm opening a new one in case you do not want to reopen the previous bug.

I'm evaluating this for our private repos on a trial, but not getting good results due to this. My .codeclimate.yml:

engines:
  duplication:
    enabled: true
    config:
      languages:
      - go
  fixme:
    enabled: true
  gofmt:
    enabled: true
  golint:
    enabled: true
  govet:
    enabled: true
ratings:
  paths:
  - "**.go"
exclude_paths:
- Godeps/**/*

Trimmed output is:

Starting analysis

== Godeps/_workspace/src/github.com/ajg/form/decode.go (2 issues) ==
18: exported func NewDecoder returns unexported type *form.decoder, which can be annoying to use [golint]
282: TODO found [fixme]

== Godeps/_workspace/src/github.com/ajg/form/encode.go (1 issue) ==
20: exported func NewEncoder returns unexported type *form.encoder, which can be annoying to use [golint]

== Godeps/_workspace/src/github.com/ajg/form/node.go (2 issues) ==
34: TODO found [fixme]
39: TODO found [fixme]

== Godeps/_workspace/src/github.com/ajg/form/pre-commit.sh (2 issues) ==
3: TODO found [fixme]
4: FIXME found [fixme]

I have also tried the many different variants of the exclude_paths selection with Godeps/, Godeps/, Godeps//*. With quotes/without quotes.

Latest version of codeclimate and latest docker images:

codeclimate --version
0.20.0
docker images | grep codeclimate
codeclimate/codeclimate-csslint       latest              468d26f5e706        24 hours ago        133.5 MB
codeclimate/codeclimate-eslint        latest              bba6f4524ffe        4 days ago          90.44 MB
codeclimate/codeclimate               latest              62eca8db5a53        4 days ago          95.09 MB
codeclimate/codeclimate-fixme         latest              868840c0a743        5 days ago          211 MB
codeclimate/codeclimate-duplication   latest              04e9cc6b0cc7        8 days ago          811 MB
codeclimate/codeclimate-govet         latest              88185bc0e1b0        5 weeks ago         217.6 MB
codeclimate/codeclimate-golint        latest              964303486d6d        5 weeks ago         11.22 MB
codeclimate/codeclimate-gofmt         latest              acae6da3479b        5 weeks ago         218.3 MB

Add XXX

Some developers use XXX in comments to flag issues. Add this to the strings we check.

Engine not found

$ codeclimate engines:enable fixme
Engine not found. Run 'codeclimate engines:list' for a list of valid engines.

codeclimate CLI version 0.0.10 (OSX)

FIXME warnings should (optionally) not fail build on Github Integration

When running a build it would be great to be able to still have FIXME issues noted in the CodeClimate build but not have it fail the build (they are often used to note known issues that may have tech debt tickets or just show there is intent to refactor and to point it out easily).

It's great to have that feature in really strict integration but it would be wonderful to turn that off - without turning FIXME validation off.

Thoughts?

Wrong output format in json output

It currently outputs this,

{  
   "type":"issue",
   "check_name":"FIXME",
   "description":"FIXME found",
   "categories":[  
      "Bug Risk"
   ],
   "location":{  
      "path":".r ubocop.yml",
      "lines":{  
         "begin":153,
         "end":153
      }
   },
   "engine_name":"fixme"
}

location.lines is not supposed to be there. According to the spec

"path": "path/to/file.css",
  "positions": {
    "begin": {
      "line": 3,
      "column": 10
    },
    "end": {
      "line": 4,
      "column": 12
    }
  }
}

Finding "fixme" lints in Rubocop.yml

We have a .rubocop.yml file committed to the repo with the following config included:

Style/CommentAnnotation:
  Description: Checks formatting of special comments (TODO, FIXME, OPTIMIZE, HACK,
    REVIEW).
  StyleGuide: https://github.com/bbatsov/ruby-style-guide#annotate-keywords
  Enabled: false
  Keywords:
  - TODO
  - FIXME
  - OPTIMIZE
  - HACK
  - REVIEW

These are all detected as problems, but they shouldn't be IMO.

Documentation Update

The line item : "Run codeclimate engines:enable fixme. This command both installs the engine and enables it in your .codeclimate.yml file."

Should be updated to use the codeclimate engines:install fixme command

TODO found in wrong file

image

Yes, I have TODO.md in my repo, with my private plans/ideas for the library, and it is .gitignored. I believe it should not be reported ¯\_(ツ)_/¯

Docker image is quite big...

Hi!

I think the current fixme image is bigger than it has to given the current docker common practice...

I think we can shrink it down to around 70MB from 212MB if we change the base to node:*-alpine

I'm sending a PR for that in some minutes...

exclude_paths does not work as expected (if at all.)

Given the following configuration:

engines:
  rubocop: { enabled: true }
  fixme:   { enabled: true }
ratings:
  paths:
  - "lib/**.rb"
exclude_paths:
- "vendor/**"

I get:

== vendor/*/rubocop-*/spec/rubocop/cop/style/documentation_spec.rb (4 issues) ==
9: TODO found [fixme]
9: FIXME found [fixme]
9: HACK found [fixme]
95: FIXME found [fixme]

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.