Skip to content

Commit

Permalink
Merge pull request docopt#8 from amtrack/docopt-0.6.2-compatibility
Browse files Browse the repository at this point in the history
Docopt 0.6.2 compatibility
  • Loading branch information
stuartcarnie committed Apr 13, 2015
2 parents e93e023 + 7558e30 commit 032835f
Show file tree
Hide file tree
Showing 11 changed files with 1,318 additions and 1,499 deletions.
6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ node_js:
- "0.12"
- "0.11"
- "0.10"
- "iojs"
script:
- npm run test
- npm run test_cases
# - npm run lint
- npm run lint
notifications:
email: false
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pass to the `docopt` function.
API `{docopt} = require 'docopt'`
---------------------------------

### `options = docopt(doc, {argv: process.argv[2..], help: true, version: null, options_first: false})`
### `options = docopt(doc, {argv: process.argv[2..], help: true, version: null, options_first: false, exit: true})`

`docopt` takes 1 required argument, and 3 optional keyword arguments:

Expand Down Expand Up @@ -68,13 +68,17 @@ version of your program. If supplied, then, if the parser encounters
`version` could be any printable object, but most likely a string,
e.g. `'2.1.0rc1'`.

* `options_first`, by default `False`. If set to `True` will
* `options_first`, by default `false`. If set to `true` will
disallow mixing options and positional argument. I.e. after first
positional argument, all arguments will be interpreted as positional
even if the look like options. This can be used for strict
compatibility with POSIX, or if you want to dispatch your arguments
to other programs.

* `exit`, by default `true`. If set to `false` will
cause docopt to throw exceptions instead of printing the error to console and terminating the application.
This flag is mainly for testing purposes.

**Note:** Although `docopt` automatically handles `-h`, `--help` and `--version` options,
you still need to mention them in the options description (`doc`) for your users to
know about them.
Expand Down
120 changes: 120 additions & 0 deletions coffeelint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
{
"arrow_spacing": {
"level": "ignore"
},
"braces_spacing": {
"level": "ignore",
"spaces": 0
},
"camel_case_classes": {
"level": "error"
},
"coffeescript_error": {
"level": "error"
},
"colon_assignment_spacing": {
"level": "ignore",
"spacing": {
"left": 0,
"right": 0
}
},
"cyclomatic_complexity": {
"value": 10,
"level": "ignore"
},
"duplicate_key": {
"level": "error"
},
"empty_constructor_needs_parens": {
"level": "ignore"
},
"ensure_comprehensions": {
"level": "warn"
},
"indentation": {
"value": 4,
"level": "error"
},
"line_endings": {
"level": "ignore",
"value": "unix"
},
"max_line_length": {
"value": 80,
"level": "ignore",
"limitComments": true
},
"missing_fat_arrows": {
"level": "ignore"
},
"newlines_after_classes": {
"value": 3,
"level": "ignore"
},
"no_backticks": {
"level": "error"
},
"no_debugger": {
"level": "warn"
},
"no_empty_functions": {
"level": "ignore"
},
"no_empty_param_list": {
"level": "ignore"
},
"no_implicit_braces": {
"level": "ignore",
"strict": true
},
"no_implicit_parens": {
"strict": true,
"level": "ignore"
},
"no_interpolation_in_single_quotes": {
"level": "ignore"
},
"no_plusplus": {
"level": "ignore"
},
"no_stand_alone_at": {
"level": "ignore"
},
"no_tabs": {
"level": "error"
},
"no_throwing_strings": {
"level": "error"
},
"no_trailing_semicolons": {
"level": "error"
},
"no_trailing_whitespace": {
"level": "error",
"allowed_in_comments": false,
"allowed_in_empty_lines": true
},
"no_unnecessary_double_quotes": {
"level": "ignore"
},
"no_unnecessary_fat_arrows": {
"level": "warn"
},
"non_empty_constructor_needs_parens": {
"level": "ignore"
},
"prefer_english_operator": {
"level": "ignore",
"doubleNotLevel": "ignore"
},
"space_operators": {
"level": "ignore"
},
"spacing_after_comma": {
"level": "ignore"
},
"transform_messes_up_line_numbers": {
"level": "warn"
}
}
Loading

0 comments on commit 032835f

Please sign in to comment.