2020-01-15 02:16:13 -08:00
|
|
|
#![deny(clippy::all, clippy::pedantic, clippy::restriction)]
|
|
|
|
#![allow(
|
2020-10-09 15:44:17 -07:00
|
|
|
clippy::blanket_clippy_restriction_lints,
|
2020-01-15 02:30:24 -08:00
|
|
|
clippy::comparison_chain,
|
2021-05-07 00:14:38 -07:00
|
|
|
clippy::create_dir,
|
|
|
|
clippy::default_numeric_fallback,
|
2020-01-15 02:16:13 -08:00
|
|
|
clippy::else_if_without_else,
|
|
|
|
clippy::enum_glob_use,
|
2021-05-07 00:14:38 -07:00
|
|
|
clippy::exhaustive_enums,
|
|
|
|
clippy::exhaustive_structs,
|
2020-07-16 21:37:33 -07:00
|
|
|
clippy::expect_used,
|
2020-01-15 02:30:24 -08:00
|
|
|
clippy::filter_map,
|
|
|
|
clippy::if_not_else,
|
|
|
|
clippy::implicit_return,
|
2020-01-15 02:16:13 -08:00
|
|
|
clippy::indexing_slicing,
|
2020-01-15 02:30:24 -08:00
|
|
|
clippy::integer_arithmetic,
|
2020-03-13 21:20:41 -07:00
|
|
|
clippy::let_underscore_must_use,
|
2020-07-16 21:37:33 -07:00
|
|
|
clippy::map_unwrap_or,
|
2020-01-15 02:30:24 -08:00
|
|
|
clippy::match_same_arms,
|
|
|
|
clippy::missing_docs_in_private_items,
|
2020-03-13 21:20:41 -07:00
|
|
|
clippy::missing_errors_doc,
|
2020-01-15 02:16:13 -08:00
|
|
|
clippy::missing_inline_in_public_items,
|
|
|
|
clippy::needless_pass_by_value,
|
2020-01-15 02:30:24 -08:00
|
|
|
clippy::non_ascii_literal,
|
2020-11-19 14:47:04 -08:00
|
|
|
clippy::option_if_let_else,
|
2020-01-15 02:30:24 -08:00
|
|
|
clippy::panic,
|
2020-11-19 14:47:04 -08:00
|
|
|
clippy::panic_in_result_fn,
|
2020-10-09 15:44:17 -07:00
|
|
|
clippy::pattern_type_mismatch,
|
2020-01-15 02:30:24 -08:00
|
|
|
clippy::print_stdout,
|
|
|
|
clippy::shadow_unrelated,
|
2020-01-15 02:16:13 -08:00
|
|
|
clippy::string_add,
|
2020-04-26 14:19:21 -07:00
|
|
|
clippy::struct_excessive_bools,
|
2020-01-15 02:30:24 -08:00
|
|
|
clippy::too_many_lines,
|
2021-02-15 01:18:31 -08:00
|
|
|
clippy::unnecessary_wraps,
|
2020-01-15 02:30:24 -08:00
|
|
|
clippy::unreachable,
|
2020-11-19 14:47:04 -08:00
|
|
|
clippy::unwrap_in_result,
|
2020-07-16 21:37:33 -07:00
|
|
|
clippy::unwrap_used,
|
2020-01-15 02:30:24 -08:00
|
|
|
clippy::use_debug,
|
2020-04-26 14:19:21 -07:00
|
|
|
clippy::wildcard_enum_match_arm,
|
|
|
|
clippy::wildcard_imports
|
2020-01-15 02:16:13 -08:00
|
|
|
)]
|
|
|
|
|
2018-10-13 03:12:35 -07:00
|
|
|
#[macro_use]
|
|
|
|
extern crate lazy_static;
|
|
|
|
|
|
|
|
#[cfg(test)]
|
|
|
|
#[macro_use]
|
2019-11-07 10:55:15 -08:00
|
|
|
pub mod testing;
|
|
|
|
|
|
|
|
#[cfg(test)]
|
|
|
|
#[macro_use]
|
|
|
|
pub mod tree;
|
|
|
|
|
|
|
|
#[cfg(test)]
|
|
|
|
pub mod node;
|
2018-10-13 03:12:35 -07:00
|
|
|
|
|
|
|
#[cfg(fuzzing)]
|
2019-09-21 15:35:03 -07:00
|
|
|
pub(crate) mod fuzzing;
|
2018-10-13 03:12:35 -07:00
|
|
|
|
2019-04-11 12:30:29 -07:00
|
|
|
mod alias;
|
2019-11-07 10:55:15 -08:00
|
|
|
mod analyzer;
|
|
|
|
mod assignment;
|
2018-10-13 03:12:35 -07:00
|
|
|
mod assignment_resolver;
|
2019-12-07 03:09:21 -08:00
|
|
|
mod binding;
|
2018-10-13 03:12:35 -07:00
|
|
|
mod color;
|
|
|
|
mod command_ext;
|
|
|
|
mod common;
|
|
|
|
mod compilation_error;
|
2019-04-19 02:40:25 -07:00
|
|
|
mod compilation_error_kind;
|
2019-11-07 10:55:15 -08:00
|
|
|
mod compiler;
|
2019-10-07 02:06:45 -07:00
|
|
|
mod config;
|
2019-10-09 00:18:53 -07:00
|
|
|
mod config_error;
|
2019-10-09 01:40:40 -07:00
|
|
|
mod count;
|
|
|
|
mod default;
|
2020-10-27 23:51:17 -07:00
|
|
|
mod delimiter;
|
2019-11-21 06:23:32 -08:00
|
|
|
mod dependency;
|
2019-10-09 01:40:40 -07:00
|
|
|
mod empty;
|
|
|
|
mod enclosure;
|
Gargantuan refactor (#522)
- Instead of changing the current directory with `env::set_current_dir`
to be implicitly inherited by subprocesses, we now use
`Command::current_dir` to set it explicitly. This feels much better,
since we aren't dependent on the implicit state of the process's
current directory.
- Subcommand execution is much improved.
- Added a ton of tests for config parsing, config execution, working
dir, and search dir.
- Error messages are improved. Many more will be colored.
- The Config is now onwed, instead of borrowing from the arguments and
the `clap::ArgMatches` object. This is a huge ergonomic improvement,
especially in tests, and I don't think anyone will notice.
- `--edit` now uses `$VISUAL`, `$EDITOR`, or `vim`, in that order,
matching git, which I think is what most people will expect.
- Added a cute `tmptree!{}` macro, for creating temporary directories
populated with directories and files for tests.
- Admitted that grammer is LL(k) and I don't know what `k` is.
2019-11-09 21:43:20 -08:00
|
|
|
mod error;
|
|
|
|
mod error_result_ext;
|
2019-12-07 03:09:21 -08:00
|
|
|
mod evaluator;
|
2018-10-13 03:12:35 -07:00
|
|
|
mod expression;
|
|
|
|
mod fragment;
|
|
|
|
mod function;
|
2019-04-15 22:40:02 -07:00
|
|
|
mod function_context;
|
|
|
|
mod interrupt_guard;
|
2018-10-13 03:12:35 -07:00
|
|
|
mod interrupt_handler;
|
2019-11-07 10:55:15 -08:00
|
|
|
mod item;
|
2018-10-13 03:12:35 -07:00
|
|
|
mod justfile;
|
2019-11-07 10:55:15 -08:00
|
|
|
mod keyed;
|
|
|
|
mod keyword;
|
2018-10-13 03:12:35 -07:00
|
|
|
mod lexer;
|
2019-11-07 10:55:15 -08:00
|
|
|
mod line;
|
2019-10-09 01:40:40 -07:00
|
|
|
mod list;
|
2018-10-13 03:12:35 -07:00
|
|
|
mod load_dotenv;
|
Gargantuan refactor (#522)
- Instead of changing the current directory with `env::set_current_dir`
to be implicitly inherited by subprocesses, we now use
`Command::current_dir` to set it explicitly. This feels much better,
since we aren't dependent on the implicit state of the process's
current directory.
- Subcommand execution is much improved.
- Added a ton of tests for config parsing, config execution, working
dir, and search dir.
- Error messages are improved. Many more will be colored.
- The Config is now onwed, instead of borrowing from the arguments and
the `clap::ArgMatches` object. This is a huge ergonomic improvement,
especially in tests, and I don't think anyone will notice.
- `--edit` now uses `$VISUAL`, `$EDITOR`, or `vim`, in that order,
matching git, which I think is what most people will expect.
- Added a cute `tmptree!{}` macro, for creating temporary directories
populated with directories and files for tests.
- Admitted that grammer is LL(k) and I don't know what `k` is.
2019-11-09 21:43:20 -08:00
|
|
|
mod load_error;
|
2019-11-07 10:55:15 -08:00
|
|
|
mod module;
|
|
|
|
mod name;
|
2019-04-19 02:17:43 -07:00
|
|
|
mod ordinal;
|
2019-07-13 01:55:06 -07:00
|
|
|
mod output;
|
|
|
|
mod output_error;
|
2018-10-13 03:12:35 -07:00
|
|
|
mod parameter;
|
2020-06-13 01:49:13 -07:00
|
|
|
mod parameter_kind;
|
2018-10-13 03:12:35 -07:00
|
|
|
mod parser;
|
|
|
|
mod platform;
|
2019-07-13 01:55:06 -07:00
|
|
|
mod platform_interface;
|
2019-04-15 22:40:02 -07:00
|
|
|
mod position;
|
Reform positional argument parsing (#523)
This diff makes positional argument parsing much cleaner, along with
adding a bunch of tests. Just's positional argument parsing is rather,
complex, so hopefully this reform allows it to both be correct and stay
correct.
User-visible changes:
- `just ..` is now accepted, with the same effect as `just ../`
- `just .` is also accepted, with the same effect as `just`
- It is now an error to pass arguments or overrides to subcommands
that do not accept them, namely `--dump`, `--edit`, `--list`,
`--show`, and `--summary`. It is also an error to pass arguments to
`--evaluate`, although `--evaluate` does of course still accept
overrides.
(This is a breaking change, but hopefully worth it, as it will allow us
to add arguments to subcommands which did not previously take
them, if we so desire.)
- Subcommands which do not accept arguments may now accept a
single search-directory argument, so `just --list ../` and
`just --dump foo/` are now accepted, with the former starting the
search for the justfile to list in the parent directory, and the latter
starting the search for the justfile to dump in `foo`.
2019-11-10 18:02:36 -08:00
|
|
|
mod positional;
|
2018-10-13 03:12:35 -07:00
|
|
|
mod range_ext;
|
|
|
|
mod recipe;
|
2019-04-15 22:40:02 -07:00
|
|
|
mod recipe_context;
|
2018-10-13 03:12:35 -07:00
|
|
|
mod recipe_resolver;
|
|
|
|
mod run;
|
|
|
|
mod runtime_error;
|
2019-12-07 03:09:21 -08:00
|
|
|
mod scope;
|
2019-06-01 22:38:03 -07:00
|
|
|
mod search;
|
Gargantuan refactor (#522)
- Instead of changing the current directory with `env::set_current_dir`
to be implicitly inherited by subprocesses, we now use
`Command::current_dir` to set it explicitly. This feels much better,
since we aren't dependent on the implicit state of the process's
current directory.
- Subcommand execution is much improved.
- Added a ton of tests for config parsing, config execution, working
dir, and search dir.
- Error messages are improved. Many more will be colored.
- The Config is now onwed, instead of borrowing from the arguments and
the `clap::ArgMatches` object. This is a huge ergonomic improvement,
especially in tests, and I don't think anyone will notice.
- `--edit` now uses `$VISUAL`, `$EDITOR`, or `vim`, in that order,
matching git, which I think is what most people will expect.
- Added a cute `tmptree!{}` macro, for creating temporary directories
populated with directories and files for tests.
- Admitted that grammer is LL(k) and I don't know what `k` is.
2019-11-09 21:43:20 -08:00
|
|
|
mod search_config;
|
2019-06-01 22:38:03 -07:00
|
|
|
mod search_error;
|
2019-11-10 23:17:47 -08:00
|
|
|
mod set;
|
|
|
|
mod setting;
|
|
|
|
mod settings;
|
2018-10-13 03:12:35 -07:00
|
|
|
mod shebang;
|
2019-10-09 01:40:40 -07:00
|
|
|
mod show_whitespace;
|
2021-04-04 16:41:02 -07:00
|
|
|
mod string_kind;
|
2019-04-15 22:40:02 -07:00
|
|
|
mod string_literal;
|
2019-10-07 04:04:39 -07:00
|
|
|
mod subcommand;
|
2020-04-26 14:19:21 -07:00
|
|
|
mod suggestion;
|
2019-11-07 10:55:15 -08:00
|
|
|
mod table;
|
2019-11-21 10:14:10 -08:00
|
|
|
mod thunk;
|
2018-10-13 03:12:35 -07:00
|
|
|
mod token;
|
2019-04-15 22:40:02 -07:00
|
|
|
mod token_kind;
|
2021-04-05 21:28:37 -07:00
|
|
|
mod unindent;
|
2019-12-07 04:03:03 -08:00
|
|
|
mod unresolved_dependency;
|
|
|
|
mod unresolved_recipe;
|
2019-04-15 22:40:02 -07:00
|
|
|
mod use_color;
|
|
|
|
mod variables;
|
2018-10-13 03:12:35 -07:00
|
|
|
mod verbosity;
|
2019-09-21 18:53:30 -07:00
|
|
|
mod warning;
|
2018-10-13 03:12:35 -07:00
|
|
|
|
2019-04-11 15:23:14 -07:00
|
|
|
pub use crate::run::run;
|
2019-04-11 16:35:16 -07:00
|
|
|
|
2021-04-05 21:28:37 -07:00
|
|
|
// Used in integration tests.
|
|
|
|
#[doc(hidden)]
|
|
|
|
pub use unindent::unindent;
|
|
|
|
|
2021-05-08 19:07:51 -07:00
|
|
|
// Used by Janus, https://github.com/casey/janus, a tool
|
|
|
|
// that analyses all public justfiles on GitHub to avoid
|
|
|
|
// breaking changes.
|
|
|
|
#[doc(hidden)]
|
2019-04-11 16:35:16 -07:00
|
|
|
pub mod summary;
|