GithubHelp home page GithubHelp logo

Comments (7)

jschroeder9000 avatar jschroeder9000 commented on July 28, 2024

Thank you for the feedback and references. This seems like a simple request, I will try to implement this over the weekend.

from linter-haml.

johanlunds avatar johanlunds commented on July 28, 2024

That's awesome!

from linter-haml.

jschroeder9000 avatar jschroeder9000 commented on July 28, 2024

This feature has been implemented and released in v0.1.1. Please let me know if it does not meet your needs.

from linter-haml.

johanlunds avatar johanlunds commented on July 28, 2024

FYI, update:

It doesn't give an error now (which I seem to recall it did before when it couldn't find the executable path). However no lint-results show up.

ยฑ % which haml-lint                                                                                                                                     !8234
/usr/local/var/rbenv/shims/haml-lint
ยฑ % haml-lint app/views/admin/consignment.haml                                                                                                          !8233
app/views/admin/consignment.haml:3 [W] TrailingWhitespace: Line contains trailing whitespace
app/views/admin/consignment.haml:4 [W] RuboCop: Style/HashSyntax: Use the new Ruby 1.9 hash syntax.
app/views/admin/consignment.haml:4 [W] TrailingWhitespace: Line contains trailing whitespace
app/views/admin/consignment.haml:10 [W] RuboCop: Style/HashSyntax: Use the new Ruby 1.9 hash syntax.
app/views/admin/consignment.haml:10 [W] RuboCop: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
app/views/admin/consignment.haml:10 [W] RuboCop: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.

My config: https://gist.github.com/johanlunds/0720c4c67e8028296f1a#file-config-cson-L36-L37

Screenshot from Atom of the same file:

developer_tools_and_consignment_haml_-_users_johan_lunds_documents_kod_apoex2-atom_and_request__support_for_setting_path_to__haml-lint__executable issue__1 _atomlinter_linter-haml

Atom has been restarted and both plugins are active.

Versions:

  • linter-haml, 0.1.1
  • language-haml, 0.15.0
  • linter, 0.11.1
  • Ruby gem "haml-lint", 0.11.0

Any idea what it could be?

from linter-haml.

jschroeder9000 avatar jschroeder9000 commented on July 28, 2024

Hmm... I admit I feel a bit stumped. Everything seems to be in order there.

When I was testing the implementation, I dropped a haml-lint file in my home directory that was a simple shell script:

#!/bin/sh

echo "sessions/new.html.haml:1 [W] SpaceBeforeScript: Testing exe path"

This way I could easily detect if it was working the way I thought it should by setting my home directory as the executable path.

If you create a ~/haml-lint file (remember to make it executable) with the contents:

#!/bin/sh

echo "app/views/admin/consignment.haml:3 [W] TrailingWhitespace: Line contains trailing whitespace
app/views/admin/consignment.haml:4 [W] RuboCop: Style/HashSyntax: Use the new Ruby 1.9 hash syntax.
app/views/admin/consignment.haml:4 [W] TrailingWhitespace: Line contains trailing whitespace
app/views/admin/consignment.haml:10 [W] RuboCop: Style/HashSyntax: Use the new Ruby 1.9 hash syntax.
app/views/admin/consignment.haml:10 [W] RuboCop: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.                   
app/views/admin/consignment.haml:10 [W] RuboCop: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols."

And set the executable path to your home directory, do you get the expected results?

To debug further, you can set:

linter:
  lintDebug: true

In your config.cson to make the main linter package's console output much more verbose. Then try switching back and forth to/from haml files.

from linter-haml.

johanlunds avatar johanlunds commented on July 28, 2024

Just noticed: it works now! Don't know why or what changed, but perhaps I just needed to restart the editor or computer or something.

screen shot 2015-02-18 at 11 54 25

from linter-haml.

johanlunds avatar johanlunds commented on July 28, 2024

Thanks for all your help!

from linter-haml.

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.