Commit Graph

810 Commits

Author SHA1 Message Date
Casey Rodarmor
5663cb61a6 Use ...? instead of try!(...) (#72)
See https://blog.rust-lang.org/2016/11/10/Rust-1.13.html for more info.

Huge diff, but all tests still pass, so yolo.
2016-11-11 21:37:16 -08:00
Casey Rodarmor
bd69f3298e Link to justfiles here and in the wild (#69) 2016-11-11 20:54:50 -08:00
Casey Rodarmor
98990fe2ab Use clap's conflicts_with and requires (#68)
Seems better than writing it by hand.
2016-11-11 20:47:17 -08:00
Casey Rodarmor
0f9fb418a0 Add --dump option to print entire justfile (#67)
Already implemented Display for Justfile, so no reason not to expose it
to the user.

Also only allow one of --list, --dump, or --show, since they don't make
a lot of sense together.
2016-11-11 20:25:37 -08:00
Casey Rodarmor
d3c2d1acfa Test before publishing (#61)
Add the `test` recipe as a dependency of the `publish` recipe
2016-11-11 19:44:25 -08:00
Casey Rodarmor
976c4fd979 Bump version to 0.2.18 (#60)
Skipped 0.2.17 (which was published but yanked) because publish recipe was wrong
2016-11-11 19:28:37 -08:00
Casey Rodarmor
716b4eba19 Fix publish recipe (#59)
Sed command didn't deal with variable amounts of whitespace.
2016-11-11 19:23:46 -08:00
Casey Rodarmor
510a269d00 Remove unnecessary lifetimes (#58)
Thanks clippy!
2016-11-11 19:12:44 -08:00
Casey Rodarmor
b038490061 Add done recipe that cleans up a merged branch (#57)
Rebases BRANCH on github master and deletes if merged.
2016-11-11 18:52:27 -08:00
Casey Rodarmor
2882b78de5 Don't ignore --color=never (#56)
Fixes a bug where `--color=never` was ignored.
2016-11-11 18:46:04 -08:00
Casey Rodarmor
ac7634000e Fix error messages with wide character
Input may contain tabs and other characters whose byte widths do not
correspond to their display widths. This causes error context
underlining to be off when lines contain those characters

Fixed by properly accounting for the display width of characters, as
well as replacing tabs with spaces when printing error messages.
2016-11-11 17:32:35 -08:00
Casey Rodarmor
4d20ffeac4 Use colors in output
This is a pretty gross commit, since it also includes a lot of
unrelated refactoring, especially of how error messages are printed.

Also adds a lint recipe that prints lines over 100 characters

To test, I added a `--color=[auto|always|never]` option that defaults to
auto in normal use, but can be forced to `always` for testing. In `auto`
mode it defers to `atty` to figure out if the current stream is a
terminal and uses color if so.

Color printing is controlled by the `alternate` formatting flag.

When printing an error message, using `{:#}` will print it with colors
and `{}` will print it normally.
2016-11-11 17:32:35 -08:00
Casey Rodarmor
6b888bbfe4 Fix off by one error in backtick error message (#52)
I was using the width of the index of the line, not the displayed line
number, which is the index + 1, which could cause the error message to
be misaligned.

Fixed it, and added a test that checks for this.
2016-11-11 17:15:16 -08:00
Casey Rodarmor
74fa6d4962 Include line in all error messages (#51)
I had previously not included the line for some error messages, but I
don't think that I had a good reason why, and they look pretty good,
so adding them back for consistency.
2016-11-11 17:09:51 -08:00
Casey Rodarmor
59136a1145 Add no-op recipe to justfile for testing (#50)
Useful for testing using `cargo run -- nop` to make sure that things aren't horribly broken.
2016-11-11 17:05:14 -08:00
Casey Rodarmor
2bc55ba815 Improve a few error messages (#47)
Surround variables with backticks, capitalize first letter of error
message, inflect properly depending on number of unknown overrides, and
improve wording.

Also added build dependency to `filter` recipe.
2016-11-11 14:33:17 -08:00
Casey Rodarmor
e3aa13e5dd Add integration tests for arguments (#42)
There were unit tests, but it seems like a good idea to test this end to end.
2016-11-11 13:34:28 -08:00
Casey Rodarmor
f071f75c67 Improve recipes with parameters section of readme (#41) 2016-11-11 13:31:26 -08:00
Casey Rodarmor
ef39637c00 Add examples of comments to readme (#40)
Thanks @vitiral for suggesting this.
2016-11-11 13:04:47 -08:00
Jason Grlicky
1aebe92199 Fixed typo in Readme (#38)
`not.` -> `not`
2016-11-11 12:30:17 -08:00
Casey Rodarmor
c775828d3c Use version from env! macro (#37)
This saves us from having to manually keep the version string in app.rs
up to date, so we can also drop that check from the publish recipe.

Fixes #36
2016-11-10 23:09:02 -08:00
Casey Rodarmor
5b3ef9f11a Format Cargo.toml (#33) 2016-11-07 22:06:33 -08:00
Casey Rodarmor
2b55ae35bb Use colored help message (#32)
💙💜💚❤️💛
2016-11-07 21:05:07 -08:00
Casey Rodarmor
7facd26508 Add frequently asked questions in FAQ.mq (#31) 2016-11-06 19:18:38 -08:00
Casey Rodarmor
75ba7e1e8c Turn off Travis email notifications (#29) 2016-11-06 12:52:59 -08:00
Casey Rodarmor
d56ab91e8d Add build status badge to readme (#27) 2016-11-06 01:33:00 -07:00
Casey Rodarmor
aa1323335e Add Travis CI (#26)
All green: https://travis-ci.org/casey/just/builds/173628514

😸
2016-11-06 01:29:52 -07:00
Florian Gilcher
5d98bab31d Fix small typo in readme (#22)
suprising -> surprising
2016-11-05 13:13:27 -07:00
Casey Rodarmor
39a78c968f Bump version to 0.2.16 (#21) 2016-11-05 01:54:44 -07:00
Casey Rodarmor
6861a346c3 Create a unique branch when bumping version (#20) 2016-11-05 01:51:56 -07:00
Casey Rodarmor
9a742e6336 Allow justfile to be named Justfile (#19)
Priority is given to `justfile` to match the behavior of GNU make.
2016-11-05 01:25:36 -07:00
Casey Rodarmor
adef254b23 Avoid bashisms in tests (#18)
Since `sh` might be different depending on the system, avoid testing
status codes and error messages that are not the same across all `sh`s
2016-11-05 01:19:54 -07:00
Casey Rodarmor
e4d35a8270 Add --quiet/-q flag to supress all output (#17)
This is for avoiding writing to stderr during tests,
although it's a nice option so it feels worth exposing
to users.
2016-11-05 01:01:43 -07:00
Casey Rodarmor
599cc80f86 Move all run options into a struct (#16)
In preparation for adding a --quiet flag, since the number of parameters
to run is getting a bit silly.
2016-11-05 00:31:38 -07:00
Casey Rodarmor
416f3b3d59 Add a 'filter' pattern to justfile (#15)
Useful for filtering tests
2016-11-04 23:56:15 -07:00
Casey Rodarmor
6610a721ea Merge pull request #14 from casey/whyc-typo
Fix "whyc" typo in README.md
2016-11-04 23:21:14 -07:00
Casey Rodarmor
7bc2be2caf Fix "whyc" typo in README.md 2016-11-04 23:18:20 -07:00
Casey Rodarmor
dd16fe316b Bump version to v0.2.15 2016-11-02 22:06:52 -07:00
Casey Rodarmor
9f2568c461 Fix tab-indented lines in shebang recipes
Fixed a precedence bug in the recipe parser where tab-indented
lines in a shebang recipe would trigger an ExtraLeadingWhitespace
error.
2016-11-02 22:02:29 -07:00
Casey Rodarmor
ac996f8940 Push code before publishing 2016-11-02 00:28:33 -07:00
Casey Rodarmor
f9abb72887 New publish recipe, bump version to 0.2.14 to test. 2016-11-02 00:19:07 -07:00
Casey Rodarmor
3b312e2728 Add escape sequences and raw strings to README.md 2016-11-02 00:09:58 -07:00
Casey Rodarmor
3fb4fc8074 Bump version 2016-10-31 23:04:58 -07:00
Casey Rodarmor
390491f7fa Readme done 2016-10-31 22:13:12 -07:00
Casey Rodarmor
398fb15c8b Readme. 2016-10-31 22:07:48 -07:00
Casey Rodarmor
763f73f0a8 Readme and notes 2016-10-31 22:06:28 -07:00
Casey Rodarmor
ed14b4d32a Readme wording 2016-10-31 22:05:31 -07:00
Casey Rodarmor
aeedf5ddff Mention overrides. 2016-10-31 22:03:27 -07:00
Casey Rodarmor
cef8b4fbdf Updated readme 2016-10-31 21:53:31 -07:00
Casey Rodarmor
ca9a0b7bff Update readme. 2016-10-31 21:27:10 -07:00