ivantsepp / codeclimate-scss-lint

Code Climate Engine for SCSS-Lint
8 stars 6 forks source link

engine scss-lint failed because of folder with subfolders #20

Open patrickbussmann opened 5 years ago

patrickbussmann commented 5 years ago

This is how I run codeclimate.

$ docker run -it --rm --env CODECLIMATE_CODE="/code" -v "$PWD":/code -v /var/run/docker.sock:/var/run/docker.sock -v /tmp/cc:/tmp/cc codeclimate/codeclimate analyze

And thats the result.

Starting analysis
Running structure: Done!
Running duplication: Done!
Running csslint: Done!
Running scss-lint: Done!
error: (CC::CLI::Analyze::EngineFailure) engine scss-lint failed with status 1 and stderr
/usr/lib/ruby/gems/2.2.0/gems/scss_lint-0.54.0/lib/scss_lint/engine.rb:64:in `read': No such file or directory @ rb_sysopen - assets/ (Errno::ENOENT)
        from /usr/lib/ruby/gems/2.2.0/gems/scss_lint-0.54.0/lib/scss_lint/engine.rb:64:in `build_from_file'
        from /usr/lib/ruby/gems/2.2.0/gems/scss_lint-0.54.0/lib/scss_lint/engine.rb:52:in `build'
        from /usr/lib/ruby/gems/2.2.0/gems/scss_lint-0.54.0/lib/scss_lint/engine.rb:27:in `initialize'
        from /usr/lib/ruby/gems/2.2.0/gems/scss_lint-0.54.0/lib/scss_lint/runner.rb:31:in `new'
        from /usr/lib/ruby/gems/2.2.0/gems/scss_lint-0.54.0/lib/scss_lint/runner.rb:31:in `find_lints'
        from /usr/lib/ruby/gems/2.2.0/gems/scss_lint-0.54.0/lib/scss_lint/runner.rb:19:in `block in run'
        from /usr/lib/ruby/gems/2.2.0/gems/scss_lint-0.54.0/lib/scss_lint/runner.rb:18:in `each'
        from /usr/lib/ruby/gems/2.2.0/gems/scss_lint-0.54.0/lib/scss_lint/runner.rb:18:in `run'
        from /usr/lib/ruby/gems/2.2.0/gems/scss_lint-0.54.0/lib/scss_lint/cli.rb:67:in `scan_for_lints'
        from /usr/lib/ruby/gems/2.2.0/gems/scss_lint-0.54.0/lib/scss_lint/cli.rb:59:in `act_on_options'
        from /usr/src/app/lib/cc/engine/scss-lint.rb:20:in `block in run'
        from /usr/src/app/lib/cc/engine/scss-lint.rb:18:in `chdir'
        from /usr/src/app/lib/cc/engine/scss-lint.rb:18:in `run'
        from /usr/src/app/bin/codeclimate-scss-lint:9:in `<main>'

Thats the .scss-lint.yml.

scss_files: '**/*.scss'

exclude: '**/node_modules'

linters:
  BorderZero:
    enabled: false

  Indentation:
    severity: warning
    width: 2

And here the .codeclimate.yml.

---
version: "2"
plugins:
  csslint:
    enabled: true
  scss-lint:
    enabled: true
  duplication:
    enabled: true
    config:
      languages:
      - javascript
      - typescript
  fixme:
    enabled: true
  tslint:
    enabled: true
    config: tslint.json
exclude_patterns:
- .idea/
- .vscode/
- dist/
- features/
- "**/node_modules/"
- "**/spec/"
- "**/*.d.ts"
- "**/*.spec.ts"

And thats how my project looks like. (small tree)

.
|-- README.md
|-- app.bootstrap.js
|-- app.bootstrap.js.map
|-- app.bootstrap.ts
|-- app.html
|-- app.module.js
|-- app.module.js.map
|-- app.module.ts
|-- assets
|   |-- css
|   |   `-- styles.scss
|-- .codeclimate.yml
|-- tsconfig.json
|-- tslint.json

What is the mistake here?

wfleming commented 5 years ago

Hi Patrick,

Can you provide a bit more details about your environment (OS, etc.), and also run with --env CODECLIMATE_DEBUG=1 added to your docker run and post the output of that here?

I'm also curious what's prompting you to construct the docker run command by hand and not use the wrapper script packaged with the CLI.