Skip to content

Conversation

@mrmr1993
Copy link
Contributor

This PR attempts to add automatic style guide checking. Specifically, it

  • moves the style guide into the repository.
  • adds a coffeelint configuration to check (a subset of) the style guide recommendations.
  • adds cake lint to run coffeelint.
  • integrates cake lint into travis-ci.
  • makes the changes suggested by cake lint.

All code style violations caught by coffeelint are currently set to warn, so will not fail the travis build. This can be changed if certain violations are deemed unacceptable.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should actually rewrite this method to use bindings correctly:

 should "handle self-removing handlers correctly", ->
     @handlerStack.push { keydown: => @handler1Called = true }
     @handlerStack.push { keydown: =>
       @handler2Called = true
...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@deiga done

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just realised that the whole point of the test is that @remove() removes the handler, and so we need the ctx variable. Reverted.

This makes the changes to the code suggested by coffeelint.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants