Git Product home page Git Product logo

Comments (9)

sds avatar sds commented on June 16, 2024

Hey @jarinudom, thanks for the report.

Without access to one of your files I can't dig into this further, as I don't see this behavior on my end.

One thing that's odd about this is the line number that's reported is shown as 0--this is not what I would expect unless your file was empty.

If you post the file in question (the original file--I imagine copy/pasting it will lose any formatting that may allow this to be reproduced), I can have a closer look. Thanks!

from haml-lint.

jarinudom avatar jarinudom commented on June 16, 2024

Here's a file from Devise that is giving me the same error:

[ruby-2.1.5] ~/projects/foo <feature/bar> ✗ haml-lint app/views/users/shared/_errors.html.haml
app/views/users/shared/_errors.html.haml:0 [W] RuboCop: Style/TrailingBlankLines: Trailing blank line missing.

https://dl.dropboxusercontent.com/u/555412/_errors.html.haml

from haml-lint.

sds avatar sds commented on June 16, 2024

When I wget that file and run haml-lint _errors.html.haml I get no errors.

What are the contents of your .haml-lint.yml and .rubocop.yml files?

from haml-lint.

jarinudom avatar jarinudom commented on June 16, 2024

.haml-lint.yml:

linters:
  LineLength:
    max: 100

.rubocop.yml:

inherit_from: .rubocop_todo.yml

AllCops:
  RunRailsCops: true
  Include:
    - Capfile
    - config.ru
    - Gemfile
    - Rakefile
  Exclude:
    - bin/**/*
    - db/**/*
    - vendor/**/*

require: rubocop-rspec

Style/Documentation:
  Enabled: false

Style/ClassAndModuleChildren:
  Enabled: false

Style/TrailingBlankLines:
  EnforcedStyle: final_blank_line

Style/StringLiterals:
  EnforcedStyle: double_quotes

Metrics/LineLength:
  Max: 100

.rubocop-todo.yml:

# This configuration was generated by `rubocop --auto-gen-config`
# on 2015-02-18 17:14:32 -0800 using RuboCop version 0.29.1.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.

# Offense count: 42
Metrics/AbcSize:
  Max: 127

# Offense count: 7
# Configuration parameters: CountComments.
Metrics/ClassLength:
  Max: 296

# Offense count: 6
Metrics/CyclomaticComplexity:
  Max: 16

# Offense count: 34
# Configuration parameters: CountComments.
Metrics/MethodLength:
  Max: 79

# Offense count: 6
Metrics/PerceivedComplexity:
  Max: 17

# Offense count: 4
# Configuration parameters: Include.
Rails/HasAndBelongsToMany:
  Enabled: false

# Offense count: 4
# Configuration parameters: MinBodyLength.
Style/GuardClause:
  Enabled: false

from haml-lint.

sds avatar sds commented on June 16, 2024

Hmm, still not able to reproduce anything.

What version of ruby, rubocop, and haml-lint are you running?

ruby -v
rubocop -v
haml-lint -v

from haml-lint.

jarinudom avatar jarinudom commented on June 16, 2024

ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-darwin14]
rubocop: 0.29.1 (it's actually gem "rubocop", github: "bbatsov/rubocop", require: false)
haml-lint 0.11.0

from haml-lint.

sds avatar sds commented on June 16, 2024

If you're running a version of rubocop that isn't a tagged release you need to give me the commit hash it's locked to in your Gemfile.lock. It may very well be a problem with RuboCop itself.

from haml-lint.

jarinudom avatar jarinudom commented on June 16, 2024

Hey sure thing, here you go:

GIT
  remote: git://github.com/bbatsov/rubocop.git
  revision: 7c1c28e153168cf379c8b6e71119230be096d625
  specs:
    rubocop (0.29.1)
      astrolabe (~> 1.3)
      parser (>= 2.2.0.1, < 3.0)
      powerpack (~> 0.1)
      rainbow (>= 1.99.1, < 3.0)
      ruby-progressbar (~> 1.4)

from haml-lint.

sds avatar sds commented on June 16, 2024

Fixed in 3940ffc.

from haml-lint.

Related Issues (20)

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.