Comments (9)
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.
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.
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.
.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.
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.
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.
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.
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.
Fixed in 3940ffc.
from haml-lint.
Related Issues (20)
- Multiline pipes in JS files cause RuboCop to report "unexpected token tRCURLY"
- Haml-lint is running rubocop to lint JavaScript regex HOT 1
- False positive Rails/HttpStatus HOT 1
- Failing spec on main branch HOT 2
- Add support to Haml 6.2
- `haml-lint:disable` is ignored when line breaks on commas are present
- Add `-s`/`--stdin` option support HOT 2
- Allow Haml 6.3 HOT 3
- Haml 6.2 actions are not listed among required checks HOT 1
- Failing spec on main (local environment, up to date rubocop)
- Issue with Rubocop `Layout/IndentationConsistency` interaction with haml comment blocks HOT 2
- Version 0.53.0 has not been pushed to Rubygems HOT 1
- RuboCop: Lint/Syntax: unexpected token tSYMBOL and kEND HOT 5
- 0.54.0: Too many files open HOT 4
- Layout/ArgumentAlignment - False positive? HOT 2
- Feature Suggestion: require strict locals
- Possible false positives with Rails/FindEach
- Lint/Syntax: unexpected token kDO_BLOCK | Lint/Syntax: unexpected token kEND HOT 1
- False positive with Layout/SpaceInsideParens for multi-line attributes HOT 4
- Allow multiple reporters?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from haml-lint.