Commit Graph

53 Commits

Author SHA1 Message Date
Lynne Megido bddd6caeb2
format 2021-09-23 01:21:15 +10:00
Lynne Megido 7c36061e03
finish the cleanup job started by #59c87a37
somehow i forgot to remove all the { unreachable!() } clutter which was one of the main reasons i did the refactor in the first place... 0uo
2021-09-23 01:03:20 +10:00
Lynne Megido d625fef106
split fif into lib and bin 2021-08-28 17:54:01 +10:00
Lynne Megido 1f46bef10b
slightly nicer JSON write_all 2021-08-25 15:44:21 +10:00
Lynne Megido a2ce336fe7
use unstable sort 2021-08-25 15:26:41 +10:00
Lynne Megido ddde6acdd6
ignore_unknown_exts flag, slightly more testing 2021-08-07 00:19:30 +10:00
Lynne Megido 59c87a3729
minor refactoring to make formats.rs less icky 2021-07-24 16:21:20 +10:00
Lynne Megido 0d034a5c4b
minor logging changes
logs use abbreviated level names:
[D] example
instead of
[DEBUG] example

also, you can now use FIF_LOG instead of RUST_LOG
2021-07-01 18:52:53 +10:00
Lynne Megido e511d215be
minor bash/pwsh output changes
- bash now uses a heredoc to ensure that cheeky filenames containing linebreaks don't escape the echo string
- powershell rename-item now has the verbose flag that i didn't know existed
- there is now a newline between the error and successful output lines
2021-06-18 17:42:16 +10:00
Lynne Megido 3b731a7c61
added --canonical-paths flag
Findings now takes a PathBuf instead of a reference to a Path but there's no noticeable performance change
2021-06-18 15:17:30 +10:00
Lynne Megido ec4ad77136
donut repeat yourself 2021-06-14 17:54:11 +10:00
Lynne Megido 0278fe252e
kode kleanup 2021-06-14 17:08:52 +10:00
Lynne Megido 6934dd0b5e
move some commonly used constants into a single module 2021-06-14 17:07:38 +10:00
Lynne Megido 1ecc6e6c6e
semicolonic cleanse 2021-06-14 16:53:41 +10:00
Lynne Megido f8dcdf8a3c
nicer output for `fif -V` and `fif --version` 2021-06-14 16:29:41 +10:00
Lynne Megido 95956f8e30
fixed powershell output format 0u0; 2021-06-13 19:24:21 +10:00
Lynne Megido 8dac4127e9
added text output format
All checks were successful
continuous-integration/drone/push Build is passing
2021-06-07 15:21:47 +10:00
Lynne Megido 417893cae0
moved ScanError into findings.rs 2021-05-06 09:27:16 +10:00
Lynne Megido 0c0d3f12ea
new and improved rustfmt 2021-05-06 09:06:05 +10:00
Lynne Megido b93e111357
added JSON output 2021-05-06 08:57:42 +10:00
Lynne Megido 8cca5097d4
writablesln! 2021-04-28 21:39:56 +10:00
Lynne Megido a05af12352
fif now outputs the dir it was run from
- refactor Format function signatures to be more uniform
- add Shell and Bash aliases for Sh
2021-04-28 21:27:06 +10:00
Lynne Megido d6974b4959
writables!, windows newlines, sorted changelog, always quote paths
All checks were successful
continuous-integration/drone/push Build is passing
2021-04-26 20:19:58 +10:00
Lynne Megido 4d553587aa
fixed powershell output
All checks were successful
continuous-integration/drone/push Build is passing
2021-04-20 19:00:56 +10:00
Lynne Megido 255665cae0
output is now sorted 0u0
sort order: files that couldn't be read, then files with no known mimetype, then files with no known extensions, then files with the wrong extension
2021-04-20 18:52:49 +10:00
Lynne Megido dc2ac7b002
reformatting/reordering 2021-04-20 15:20:10 +10:00
Lynne Megido e7637013eb
documented and cleaned up tests, renamed "Script" to "Shell", etc
All checks were successful
continuous-integration/drone/push Build is passing
2021-04-14 18:25:46 +10:00
Lynne Megido fb67c11eb6
add option for following symlinks, make extensions optional, new version!!
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2021-04-04 23:52:16 +10:00
Lynne Megido 129aa83ade
lots of stuff! and a version bump!! 0u0
All checks were successful
continuous-integration/drone/tag Build is passing
- extension_from_path now returns Option<&OsStr>
- two new tests
- Findings uses a Path instead of a PathBuf, reducing allocations
- some unnecessary stuff removed, thanks clippy
- that is all
2021-03-26 04:46:07 +10:00
Lynne Megido 40a90308a5
initial (and somewhat bonked) powershell support, cargo update 2021-03-26 00:28:03 +10:00
Lynne Megido 87dab7284f
test on alpine, clippy & rustfmt
Some checks failed
continuous-integration/drone/push Build is failing
2021-03-12 03:44:31 +10:00
Lynne Megido e3af10cf5b
replaced some pathbufs with paths, made it actually compile and work 0uo
All checks were successful
continuous-integration/drone/push Build is passing
2021-03-12 03:26:35 +10:00
Lynne Megido 5907309689 renamed modules in accordance with https://rust-lang.github.io/api-guidelines/naming.html 2021-03-01 19:21:00 +10:00
Lynne Megido 32da919f81 replace (ScanError, PathBuf) with just ScanError (which now contains a PathBuf) 2021-03-01 19:18:20 +10:00
Lynne Megido 31aaa80701
documentation!!! ≥50% coverage!!! wow!!!!! 2021-03-01 00:06:05 +10:00
Lynne Megido d76ed2585d
tests and more!
- added unit tests
- replaced `target_os="linux"` with `unix`
- updated Cargo.toml to patch xdg-mime properly
2021-02-28 19:47:18 +10:00
Lynne Megido 52a0709097
it does indeed work on windows 2021-02-27 12:24:51 +10:00
Lynne Megido db94465bb7
better document support, print version properly, display version 2021-02-22 08:46:17 +10:00
Lynne Megido aedfd6d57f
retrieve extensions from mime_guess, minor code changes, added a readme and such 2021-02-22 01:55:27 +10:00
Lynne Megido b95c8ec85c
cleaned up formats.rs 2021-02-22 00:46:51 +10:00
Lynne Megido 9091850ec5
thanks rustfmt 2021-02-22 00:15:09 +10:00
Lynne Megido 426e09fb05
SVG support, better and more comments, minor code cleanup 2021-02-21 21:30:58 +10:00
Lynne Megido 7fdc75c9e9
windows support! and other stuff 2021-02-20 03:57:36 +10:00
Lynne Megido df2f924b2f
added some extension sets, replaced 'echo' with 'printf' in shell output 2021-02-18 21:43:24 +10:00
Lynne Megido fc7af85ba1
silly clion 2021-02-18 19:55:19 +10:00
Lynne Megido b6d340d45c
added rustfmt.toml, ran rustfmt 2021-02-18 19:48:55 +10:00
Lynne Megido d7eb0de299
nicer formatting, moved Findings into its own file 2021-02-15 03:12:27 +10:00
Lynne Megido 3642f0112a
version bump, minor cleanup, cli parse fix
previously, `fif -e rs src` would be interpreted as "scan for files with extensions 'rs' and 'src' in the default directory" instead of "scan for files with extension 'rs' in 'src'" - this has been fixed
2021-02-15 02:20:48 +10:00
Lynne Megido 3963910e1e
write header/footer with fif version, sh shebang, etc. 2021-02-15 00:25:32 +10:00
Lynne Megido 00de841fda
handle invalid utf-8 filenames properly... i think 2021-02-14 23:58:46 +10:00