Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

Commit

Permalink
Travis test (#73)
Browse files Browse the repository at this point in the history
Add Travis-CI configuration
  • Loading branch information
Arcanemagus committed May 4, 2016
1 parent 00d0429 commit f0b6a43
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules/
Gemfile.lock
46 changes: 46 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Project specific configuration
language: ruby

rvm:
- 2.1.8
- 2.2.4
- 2.3.0

env:
global:
# For regular user installations this will be taken care of by package-deps
# However, package activation doesn't wait on the Promise that returns so
# we are just forcing it's installation here.
- APM_TEST_PACKAGES="language-haml"

matrix:
- ATOM_CHANNEL=stable
- ATOM_CHANNEL=beta

os:
- linux

# Generic configuration
notifications:
email:
on_success: never
on_failure: change

sudo: false

addons:
apt:
packages:
- build-essential
- git
- libgnome-keyring-dev
- fakeroot

git:
depth: 10

branches:
only:
- master

script: 'curl -s https://raw.githubusercontent.com/atom/ci/master/build-package.sh | sh'
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source 'https://rubygems.org'

gem 'haml_lint'
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
linter-haml
=========================

[![Build Status](https://travis-ci.org/AtomLinter/linter-haml.svg?branch=master)](https://travis-ci.org/AtomLinter/linter-haml)

This linter plugin for [Linter](https://github.com/AtomLinter/Linter) provides an interface to [haml-lint](https://github.com/causes/haml-lint). It will be used with files that have the "HAML" syntax.

## Installation
Expand Down
6 changes: 3 additions & 3 deletions lib/linter.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class Linter
lintOnFly: true

constructor: ->
require('atom-package-deps').install()
require('atom-package-deps').install('linter-haml')
@subscriptions = new CompositeDisposable
@subscriptions.add atom.config.observe 'linter-haml.copyRubocopYml', (copyRubocopYml) =>
@copyRubocopYml = copyRubocopYml
Expand Down Expand Up @@ -89,7 +89,7 @@ class Linter
.then ->
resolve results
.catch (error) ->
console.error 'linter-haml error', error
console.error error
resolve results

lintFile: (textEditor, tempFile, hamlLintYmlPath) ->
Expand All @@ -98,7 +98,7 @@ class Linter
textBuffer = textEditor.getBuffer()

args = []
if hamlLintYmlPath?
if hamlLintYmlPath? && hamlLintYmlPath != ''
args.push '--config'
args.push hamlLintYmlPath
args.push tempFile
Expand Down
1 change: 1 addition & 0 deletions lib/main.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ module.exports =
type: 'string'

globalHamlLintYmlFile:
default: ''
description: 'Full path to a global Haml lint file, if no other is found'
type: 'string'

Expand Down

0 comments on commit f0b6a43

Please sign in to comment.