codeclimate / codeclimate-eslint

Code Climate Engine for ESLint
MIT License
95 stars 93 forks source link

analysis incorrectly reporting 0 issues (cli and app) #397

Closed chrisbutler closed 3 years ago

chrisbutler commented 6 years ago

Actual Behavior

yarn eslint <path to file> correctly reports an error with react/sort-comp codeclimate analyze -e eslint reports no errors

Expected Behavior

codeclimate output would match eslint output

Steps to reproduce

ESLINT CONFIG

  "parser": "babel-eslint",
  "parserOptions": {
    "ecmaVersion": 6,
    "sourceType": "module",
  },

CC CONFIG

eslint:
    enabled: true
    channel: "eslint-4"
    config:
      config: "express/.eslintrc.js"

ESLINT OUTPUT

  12:3  warning  defaultProps should be placed after propTypes  react/sort-comp

✖ 1 problem (0 errors, 1 warning)

CODECLIMATE OUTPUT

Starting analysis
I, [2018-06-14T16:40:09.074039 #1]  INFO -- : starting engine eslint
D, [2018-06-14T16:40:09.097254 #1] DEBUG -- : /config.json content: {"enabled"=>true, "channel"=>"eslint-4", "config"=>{"config"=>"express/.eslintrc.js"}, "include_paths"=>["express/src/components/<redacted>.js"], "debug"=>"1"}
D, [2018-06-14T16:40:09.111422 #1] DEBUG -- : docker run: ["docker", "run", "--name", "cc-engines-eslint-eslint-4-032c9399-2fa6-45b1-9d22-ba7aecf03bf5", "--cap-drop", "all", "--label", "com.codeclimate.label=1b56069c-7f6e-4140-ba39-b0c091a9f811", "--log-driver", "none", "--memory", "1024000000", "--memory-swap", "-1", "--net", "none", "--rm", "--volume", "<redacted>:/code:ro", "--volume", "/tmp/cc/6e42ccd6-3800-46b4-97af-9ee318395540:/config.json:ro", "--user", "9000:9000", "codeclimate/codeclimate-eslint:eslint-4"]
D, [2018-06-14T16:40:10.301094 #1] DEBUG -- : engine stderr: ESLint is running with the /usr/local/node_modules/babel-eslint/lib/index.js parser.
I, [2018-06-14T16:40:11.150952 #1]  INFO -- : finished engine eslint

Analysis complete! Found 0 issues.
ad1992 commented 6 years ago

I also faced a similar issue. Eslint reports no errors but codeclimate reports UNSAFE_componentWillMount should be placed after componentDidMount eslint config

plugins:
  eslint:
    enabled: true
    channel: "eslint-4"
    config:
      config: .eslintrc.js
asif-capt commented 5 years ago

Has there been any investigation into why codeclimate analyze -e eslint <file> is outputting different results than eslint <file> despite both using the same eslint configuration?

efueger commented 3 years ago

apologies for the silence on this @chrisbutler - let me know if this is still an issue. closing it out for now 👌🏻